Modifier and Type | Field and Description |
---|---|
private static long |
IF_NOT_MATCHED_MALUS |
private static Name |
NAME |
private RuleFilter |
ruleFilter |
Constructor and Description |
---|
SimpleFilteredStrategy() |
SimpleFilteredStrategy(RuleFilter p_ruleFilter) |
Modifier and Type | Method and Description |
---|---|
RuleAppCost |
computeCost(RuleApp app,
PosInOccurrence pio,
Goal goal)
Evaluate the cost of a
RuleApp . |
void |
instantiateApp(RuleApp app,
PosInOccurrence pio,
Goal goal,
RuleAppCostCollector collector)
Instantiate an incomplete
RuleApp . |
boolean |
isApprovedApp(RuleApp app,
PosInOccurrence pio,
Goal goal)
Re-Evaluate a
RuleApp . |
boolean |
isStopAtFirstNonCloseableGoal()
|
Name |
name()
returns the name of this element
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
updateStrategySettings
private static final Name NAME
private RuleFilter ruleFilter
private static final long IF_NOT_MATCHED_MALUS
public SimpleFilteredStrategy()
public SimpleFilteredStrategy(RuleFilter p_ruleFilter)
public RuleAppCost computeCost(RuleApp app, PosInOccurrence pio, Goal goal)
RuleApp
.computeCost
in interface Feature
app
- the RuleApppio
- position where app
is to be appliedgoal
- the goal on which app
is to be appliedRuleAppCost
object.
TopRuleAppCost.INSTANCE
indicates
that the rule shall not be applied at all
(it is discarded by the strategy).public boolean isApprovedApp(RuleApp app, PosInOccurrence pio, Goal goal)
RuleApp
. This method is
called immediately before a rule is really appliedisApprovedApp
in interface Strategy
public void instantiateApp(RuleApp app, PosInOccurrence pio, Goal goal, RuleAppCostCollector collector)
Strategy
RuleApp
. This method is
called when the AutomatedRuleApplicationManager
comes across a rule application in which some schema variables
are not yet instantiated, or which is in some other way
incomplete. The strategy then has the opportunity to
return/provide a list of (more) complete rule applications by
feeding them into the provided
RuleAppCostCollector
.instantiateApp
in interface Strategy
public boolean isStopAtFirstNonCloseableGoal()
Strategy
isStopAtFirstNonCloseableGoal
in interface Strategy
true
stop, false
continue on other Goal
s.