View post: Plain old Java score calculation in Planner

Plain old Java score calculation in Planner

Posted on 2012-04-09 09:37:00.0 by Geoffrey De Smet [ View original post ]

In Drools Planner 5.4.0.CR1, you can now define your score calculation in plain old Java too. In fact, it supports 3 alternative score calculations:
  • Simple Java score calculator (new in 5.4)
  • Incremental Java score calculator (new in 5.4)
  • Drools DRL score calculator (the traditional way)
Unfortunately, each of these have advantages and disadvantages. Let's take a look at each of them.

Simple Java score calculator

This score calculator is very easy to implement. Just implement one method :