- All Implemented Interfaces:
public enum PlanningVariableGraphType extends Enum<PlanningVariableGraphType>
All Methods Static Methods Concrete Methods Modifier and Type Method Description
valueOf(String name)Returns the enum constant of this type with the specified name.
values()Returns an array containing the constants of this enum type, in the order they are declared.
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Enum Constant Detail
public static final PlanningVariableGraphType NONEThis is the default.
public static final PlanningVariableGraphType CHAINEDChanges 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: a 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 result
A <- C <- D <- X <- B <- Y.
PlanningVariable.nullable()true is not compatible with this.
public static PlanningVariableGraphType values()Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PlanningVariableGraphType c : PlanningVariableGraphType.values()) System.out.println(c);
- an array containing the constants of this enum type, in the order they are declared
public static PlanningVariableGraphType valueOf(String name)Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
name- the name of the enum constant to be returned.
- the enum constant with the specified name
IllegalArgumentException- if this enum type has no constant with the specified name
NullPointerException- if the argument is null