Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## org.optaplanner.core.api.domain.variable
Annotation Type CustomShadowVariable

    @Target(value=METHOD)
    @Retention(value=RUNTIME)
    public @interface CustomShadowVariable

Specifies that a bean property is a custom shadow of 1 or more `PlanningVariable`'s.

It is specified on a getter of a java bean property of a `PlanningEntity` class.

Required Element Summary
`CustomShadowVariable.Source[]` | `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.

Element Detail

### variableListenerClass

    public abstract Class<? extends VariableListener> variableListenerClass

  A `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.

  Returns:
    never null

### sources

    public abstract CustomShadowVariable.Source[] sources

  The source variables (masters) that trigger a change to this shadow variable (slave).

  Returns:
    never null, at least 1

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.