Enum Class PlanningVariableGraphType
java.lang.Object
java.lang.Enum<PlanningVariableGraphType>
org.optaplanner.core.api.domain.variable.PlanningVariableGraphType
- All Implemented Interfaces:
Serializable
,Comparable<PlanningVariableGraphType>
,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlanningVariableGraphType
Returns the enum constant of this class with the specified name.static PlanningVariableGraphType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
This is the default. -
CHAINED
Changes to this variable need to trigger chain correction.In some use cases, such as Vehicle Routing, planning entities are chained. A chained variable recursively points to a problem fact, which is called the anchor. So either it points directly to the anchor (that problem fact) or it points to another planning entity which recursively points to the anchor. Chains always have exactly 1 anchor, thus they never loop and the tail is always open. Chains never split into a tree: an anchor or planning entity has at most 1 trailing planning entity.
When a chained planning entity changes position, then chain correction must happen:
- divert the chain link at the new position to go through the modified planning entity
- close the missing chain link at the old position
A <- B <- C <- D <- X <- Y
, when B moves between X and Y, pointing to X, then Y is also changed to point to B and C is also changed to point to A, giving the resultA <- C <- D <- X <- B <- Y
.PlanningVariable.nullable()
true is not compatible with this.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-