diff --git a/code/python/assets/commands.yaml b/code/python/assets/commands.yaml index a1cbf24..e9750f6 100644 --- a/code/python/assets/commands.yaml +++ b/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 - allow-fractional: true -- <<: *rucksack_1 +- name: RUCKSACK algorithm: BRANCH-AND-BOUND + 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] +- 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 diff --git a/code/python/assets/config.yaml b/code/python/assets/config.yaml index aafb719..a18cf06 100644 --- a/code/python/assets/config.yaml +++ b/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 diff --git a/code/python/models/config-schema.yaml b/code/python/models/config-schema.yaml index dfca22f..4c40cb6 100644 --- a/code/python/models/config-schema.yaml +++ b/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