Used for calling a brute-force bin packing API
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
__pycache__
.DS_Store
README.md
bridge.p
main.py First commit Jan 19, 2018
wrapper.py

README.md

Brute

Used for calling a brute-force bin packing API

IN:

  1. Tank volumes. This is expressed as a list with name tanksVolValue in main.py

  2. Product volumes. This is expressed as a list with name prodsVolValue in main.py

OUT:

Possible stowage combinations.

Example:

tanksVolValue = [20, 20, 10, 5]

prodsVolValue = [20, 25]

Result:

18 total combinations expressed as a list, using s = 3 and r = 1. Each element in the list contains the following:

[[20, 25], [7003], {'7003': 10}, [[7002], [7004, 7001]]

[20, 25] = The product volumes, sorted [7003] = Remaining tank that is empty and available. The 700 in '700X' has no meaning, it was an ID holdover from early development. {'7003' : 10} = dictionary that expressed an empty tank and its volume [[7002], [7004, 7001]] = The stow. So if given,

7001 = 30
7002 = 20
7003 = 10
7004 = 5

then the first volume (20) will be stowed in 7002 and the second volume (25) will be stowed in 7004 and 7001.