Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.optaplanner.core.api.domain.variable
Enum PlanningVariableGraphType

    java.lang.Object
      java.lang.Enum<PlanningVariableGraphType>
          org.optaplanner.core.api.domain.variable.PlanningVariableGraphType

All Implemented Interfaces:
  Serializable, Comparable<PlanningVariableGraphType>

    public enum PlanningVariableGraphType

extends Enum<PlanningVariableGraphType>

Enum Constant Summary
`CHAINED` Changes to this variable need to trigger chain correction.
`NONE` This is de default.

Method Summary
`static PlanningVariableGraphType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static PlanningVariableGraphType[]` | `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`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### NONE

    public static final PlanningVariableGraphType NONE

  This is de default.

### CHAINED

    public static final PlanningVariableGraphType 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 planning fact, which is called the anchor. So either it points directly to the anchor (that planning 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
  For example: Given 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.

Method Detail

### values

    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);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    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.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| OptaPlanner distribution 6.2.0.Beta3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

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