Browse Source

master > master: code py - schemata aktualisiert

master
RD 2 months ago
parent
commit
4cc4410c19
  1. 30
      code/python/assets/commands.yaml
  2. 6
      code/python/assets/config.yaml
  3. 22
      code/python/models/config-schema.yaml

30
code/python/assets/commands.yaml

@ -75,20 +75,40 @@
# Beispiele für Seminarwoche 11 (Blatt 10)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- &rucksack_1
name: RUCKSACK
- name: RUCKSACK
algorithm: GREEDY
allow-fractional: false
allow-fractional: true
# allow-fractional: false
max-cost: 10
items: [a, b, c, d, e]
costs:
[3, 4, 5, 2, 1]
values:
[8, 7, 8, 3, 2]
- <<: *rucksack_1
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
allow-fractional: true
- <<: *rucksack_1
# allow-fractional: false
max-cost: 10
items: [a, b, c, d, e]
costs:
[3, 4, 5, 2, 1]
values:
[8, 7, 8, 3, 2]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 460
items: [
'Lakritze',
'Esspapier',
'Gummibärchen',
'Schokolade',
'Apfelringe',
]
costs:
[220, 80, 140, 90, 100]
values:
[100, 10, 70, 80, 100]
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
max-cost: 90

6
code/python/assets/config.yaml

@ -22,11 +22,17 @@ options:
diagonal: 0
horizontal: 1
vertical: 2
# verbose: []
verbose:
- COSTS
- MOVES
# show: []
show:
# - ATOMS
- TREE
rucksack:
verbose: true
# show: []
show:
- ALL-WEIGHTS
- ALL-SUMS

22
code/python/models/config-schema.yaml

@ -53,7 +53,7 @@ components:
- tsp
- tarjan
- hirschberg
- rucksack-branch-and-bound
- rucksack
properties:
log-level:
$ref: '#/components/schemas/EnumLogLevel'
@ -117,12 +117,16 @@ components:
default: []
rucksack:
type: object
required:
- verbose
required: []
properties:
verbose:
type: boolean
default: false
show:
type: array
items:
$ref: '#/components/schemas/EnumRucksackShow'
default: []
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Enum LogLevel
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -148,8 +152,18 @@ components:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EnumHirschbergShow:
description: |-
Enumeration of verbosity options for Hirschberg
Enumeration of display options for Hirschberg
type: string
enum:
- TREE
- ATOMS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Enum Rucksack - display options
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EnumRucksackShow:
description: |-
Enumeration of display options for the Rucksack problem
type: string
enum:
- ALL-WEIGHTS
- ALL-SUMS

Loading…
Cancel
Save