Monday, June 04, 2012

Quick start with Drools Planner

I've posted an article on DZone's javalobby yesterday:

Resource optimization: Quick start with Drools Planner

Vote it up if you like it :)


  1. Geoffrey,

    This is a nice demonstration of the constraint programming power. I've just added a JSR-331 based implementation to your DZone's post. I will make a few other implementations available within oncoming JSR-331 1.0.1 release (see

    Drools Planner seems to be a powerful tool - it could be nice if you make it JSR-331 compliant (if it is possible).



    1. Hi Jacob,

      I've answered at DZone :)

      As for writing a JSR-331 adapter for Drools Planner: it should be possible, because anything that can be defined with the constraint API can be translated into a generated score DRL (or alternatively even into a IncrementalJavaScoreCalculator) I think (vica versa this is not possible I think).
      If I had more time, I 'd write such an adapter myself. If anyone in the community wants to go for it, I 'd very much welcome a pull request to add a drools-planner-jsr331 module.

      I believe in standardization and the JSR process, but - in hindsight - I think it was too early to standardize JSR-331. The CP technology is only now coming to a point where we can use rich domain objects directly in the constraints and JSR-331 1.0 does not take advantage of this. I 'd like to be involved in the next iteration of the JSR-331 standard that does take advantage of defining constraints against POJO's with reuse of their business methods.