[rules-users] [drools planner] [5.3.0 Final] Sorting successfully planned entities

guyver m.ahmed2029 at gmail.com
Wed Nov 2 08:57:36 EDT 2011


Thanks for the reply. mySolution.getScore().getHardScore() gives me the
collective hard score for the entire solution but I am looking for a hard
score of the individual planning entity objects. For instance, if I take the
planner examination example, for simplicity, let's say that i have three
exams so my planning entity objects that are loaded into the Examination
solution object are
Exam1
Exam2 
Exam3

After running the planner and getting the solution from the solver, the
planner determined that the conflictingExamsInSamePeriod constraint was
violated for Exam 1 and Exam 2 so the hard score is as follows
Exam 1   -1
Exam 2   -1
Exam 3    0
but if we use mySolution.getScore().getHardScore() , it will show the hard
score as
Exam 1   -2
Exam 2   -2
Exam 3   -2

My question is that if there is a way to get the score (-1, -1, 0) of the
individual exams(planning entity objects)?

In this example, I am only interested in exam 3 since it had a score of
zero. I should be able to filter the output solution so that I know which
planning entities did not break any of my constraints. I have 100+
constraints and thousands of planning entities so it is not feasible for me
to run the solution output from the planner against all my constraints in
java to determine which entity did not break any of the constraints.

--
View this message in context: http://drools.46999.n3.nabble.com/drools-planner-5-3-0-Final-Sorting-successfully-planned-entities-tp3471628p3473711.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list