master > master: code py - verbesserte Darstellung + »korrekte« Behandlung von Reihenfolgen

- im Kurs wird die Permutation nur für Greedy-Berechnungen angewandt
- die Reihenfolge der Items in der Hauptberechnung bei B&B bleibt wie bei Angaben
This commit is contained in:
RD
2022-06-14 14:40:02 +02:00
parent e3c3bbec37
commit 3b8f80cff9
12 changed files with 169 additions and 147 deletions

View File

@@ -78,18 +78,20 @@
- &rucksack_1
name: RUCKSACK
algorithm: GREEDY
allow-fractional: true
capacity: 10
allow-fractional: false
max-cost: 10
items: [a, b, c, d, e]
weights:
costs:
[3, 4, 5, 2, 1]
values:
[8, 7, 8, 3, 2]
- <<: *rucksack_1
allow-fractional: true
- <<: *rucksack_1
algorithm: BRANCH-AND-BOUND
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
capacity: 90
max-cost: 90
items: [
'Sonnenblumenkerne',
'Buchweizen',
@@ -97,7 +99,7 @@
'Hirse',
'Sellerie',
]
weights:
costs:
[30, 10, 50, 10, 80]
values:
[17, 14, 17, 5, 25]