|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=METHOD) @Retention(value=RUNTIME) public @interface PlanningVariable
Specifies that a bean property should be optimized by Drools Planner.
It is specified on a getter of a java bean property of aPlanningEntity class.
| Optional Element Summary | |
|---|---|
boolean |
chained
In some use cases, such as Vehicle Routing, planning entities are chained. |
Class<? extends PlanningVariableListener>[] |
listenerClasses
Deprecated. |
boolean |
nullable
A nullable planning variable will automatically add the planning value null to the ValueRange. |
Class<? extends Comparator> |
strengthComparatorClass
Allows a collection of planning values for this variable to be sorted by strength. |
Class<? extends PlanningValueStrengthWeightFactory> |
strengthWeightFactoryClass
Allows a collection of planning values for this variable to be sorted by strength. |
Class<? extends SelectionFilter> |
uninitializedEntityFilter
Construction heuristics only change (effectively reset) uninitialized planning variables. |
public abstract boolean nullable
ValueRange.
In repeated planning use cases, it's recommended to specify a uninitializedEntityFilter()
for every nullable planning variable too.
nullable() true is not compatible with {#link #chained} true.
nullable() true is not compatible with a primitive property type.
public abstract Class<? extends SelectionFilter> uninitializedEntityFilter
uninitializedEntityFilter() is specified,
the default considers an entity uninitialized for a variable if its value is null.
The method SelectionFilter.accept(ScoreDirector, Object)
returns false if the selection entity is initialized for this variable
and it returns true if the selection entity is uninitialized for this variable
PlanningVariable.NullUninitializedEntityFilter when it is null (workaround for annotation limitation)public abstract Class<? extends Comparator> strengthComparatorClass
strengthWeightFactoryClass().
PlanningVariable.NullStrengthComparator when it is null (workaround for annotation limitation)public abstract Class<? extends PlanningValueStrengthWeightFactory> strengthWeightFactoryClass
strengthComparatorClass().
PlanningVariable.NullStrengthWeightFactory when it is null (workaround for annotation limitation)PlanningValueStrengthWeightFactorypublic abstract boolean chained
nullable() true is not compatible with {#link #chained} true.
@Deprecated public abstract Class<? extends PlanningVariableListener>[] listenerClasses
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||