[rules-users] Lazy Planning Value Validation

Geoffrey De Smet ge0ffrey.spam at gmail.com
Tue Jun 4 03:20:45 EDT 2013


On 03-06-13 21:37, jonathan.labin wrote:
> Thanks for the feedback.  I'll look into DefaultDecider to see if I can make
> a version that suits this need and hold my breath for multi-step score
> evaluation.
>
> For clarity I'd like to address your comment below:
>
>
> ge0ffrey wrote
>>> If the assignment turns out to be invalid in this check, I'd like to
>>> remove
>>> it from the Value Range so it is never considered again.
>> That's weird:
>> - either you can predict it's never going to be valid for a certain
>> entity, no matter the variable state of the other entities => use
>> @ValueRange(FROM_ENTITY)
>> - or you can't (not without taking a look at the variable state of the
>> other entities => invalid for a single solution does not mean you can
>> just remove it to be never considered again
> You're right.  In this case, I CAN predict that it's never going to be valid
> for a certain entity.  My concern is the computational effort that is
> required in order to make that decision.  I'm afraid that making that
> determination for every single planning value (a huge space) would take too
> long.  Since many of those planning values are unlikely to yield a valuable
> score, I was hoping to delay the validation until I know they may be useful
> in a solution.
>
> Would removing a planning value from the value range at run time be
> problematic?
That's uncharted territory.

Take a look at the scope overview:
https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-docs/src/main/docbook/en-US/images/Chapter-Optimization_algorithms/scopeOverview.png

Would your value range reduction happen at stepEnd() or at a move 
evaluation?
Based on that, it limits the cacheType you can use in the selectors.
The ValueSelector classes call to VariableDescriptor's ValueRangeDescriptor.

Would you remove the value from the value range for all entities or for 
just 1 entity at a time?
all entities => FromSolution range
just 1 entity => FromEntity range

HTH - good luck :)
>
> Jon
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Lazy-Planning-Value-Validation-tp4024095p4024098.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
>



More information about the rules-users mailing list