Thursday, February 14, 2013

Automatic solution cloning in Planner

For Planner 6.0.0.Beta1, implementing the Solution's planning clone method is now optional. This means there's less boilerplate code to write. Also, because the planning clone method notoriously hard to write from scratch (most people just copy pasted the examples to avoid mistakes), it's now easier to get started with Planner too.

The out-of-the-box SolutionCloner works well for most use cases: it's fast, yet still does a few sanity checks to detect errors.

Custom solution cloning

You can still choose to roll your own solution cloning. Now, it's also documented what Planner expects you to do:

A planning clone of a Solution must fulfill these requirements:
  • The clone must represent the same planning problem. Usually it reuses the same instances of the problem facts and problem fact collections as the original.
  • The clone must use different, cloned instances of the entities and entity collections. Changes to the original Solution's entities must not effect its clone.

And there's also warning, in case you're using chained planning variables, for a common pitfall:
Cloning an entity with a chained variable is devious: a variable of an entity A might point to another entity B. If A is cloned, then it's variable must point to the clone of B, not the original B.

But don't worry about that: just use the default SolutionCloner, which will take care of all that for you.

Wednesday, February 13, 2013

Dropping JSR94

We are thinking of dropping JSR94 support in the next release, especially as it doesn't align with our new approach to building rules - which is convention and configuration based, rather than api based.

If anyone has a good case for keeping JSR94, please leave a comment.

Wednesday, February 06, 2013

Design Patterns in Production Systems (Wolfgang Laun)

Many thanks to Wolfgang Laun for making his extensive work available for all of us to benefit from. The free pdf is just a short registration page away: