[rules-users] newbie: Can rules planner provide me with the single-steps to the optimal binpacking solution ?

2011-11-09 Thread Itai Frenkel
Hello,

I would like to solve a 2D binpacking problem. I have an existing bin-packing 
solution and would like to make it more optimized. Each change (movement of 
items between bins) has a certain cost, and I would like to have a list of the 
least-cost path. There is more than one solution that is optimal.

Given an existing bin-packing solution I can tell if it is the optimal 
solution, and if not I can have a gross estimate to the distance to the optimal 
solution (although it is not guaranteed to be less than the actual distance).

It sounds to me that I need something like the A-Star algorithm. Can Drools 
help me in solving this problem ?

Thanks,
Itai
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] newbie: Can rules planner provide me with the single-steps to the optimal binpacking solution ?

2011-11-09 Thread Geoffrey De Smet

Drools Planner can solve this problem for you.
Here's a presentation that shows the code for a 3D bin packing problem:
  
http://www.slideshare.net/ge0ffrey/judcon-london-2011-bin-packing-with-drools-planner-by-example
To try it yourself, download the planner zip and run the example 
CloudBalance.


Note that A* can't solve bin packing in scalable manner, because bin 
packing is np complete.
Each change (movement of items between bins) has a certain cost, and I 
would like to have a list of the least-cost path.
The roaddef2012 machinereassignement example (new on master) has the 
same problem.
The trick is that each Assignment holds the time, changeCost, the 
originalBin and the newBin. The newBin is the planning variable.
Then just add score rules that add the changeCost to the score when 
originalBin != newBin.


Op 09-11-11 15:45, Itai Frenkel schreef:


Hello,

I would like to solve a 2D binpacking problem. I have an existing 
bin-packing solution and would like to make it more optimized. Each 
change (movement of items between bins) has a certain cost, and I 
would like to have a list of the least-cost path. There is more than 
one solution that is optimal.


Given an existing bin-packing solution I can tell if it is the optimal 
solution, and if not I can have a gross estimate to the distance to 
the optimal solution (although it is not guaranteed to be less than 
the actual distance).


It sounds to me that I need something like the A-Star algorithm. Can 
Drools help me in solving this problem ?


Thanks,

Itai


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


--
With kind regards,
Geoffrey De Smet

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users