public class EasyDeliberationStrategy extends java.lang.Object implements IDeliberationStrategy
Modifier and Type | Field and Description |
---|---|
protected jadex.bridge.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.
|
jadex.commons.future.IFuture<java.lang.Void> |
goalIsActive(RGoal goal)
Called when a goal becomes active.
|
jadex.commons.future.IFuture<java.lang.Void> |
goalIsAdopted(RGoal goal)
Called when a goal has been adopted.
|
jadex.commons.future.IFuture<java.lang.Void> |
goalIsDropped(RGoal goal)
Called when a goal has been dropped.
|
jadex.commons.future.IFuture<java.lang.Void> |
goalIsNotActive(RGoal goal)
Called when a goal is not active any longer (suspended or option).
|
jadex.commons.future.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(jadex.bridge.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.
|
public void init(jadex.bridge.IInternalAccess agent)
init
in interface IDeliberationStrategy
agent
- The agent.public jadex.commons.future.IFuture<java.lang.Void> goalIsAdopted(RGoal goal)
goalIsAdopted
in interface IDeliberationStrategy
goal
- The goal.public jadex.commons.future.IFuture<java.lang.Void> goalIsDropped(RGoal goal)
goalIsDropped
in interface IDeliberationStrategy
goal
- The goal.public jadex.commons.future.IFuture<java.lang.Void> goalIsOption(RGoal goal)
goalIsOption
in interface IDeliberationStrategy
goal
- The goal.public jadex.commons.future.IFuture<java.lang.Void> goalIsActive(RGoal goal)
goalIsActive
in interface IDeliberationStrategy
goal
- The goal.public jadex.commons.future.IFuture<java.lang.Void> goalIsNotActive(RGoal goal)
goalIsNotActive
in interface IDeliberationStrategy
goal
- The goal.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 RCapability getCapability()