[rules-users] Optaplanner: Shadow Variables vs insertLogical

jonathan.labin jonathan.labin at gmail.com
Tue Jul 16 09:22:24 EDT 2013


It turns out that the score corruption was caused by something unrelated.  In
fact, a rule that will be removed in the re-design I am asking about.  If I
see a similar problem after the re-design I'll pursue your suggestions to
determine the reason.

However I was wondering if you had more insight into the Shadow Variable vs
insertLogical() question for my domain.  

I imagine that the insertLogical() approach would fire for each line of an
order (Planning Entity) and insert a fact for each type of raw material in
the order where each fact contains the number of that type of raw material. 
Then, a rule with a different salience would accumulate all of these facts
to produce total counts of each type across all orders.  Is this an
appropriate approach?  Does this approach break the delta score calculation? 
Will the creation, (automated) retraction, and accumulation of these facts
create a slowdown or is this an intended use?

I imagine that the Shadow Variable approach would update a similar set of
total count variables but instead do so appropriately when the Planning
Variable changes.  Would the classes representing the raw material types
themselves become Planning Entities in this case?  
Is this the intended use?

Thanks,

Jon



--
View this message in context: http://drools.46999.n3.nabble.com/Optaplanner-Shadow-Variables-vs-insertLogical-tp4024863p4024928.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list