org.drools.planner.api.domain.entity
Annotation Type PlanningEntity


@Target(value=TYPE)
@Retention(value=RUNTIME)
public @interface PlanningEntity

Specifies that the class is a planning entity. Each planning entity must have at least 1 PlanningVariable property.

The class should have a public no-arg constructor, so it can be instantiated by Drools Planner.


Optional Element Summary
 Class<? extends Comparator> difficultyComparatorClass
          Allows a collection of planning entities to be sorted by difficulty.
 Class<? extends PlanningEntityDifficultyWeightFactory> difficultyWeightFactoryClass
          Allows a collection of planning entities to be sorted by difficulty.
 Class<? extends SelectionFilter> movableEntitySelectionFilter
          An immovable planning entity is never changed during planning, this is useful in repeated planning use cases (such as continuous planning and real-time planning).
 

difficultyComparatorClass

public abstract Class<? extends Comparator> difficultyComparatorClass
Allows a collection of planning entities to be sorted by difficulty.

Do not use together with difficultyWeightFactoryClass().

Returns:
PlanningEntity.NullDifficultyComparator when it is null (workaround for annotation limitation)
Default:
org.drools.planner.api.domain.entity.PlanningEntity.NullDifficultyComparator.class

difficultyWeightFactoryClass

public abstract Class<? extends PlanningEntityDifficultyWeightFactory> difficultyWeightFactoryClass
Allows a collection of planning entities to be sorted by difficulty.

Do not use together with difficultyComparatorClass().

Returns:
PlanningEntity.NullDifficultyWeightFactory when it is null (workaround for annotation limitation)
See Also:
PlanningEntityDifficultyWeightFactory
Default:
org.drools.planner.api.domain.entity.PlanningEntity.NullDifficultyWeightFactory.class

movableEntitySelectionFilter

public abstract Class<? extends SelectionFilter> movableEntitySelectionFilter
An immovable 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 make individual variables immovable, see https://issues.jboss.org/browse/JBRULES-3601

The method SelectionFilter.accept(ScoreDirector, Object) returns false if the selection entity is immovable and it returns true if the selection entity is movable

Returns:
PlanningEntity.NullMovableEntitySelectionFilter when it is null (workaround for annotation limitation)
Default:
org.drools.planner.api.domain.entity.PlanningEntity.NullMovableEntitySelectionFilter.class


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.