master > master: code py - schemata für rucksack
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -28,3 +28,5 @@ options:
|
||||
show:
|
||||
# - ATOMS
|
||||
- TREE
|
||||
rucksack:
|
||||
verbose: true
|
||||
|
||||
Reference in New Issue
Block a user