[rules-users] What's the difference between Drools and other constraints solvers?

Geoffrey De Smet ge0ffrey.spam at gmail.com
Tue Aug 21 04:49:19 EDT 2012


> and what are
> the superior aspects of Drools (if any) than others?
1) It has better results, especially when scaling out. The OR 
competitions show this clearly. For example:
1a) In the google roadef competition, the top 80 teams competed for 20k 
€ prize money, of which 10k € reserved excluded for the open source 
category.
All LP based implementations (Choco, CPLEX, ...) mostly blew up on the B 
datasets. Metaheuristics clearly dominate the top ranking.
Although custom written code by the super experts won, of all the 
production-ready solvers, I've seen none do better than Planner's latest 
results yet (including LocalSolver):
http://blog.athico.com/2012/06/roadef-2012-first-results-for-dataset-b.html
1b) Also check the results on other competitions, such as ITC2007 ( 
http://www.cs.qub.ac.uk/itc2007 ).

2) It's far more flexible and easier to write your constraints.
JaCop and Choco require you to write your constraints as mathematical 
equations (a requirement of LP).
In Planner, you can write you constraints as a simple java method 
calculateScore, or as Drools rules (which are much faster due to 
incremental score calculation).
This means you can add non linear constraints too. For example minimize 
the sum of x² (which is really useful for fairness constraints).
Also, Planner's score constraints are Object-Orientated and allow you to 
reuse existing Java code.
For example, you can reuse this Java method to check if an Employee is 
free on a certain date, based on the employee's country: 
isNationalHoliday(Date, Country)

3) The Score system is much more flexible.
In JaCop and Choco, you can only implement 2 score levels: hard and 
soft. The inequalities are the hard constraints and their score function 
is the soft constraints.
IIRC, both are based on java doubles and don't support other types (such 
as a BigDecimal for financial data).
In Planner, you can use more score levels and other datatypes if so 
desired by defining your own ScoreDefinition. Out-of-the-box several 
basic ones are implemented.

Op 21-08-12 10:17, zjg_robin schreef:
> Hi,
>
> I want to solve some constraint satisfication problems (CSP) and it seems
> that Drools and other constraints solvers like
> JaCoP(http://jacop.cs.lth.se/)and choco
> (http://www.emn.fr/z-info/choco-solver/) are all fit in such a field. So, my
> question is what is the difference between Drools and others? and what are
> the superior aspects of Drools (if any) than others?
>
> Thanks.
>
> Robin.
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/What-s-the-difference-between-Drools-and-other-constraints-solvers-tp4019299.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users

-- 
With kind regards,
Geoffrey De Smet




More information about the rules-users mailing list