Class DefaultMoveStreamFactory<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.move.streams.DefaultMoveStreamFactory<Solution_>
- All Implemented Interfaces:
MoveStreamFactory<Solution_>
@NullMarked
public final class DefaultMoveStreamFactory<Solution_>
extends Object
implements MoveStreamFactory<Solution_>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSession(Solution_ workingSolution, SupplyManager supplyManager) <A> UniDataStream<Solution_,A> Start aConstraintStreamof all instances of the sourceClass that are known asproblem factsorplanning entities.<A> UniDataStream<Solution_,A> enumerateIncludingPinned(Class<A> sourceClass) Start aConstraintStreamof all instances of the sourceClass that are known asproblem factsorplanning entities.<Entity_,A>
UniDataStream<Solution_,A> enumeratePossibleValues(PlanningVariableMetaModel<Solution_, Entity_, A> variableMetaModel) Enumerate possible values for a given basic variable.<A> UniMoveStream<Solution_,A> pick(UniDataStream<Solution_, A> dataStream) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.move.streams.maybeapi.stream.MoveStreamFactory
enumeratePossiblePositions, pick
-
Constructor Details
-
DefaultMoveStreamFactory
-
-
Method Details
-
createSession
public DefaultMoveStreamSession<Solution_> createSession(Solution_ workingSolution, SupplyManager supplyManager) -
enumerate
Description copied from interface:MoveStreamFactoryStart aConstraintStreamof all instances of the sourceClass that are known asproblem factsorplanning entities.If the sourceClass is a
PlanningEntity, then it is automaticallyfilteredto only contain entities which are pinned.If the sourceClass is a shadow entity (an entity without any genuine planning variables), and if there exists a genuine
PlanningEntitywith aPlanningListVariablewhich accepts instances of this shadow entity as values in that list, then this stream will filter out all sourceClass instances which are pinned in that list.This stream returns genuine entities regardless of whether they have any null genuine planning variables. This stream returns shadow entities regardless of whether they are assigned to any genuine entity. They can easily be
filtered out.- Specified by:
enumeratein interfaceMoveStreamFactory<Solution_>- Returns:
- A stream containing a tuple for each of the entities as described above.
- See Also:
-
enumerateIncludingPinned
Description copied from interface:MoveStreamFactoryStart aConstraintStreamof all instances of the sourceClass that are known asproblem factsorplanning entities. If the sourceClass is a genuine or shadow entity, it returns instances regardless of their pinning status. Otherwise as defined byMoveStreamFactory.enumerate(Class).- Specified by:
enumerateIncludingPinnedin interfaceMoveStreamFactory<Solution_>
-
enumeratePossibleValues
public <Entity_,A> UniDataStream<Solution_,A> enumeratePossibleValues(PlanningVariableMetaModel<Solution_, Entity_, A> variableMetaModel) Description copied from interface:MoveStreamFactoryEnumerate possible values for a given basic variable. If the variable allows unassigned values, the resulting stream will include a null value.- Specified by:
enumeratePossibleValuesin interfaceMoveStreamFactory<Solution_>- Returns:
- data stream with all possible values of a given variable
- See Also:
-
pick
- Specified by:
pickin interfaceMoveStreamFactory<Solution_>
-
getSolutionDescriptor
-