Compare commits
2 Commits
51632d10e3
...
2fceaa7d95
Author | SHA1 | Date | |
---|---|---|---|
2fceaa7d95 | |||
25f18db567 |
@ -174,10 +174,10 @@ def rucksack_branch_and_bound_algorithm(
|
|||||||
if verbose:
|
if verbose:
|
||||||
repr = display_branch_and_bound(values=values, steps=logged_steps);
|
repr = display_branch_and_bound(values=values, steps=logged_steps);
|
||||||
repr_rucksack = display_rucksack(items=items[rucksack], costs=costs[rucksack], values=values[rucksack], choice=np.asarray(mask.choice)[rucksack]);
|
repr_rucksack = display_rucksack(items=items[rucksack], costs=costs[rucksack], values=values[rucksack], choice=np.asarray(mask.choice)[rucksack]);
|
||||||
print('\x1b[1mLösung\x1b[0m');
|
|
||||||
print('');
|
|
||||||
print(repr);
|
print(repr);
|
||||||
print('');
|
print('');
|
||||||
|
print('\x1b[1mLösung\x1b[0m');
|
||||||
|
print('');
|
||||||
print(f'Mask: [{", ".join(map(str, soln.choice))}]');
|
print(f'Mask: [{", ".join(map(str, soln.choice))}]');
|
||||||
print('Rucksack:');
|
print('Rucksack:');
|
||||||
print(repr_rucksack);
|
print(repr_rucksack);
|
||||||
|
Before Width: | Height: | Size: 139 KiB |
BIN
notes/img/embed_rucksack_1a.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
notes/img/embed_rucksack_1b.png
Normal file
After Width: | Height: | Size: 141 KiB |
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 244 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 190 KiB |
@ -6,9 +6,11 @@
|
|||||||
- Greedyalgorithmus
|
- Greedyalgorithmus
|
||||||
- Branch & Bound
|
- Branch & Bound
|
||||||
|
|
||||||
### Beispielausführungen von B&B - Problem aus Folien ###
|
### Beispielausführungen von Greedy vs. B&B - Problem aus Folien ###
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### Beispielausführungen von B&B - Problem aus Vorlesung ###
|
### Beispielausführungen von B&B - Problem aus Vorlesung ###
|
||||||
|
|
||||||
|