Well,

I need to solve - let's say - a complex 2 dimensional puzzle.
The goal is to fill a 2D rectangle (with fixed dimensions) out of "puzzle pieces" that do not have a fixed shape.
A puzzle piece is built out of a number of bars of variable length and the bars can slide against each other (to some extend: differs per joint of two bars).

Just shifting and swapping around the "puzzle pieces" is not quite well performing since that will result in many
violations although a shift or swap could match perfectly if you slide (some of) the bars of the piece at the same time. 

Feeding all possible combinations of shifts and swaps combined with all possible forms of the pieces would result in ... well quite a lot of combinations.
So I want to build a smarter mover that "knows" how to slide a piece in order to fit it in an available place (or swap it with an other piece to improve both pieces match).
I think the mover would perform far better if I have a "bit-map" that contains the 2D representation of the way everything is placed and which could calculate the best layout of the piece before putting it into the puzzle.

Therefor I would like to know the last change applied so I can incrementally update the bit-map instead of recalculating it entirely every time.

Hey, hmmm... maybe I don't need to know the last accepted move. Just finding the diff between best-solution and previous best-solution might do the trick?!

For finding the best layout of a single piece, ?could I use a second instance of planner that does a "normal" bin-packaging of a single piece in the available container (container is then an available free area or the combination of one or more other pieces and the free space around that other piece)?

Maybe I'm going goofy on this... too many long nights are beginning to cloud my mind.

Well, any ideas are welcome.

Regards.
 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials

From: Geoffrey De Smet <ge0ffrey.spam@gmail.com>
To: rules-users@lists.jboss.org
Sent: Thursday, February 21, 2013 10:37 AM
Subject: Re: [rules-users] Planner: Is it possible to know which move was selected on step-end?

Officially, in the public api (aka the "user facing api"), there's no such listener.
Why would you need this at runtime?
Open an issue: if there's a good reason to need this, we can talk about adding it to the public api.
  https://issues.jboss.org/browse/PLANNER


That being said and handled first, the benchmarker actually hacks a step listener if I recall correctly:
https://github.com/droolsjbpm/drools-planner/tree/master/drools-planner-benchmark/src/main/java/org/drools/planner/benchmark/core/statistic/calculatecount

Op 20-02-13 21:56, Michiel Vermandel schreef:
Hi,

Is it possible to capture which move was selected on step-end?
I don't mean in the logging but by event or custom selector or... ?

Thanks

Michiel
 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


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


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