I want to optimize loading marble blocks into trucks. I do not know, if I can use Solver Foundation class for that purpose. Before, I start writing code, I wanted to ask it here.
GOAL - The goal is to load marble blocks in minimum truck shipment.
How can I do that without writing a lot of if conditions and for loops?
Can I use Microsoft Solver Foundation for that purpose?
I read the documentation provided by Microsoft however, I could not find a scenario similar to mine.
M1+ M2 + M3 + .... Mn <=24
this is for one truck shipment.
Let say there are 200 different Marble weights and Marble weights are Float.
Thanks
An optimal solution to a bin-packing problem uses the fewest number of bins possible. For example, given the set of elements 6, 12, 15, 40, 43, 82, and a bin capacity of 100, we can assign 6, 12, and 82 to one bin, and 15, 40, and 43 to another, for a total of two bins.
The BIN PACKING decision problem asks the question whether – given a set of objects of distinct sizes, and a set of bins with specific capacity – there is a distribution of items to bins such that no item is left unpacked nor the capacity of any bin is exceeded.
A set of bins, each assigned a bin type and a set of item incarnations, such that exactly one incarnation of each item is assigned to any bin, and such that the total size of incarnations assigned to a bin does not exceed its capacity in any dimension.
The 3D Bin Packing Problem (3D-BPP) is one of the most frequent problems in warehousing and logistics. Its solution is filling a container (a box or pallet) with items as closely to each other as possible to minimize the number of required containers.
You can use Microsoft Solver Foundation to solve this problem. An example of such a solution can be found here where the OML for the bin packing problem is as follows:
Model[
Parameters[Sets,Items,Bins],
Parameters[Integers,OrderWidth[Items],BinWidth[Bins]],
Decisions[Integers[0,1],x[Items,Bins]],
Decisions[Integers[0,1],y[Bins]],
Constraints[
Foreach[{i,Items},Sum[{j,Bins}, x[i,j]]==1 ],
Foreach[{j,Bins}, Sum[{i,Items}, OrderWidth[i]*x[i,j]] <= BinWidth[j]],
Foreach[{i,Items},{j,Bins}, y[j] >= x[i,j]]
],
Goals[Minimize[UsedBins->Sum[{j,Bins},y[j]]]]
]
It would be easy to change OrderWidth to MarbleWeight and BinWidth to TruckCapacity (or just 24 in your case)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With