Annotation Type ShadowVariable

    • Element Detail

      • variableListenerClass

        Class<? extends AbstractVariableListener> variableListenerClass
        A VariableListener or ListVariableListener 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.

        a variable listener class
      • sourceVariableName

        String sourceVariableName
        The source variable name.
        never null, a genuine or shadow variable name
      • sourceEntityClass

        Class<?> sourceEntityClass
        The PlanningEntity class of the source variable.

        Specified if the source variable is on a different Class than the class that uses this referencing annotation.

        ShadowVariable.NullEntityClass when the attribute is omitted (workaround for annotation limitation). Defaults to the same Class as the one that uses this annotation.