[rules-users] Re: drools solver for 2d knapsack problem

Geoffrey De Smet ge0ffrey.spam at gmail.com
Sat May 9 06:19:00 EDT 2009


Sounds a like good planning problem for drools-solver :)

Lessonsschedule and nqueens are nice problems to understand how 
drools-solver works, but they aren't optimized (and don't need to be).

The Itc2007 examination example is highly optimized, but more difficult 
to understand.

The latest manual is at:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/index.html
If you've already read it a while back, I 've just added some info about 
"score traps" and "relativeSelection", 2 things that can boost your 
performance.

Drools 5.0.1 (including drools-solver) will be released any day now and 
will fix the runExample.sh script which was released in the 5.0.0.CR1 
download.

The SimulatedAnnealingAccepter and GreatDelugeAccepter aren't any good 
yet (patches welcome), so stick with tabu search for now.
I am working on shifting penalty support for hard/soft constraints,
which should boost performance.

With kind regards,
Geoffrey De Smet


Wolfgang Laun schreef:
> That's indeed more like a problem for using rules (and far from the 
> plain "cutting sheet" I had in mind), From the examples, itc2007 and 
> lessonsschedule might give you an idea how to approach your problem.
> -W
> 
> 
> On Fri, May 8, 2009 at 1:05 PM, Olaf Raether <o.raether at epro.de 
> <mailto:o.raether at epro.de>> wrote:
> 
> 
>     I think it´s more a knapsack problem. And the rectangles have to
>     follow some
>     business rules,
>     so that´s the reason try to using solver. Here´s an image of the
>     problem.
> 
>     http://www.nabble.com/file/p23443994/2dknapsack.jpg 2dknapsack.jpg
> 
>     The big rectangle is the load area of a truck und the small ones are
>     racks.
>     And i have to
>     put them on the truck. And the Business rules come into the play,
>     cause the
>     racks can only
>     mounted in a special manner on the track.
> 
>     Any hint is welcome
> 
> 
> 
>     Wolfgang Laun-2 wrote:
>      >
>      > I've researched this, a long time ago (trying to find a solution
>     for a
>      > problem from the "worse" class). Even then, several results could
>     be found
>      > in the literature for the "cutting sheet" problem for rectangles,
>     showing
>      > that certain parameters (w.r.t. to rectangle dimensions being
>     multiples of
>      > each other, replication factors, etc.) influence the problem space
>      > considerably. (Cutting random rectangles from a sheet is hardly an
>      > industry
>      > problem.)
>      >
>      > Having said that, drools-solver should be able to handle this
>     problem.
>      >
>      > However, it is very likely that there is an algorithm that solves
>     your
>      > particular problem more efficiently.
>      >
>      > -W
>      >
>      >
>      > On Fri, May 8, 2009 at 9:59 AM, Olaf Raether <o.raether at epro.de
>     <mailto:o.raether at epro.de>> wrote:
>      >
>      >>
>      >> Rectangles within a Rectangle
>      >>
>      >> OR
>      >>
>      >>
>      >> Wolfgang Laun-2 wrote:
>      >> >
>      >> > Rectangles or simple polygons or worse?
>      >> > -W
>      >> >
>      >> > On Fri, May 8, 2009 at 9:02 AM, Olaf Raether
>     <o.raether at epro.de <mailto:o.raether at epro.de>> wrote:
>      >> >
>      >> >> Hey , i would like to use drools solver for a 2d knapsack
>     problem.
>      >> >> Has anyone expirience with that ?
>      >> >> Is drools solver made for such a task ?
>      >> >>
>      >> >> Thank for hints
>      >> >>
>      >> >> Olaf Raether
>      >> >>
>      >> >> _______________________________________________
>      >> >> rules-users mailing list
>      >> >> rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>      >> >> https://lists.jboss.org/mailman/listinfo/rules-users
>      >> >>
>      >> >
>      >> > _______________________________________________
>      >> > rules-users mailing list
>      >> > rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>      >> > https://lists.jboss.org/mailman/listinfo/rules-users
>      >> >
>      >> >
>      >>
>      >> --
>      >> View this message in context:
>      >>
>     http://www.nabble.com/drools-solver-for-2d-knapsack-problem-tp23441149p23441743.html
>      >> Sent from the drools - user mailing list archive at Nabble.com.
>      >>
>      >> _______________________________________________
>      >> rules-users mailing list
>      >> rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>      >> https://lists.jboss.org/mailman/listinfo/rules-users
>      >>
>      >
>      > _______________________________________________
>      > rules-users mailing list
>      > rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>      > https://lists.jboss.org/mailman/listinfo/rules-users
>      >
>      >
> 
>     --
>     View this message in context:
>     http://www.nabble.com/drools-solver-for-2d-knapsack-problem-tp23441149p23443994.html
>     Sent from the drools - user mailing list archive at Nabble.com.
> 
> 
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org <mailto:rules-users at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list