Annotation Interface PlanningEntity
- Genuine entity
- Must have at least 1 genuine
planning variable, and 0 or more shadow variables. - Shadow entity
- Must have at least 1 shadow variable, and no genuine variables.
The class should have a public no-arg constructor, so it can be cloned
(unless the PlanningSolution.solutionCloner() is specified).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfaceDeprecated, for removal: This API element is subject to removal in a future version.static interfaceDeprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofPlanningEntity.NullComparatorFactory.static interfaceDeprecated, for removal: This API element is subject to removal in a future version.Prefer usingPlanningPin. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends Comparator>Allows sorting a collection of planning entities for this variable.Class<? extends ComparatorFactory>TheComparatorFactoryalternative forcomparatorClass().Class<? extends Comparator>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorClass().Class<? extends SelectionSorterWeightFactory>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorFactoryClass().Class<? extends PinningFilter>Deprecated, for removal: This API element is subject to removal in a future version.Prefer usingPlanningPin.
-
Element Details
-
comparatorClass
Class<? extends Comparator> comparatorClassAllows sorting a collection of planning entities for this variable. Some algorithms perform better when the entities are sorted based on specific metrics.The
Comparatorshould sort the data in ascending order. For example, prioritize three vehicles by sorting them based on their capacity: Vehicle C (4 people), Vehicle A (6 people), Vehicle B (32 people)Do not use together with
comparatorFactoryClass().- Returns:
PlanningVariable.NullComparatorwhen it is null (workaround for annotation limitation)- See Also:
- Default:
- ai.timefold.solver.core.api.domain.entity.PlanningEntity.NullComparator.class
-
comparatorFactoryClass
Class<? extends ComparatorFactory> comparatorFactoryClassTheComparatorFactoryalternative forcomparatorClass().Differs from
comparatorClass()because it allows accessing the current solution when creating the comparator.Do not use together with
comparatorClass().- Returns:
PlanningEntity.NullComparatorFactorywhen it is null (workaround for annotation limitation)- See Also:
- Default:
- ai.timefold.solver.core.api.domain.entity.PlanningEntity.NullComparatorFactory.class
-
pinningFilter
Deprecated, for removal: This API element is subject to removal in a future version.Prefer usingPlanningPin.A pinned planning entity is never changed during planning, this is useful in repeated planning use cases (such as continuous planning and real-time planning). This applies to all the planning variables of this planning entity.The method
PinningFilter.accept(Object, Object)returns false if the selection entity is pinned and it returns true if the selection entity is movable- Returns:
PlanningEntity.NullPinningFilterwhen it is null (workaround for annotation limitation)
- Default:
- ai.timefold.solver.core.api.domain.entity.PlanningEntity.NullPinningFilter.class
-
difficultyComparatorClass
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorClass().Allows a collection of planning entities to be sorted by difficulty. A difficultyWeight estimates how hard is to plan a certain PlanningEntity. Some algorithms benefit from planning on more difficult planning entities first/last or from focusing on them.The
Comparatorshould sort in ascending difficulty (even though many optimization algorithms will reverse it). For example: sorting 3 processes on difficultly based on their RAM usage requirement: Process B (1GB RAM), Process A (2GB RAM), Process C (7GB RAM),Do not use together with
difficultyWeightFactoryClass().- Returns:
PlanningEntity.NullDifficultyComparatorwhen it is null (workaround for annotation limitation)- See Also:
- Default:
- ai.timefold.solver.core.api.domain.entity.PlanningEntity.NullDifficultyComparator.class
-
difficultyWeightFactoryClass
@Deprecated(forRemoval=true, since="1.28.0") Class<? extends SelectionSorterWeightFactory> difficultyWeightFactoryClassDeprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorFactoryClass().TheSelectionSorterWeightFactoryalternative fordifficultyComparatorClass().Do not use together with
difficultyComparatorClass().- Returns:
PlanningEntity.NullDifficultyWeightFactorywhen it is null (workaround for annotation limitation)- See Also:
- Default:
- ai.timefold.solver.core.api.domain.entity.PlanningEntity.NullDifficultyWeightFactory.class
-
PlanningEntity.NullComparator.