master > master: code py - schemata für rucksack

This commit is contained in:
RD
2022-06-14 01:34:44 +02:00
parent d79b10e190
commit 7cfaf253b3
4 changed files with 101 additions and 8 deletions

View File

@@ -53,7 +53,7 @@
- name: HIRSCHBERG
word1: 'happily ever after'
word2: 'apples'
once: true
once: false
- name: HIRSCHBERG
word1: 'happily'
word2: 'applses'
@@ -70,3 +70,34 @@
word1: 'ANSTRENGEN'
word2: 'ANSPANNEN'
once: false
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Beispiele für Seminarwoche 11 (Blatt 10)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- &rucksack_1
name: RUCKSACK
algorithm: GREEDY
allow-fractional: true
capacity: 10
weights:
[3, 4, 5, 2, 1]
values:
[8, 7, 8, 3, 2]
- <<: *rucksack_1
algorithm: BRANCH-AND-BOUND
- name: RUCKSACK
algorithm: BRANCH-AND-BOUND
allow-fractional: true
capacity: 90
items: [
'Sonnenblumenkerne',
'Buchweizen',
'Rote Beete',
'Hirse',
'Sellerie',
]
weights:
[30, 10, 50, 10, 80]
values:
[17, 14, 17, 5, 25]

View File

@@ -28,3 +28,5 @@ options:
show:
# - ATOMS
- TREE
rucksack:
verbose: true