Annotation Interface PlanningEntity
PlanningVariable
property.
The class should have a public no-arg constructor, so it can be cloned
(unless the PlanningSolution.solutionCloner()
is specified).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Workaround for annotation limitation indifficultyComparatorClass()
.static interface
Workaround for annotation limitation indifficultyWeightFactoryClass()
.static interface
Workaround for annotation limitation inpinningFilter()
()}. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<? extends Comparator>
Allows a collection of planning entities to be sorted by difficulty.Class<? extends SelectionSorterWeightFactory>
TheSelectionSorterWeightFactory
alternative fordifficultyComparatorClass()
.Class<? extends PinningFilter>
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).
-
Element Details
-
pinningFilter
Class<? extends PinningFilter> pinningFilterA 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. To pin individual variables, see https://issues.redhat.com/browse/PLANNER-124
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.NullPinningFilter
when it is null (workaround for annotation limitation)
- Default:
- org.optaplanner.core.api.domain.entity.PlanningEntity.NullPinningFilter.class
-
difficultyComparatorClass
Class<? extends Comparator> difficultyComparatorClassAllows 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
Comparator
should 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.NullDifficultyComparator
when it is null (workaround for annotation limitation)- See Also:
- Default:
- org.optaplanner.core.api.domain.entity.PlanningEntity.NullDifficultyComparator.class
-
difficultyWeightFactoryClass
Class<? extends SelectionSorterWeightFactory> difficultyWeightFactoryClassTheSelectionSorterWeightFactory
alternative fordifficultyComparatorClass()
.Do not use together with
difficultyComparatorClass()
.- Returns:
PlanningEntity.NullDifficultyWeightFactory
when it is null (workaround for annotation limitation)- See Also:
- Default:
- org.optaplanner.core.api.domain.entity.PlanningEntity.NullDifficultyWeightFactory.class
-