Package ai.timefold.solver.core.impl.domain.variable.declarative
package ai.timefold.solver.core.impl.domain.variable.declarative
Provided shadow variables work by calculating the topological order
of each shadow variable.
The nodes in the graph are paths to each shadow variable, bound to a particular entity instance.
The nodes in the graph are paths to each shadow variable, bound to a particular entity instance.
- The path `e1:Entity.#id.a` is the source path for the shadow variable `a` on entity e1.
- If `e2.previous = e1`, then the path `e2:Entity.#id.#previous.a` is an alias path for the shadow variable `a` on e1.
- The path can have multiple parts; like `e1:Entity.#id.#previous.#previous.a`. In this case, `e1:Entity.#id.#previous` is the parent of `e1:Entity.#id.#previous.#previous`.
- There is a fixed edge from the parent to each of its children. (i.e. `e1:Entity.#id.#previous` -> `e1:Entity.#id.#previous.a`)
- There is a fixed edge from the direct dependencies of a shadow variable to the shadow variable. (i.e. `e1:Entity.#id.#previous.readyTime` -> `e1:Entity.#id.#startTime`)
- There is a dynamic edge from each shadow variable to all its aliases. (i.e. `e1:Entity.#id.startTime` -> `e2:Entity.#id.#previous.startTime`, if e1 is the previous of e2.)
- Pick a changed node with the minimum topological order that was not visited.
- Update the changed node.
- If the value of the node changed, marked all its children as changed.
-
ClassDescriptionAbstractVariableReferenceGraph<Solution_,
ChangeSet_> Exists to expose read-only view ofTopologicalOrderGraph.Stores a graph node id along its topological order.ChangedVariableNotifier<Solution_>DeclarativeShadowVariableDescriptor<Solution_>DefaultShadowVariableSession<Solution_>DefaultShadowVariableSessionFactory<Solution_>EntityVariablePair<Solution_>EntityVariableUpdaterLookup<Solution_>FixedVariableReferenceGraph<Solution_>RootVariableSource<Entity_,Value_> ShadowVariableLoopedVariableDescriptor<Solution_>VariableReferenceGraphBuilder<Solution_>VariableUpdaterInfo<Solution_>