public class EasyDeliberationStrategy extends java.lang.Object implements IDeliberationStrategy
Modifier and Type | Field and Description |
---|---|
protected IInternalAccess |
agent
The agent.
|
protected java.util.Map<RGoal,java.util.Set<RGoal>> |
inhibitions
The set of inhibitors.
|
Constructor and Description |
---|
EasyDeliberationStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
addInhibitor(RGoal goal,
RGoal inhibitor)
Add an inhibitor to a goal.
|
protected RCapability |
getCapability()
Get the capability.
|
protected java.util.Set<RGoal> |
getInhibitions(RGoal goal,
boolean create)
Get or create the inhibition set.
|
protected java.util.Set<RGoal> |
getInhibitors(RGoal goal)
Get the inhibitors.
|
protected RuleSystem |
getRuleSystem()
Get the rule system.
|
IFuture<java.lang.Void> |
goalIsActive(RGoal goal)
Called when a goal becomes active.
|
IFuture<java.lang.Void> |
goalIsAdopted(RGoal goal)
Called when a goal has been adopted.
|
IFuture<java.lang.Void> |
goalIsNotActive(RGoal goal)
Called when a goal is not active any longer (suspended or option).
|
IFuture<java.lang.Void> |
goalIsOption(RGoal goal)
Called when a goal becomes an option.
|
protected void |
inhibitGoal(RGoal goal)
Inhibit a goal by making it an option.
|
protected boolean |
inhibits(RGoal goal,
RGoal other)
Test if this goal inhibits the other.
|
void |
init(IInternalAccess agent)
Init the strategy.
|
protected boolean |
isInhibited(RGoal goal)
Test if goal is inhibited.
|
protected boolean |
isInhibitedBy(RGoal goal,
RGoal other)
Test if goal is inhibited by another goal.
|
protected void |
reactivateGoal(RGoal goal)
(Re)activate a goal.
|
protected void |
removeInhibitor(RGoal goal,
RGoal inhibitor)
Remove an inhibitor from a goal.
|
protected IInternalAccess agent
protected java.util.Map<RGoal,java.util.Set<RGoal>> inhibitions
public void init(IInternalAccess agent)
init
in interface IDeliberationStrategy
agent
- The agent.public IFuture<java.lang.Void> goalIsAdopted(RGoal goal)
goalIsAdopted
in interface IDeliberationStrategy
goal
- The goal.public IFuture<java.lang.Void> goalIsOption(RGoal goal)
goalIsOption
in interface IDeliberationStrategy
goal
- The goal.public IFuture<java.lang.Void> goalIsActive(RGoal goal)
goalIsActive
in interface IDeliberationStrategy
goal
- The goal.public IFuture<java.lang.Void> goalIsNotActive(RGoal goal)
goalIsNotActive
in interface IDeliberationStrategy
goal
- The goal.public void addInhibitor(RGoal goal, RGoal inhibitor)
protected void inhibitGoal(RGoal goal)
protected void removeInhibitor(RGoal goal, RGoal inhibitor)
protected void reactivateGoal(RGoal goal)
protected boolean isInhibited(RGoal goal)
protected boolean isInhibitedBy(RGoal goal, RGoal other)
protected boolean inhibits(RGoal goal, RGoal other)
protected java.util.Set<RGoal> getInhibitors(RGoal goal)
protected RuleSystem getRuleSystem()
protected RCapability getCapability()
protected java.util.Set<RGoal> getInhibitions(RGoal goal, boolean create)