@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface CustomShadowVariable
PlanningVariable
's.
It is specified on a getter of a java bean property (or a field) of a PlanningEntity
class.
Modifier and Type | Optional Element and Description |
---|---|
PlanningVariableReference[] |
sources
The source variables (masters) that trigger a change to this shadow variable (slave).
|
Class<? extends VariableListener> |
variableListenerClass
A
VariableListener gets notified after a source planning variable has changed. |
PlanningVariableReference |
variableListenerRef
Use this when this shadow variable is updated by the
VariableListener of another CustomShadowVariable . |
public abstract PlanningVariableReference variableListenerRef
VariableListener
of another CustomShadowVariable
.public abstract Class<? extends VariableListener> variableListenerClass
VariableListener
gets notified after a source planning variable has changed.
That listener changes the shadow variable (often recursively on multiple planning entities) accordingly,
Those shadow variables should make the score calculation more natural to write.
For example: VRP with time windows uses a VariableListener
to update the arrival times
of all the trailing entities when an entity is changed.
variableListenerRef()
is not null)public abstract PlanningVariableReference[] sources
variableListenerRef()
is not null), at least 1Copyright © 2006–2019 JBoss by Red Hat. All rights reserved.