<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Drools Planner can solve this problem for you.<br>
Here's a presentation that shows the code for a 3D bin packing
problem:<br>
<a class="moz-txt-link-freetext" href="http://www.slideshare.net/ge0ffrey/judcon-london-2011-bin-packing-with-drools-planner-by-example">http://www.slideshare.net/ge0ffrey/judcon-london-2011-bin-packing-with-drools-planner-by-example</a><br>
To try it yourself, download the planner zip and run the example
"CloudBalance".<br>
<br>
Note that A* can't solve bin packing in scalable manner, because bin
packing is np complete.<br>
<blockquote type="cite">Each change (movement of items between bins)
has a certain cost, and I would like to have a list of the
least-cost path.</blockquote>
The roaddef2012 machinereassignement example (new on master) has the
same problem.<br>
The trick is that each Assignment holds the time, changeCost, the
originalBin and the newBin. The newBin is the planning variable.<br>
Then just add score rules that add the changeCost to the score when
originalBin != newBin.<br>
<br>
Op 09-11-11 15:45, Itai Frenkel schreef:
<blockquote
cite="mid:937E2FF007587B4E85B50FAAE85799F530739AD298@IE2RD2XVS141.red002.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:right;
        direction:rtl;
        unicode-bidi:embed;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">Hello,<o:p></o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;"><o:p> </o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">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.<o:p></o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;"><o:p> </o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">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). <o:p></o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;"><o:p> </o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">It sounds to me that I need something
like the A-Star algorithm. Can Drools help me in solving this
problem ?<o:p></o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;"><o:p> </o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="text-align: left; direction: ltr;
unicode-bidi: embed;">Itai<o:p></o:p></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
With kind regards,
Geoffrey De Smet</pre>
</body>
</html>