Compare commits

...

2 Commits

Author SHA1 Message Date
2fceaa7d95 master > master: protokoll - woche 11 + images 2022-06-15 07:53:37 +02:00
25f18db567 master > master: code py - minor 2022-06-15 07:53:21 +02:00
7 changed files with 6 additions and 4 deletions

View File

@ -174,10 +174,10 @@ def rucksack_branch_and_bound_algorithm(
if verbose:
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]);
print('\x1b[1mLösung\x1b[0m');
print('');
print(repr);
print('');
print('\x1b[1mLösung\x1b[0m');
print('');
print(f'Mask: [{", ".join(map(str, soln.choice))}]');
print('Rucksack:');
print(repr_rucksack);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 190 KiB

View File

@ -6,9 +6,11 @@
- Greedyalgorithmus
- Branch & Bound
### Beispielausführungen von B&B - Problem aus Folien ###
### Beispielausführungen von Greedy vs. B&B - Problem aus Folien ###
![Problem aus Folien](./../notes/img/embed_rucksack_1.png)
![Problem aus Folien](./../notes/img/embed_rucksack_1a.png)
![Problem aus Folien](./../notes/img/embed_rucksack_1b.png)
### Beispielausführungen von B&B - Problem aus Vorlesung ###