Package jadex.bdiv3.runtime
Class EasyDeliberationStrategy
- java.lang.Object
-
- jadex.bdiv3.runtime.EasyDeliberationStrategy
-
- All Implemented Interfaces:
IDeliberationStrategy
public class EasyDeliberationStrategy extends java.lang.Object implements IDeliberationStrategy
The easy deliberation strategy.
-
-
Field Summary
Fields Modifier and Type Field Description protected IInternalAccessagentThe agent.protected java.util.Map<jadex.bdiv3.runtime.impl.RGoal,java.util.Set<jadex.bdiv3.runtime.impl.RGoal>>inhibitionsThe set of inhibitors.
-
Constructor Summary
Constructors Constructor Description EasyDeliberationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInhibitor(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal inhibitor)Add an inhibitor to a goal.protected jadex.bdiv3.runtime.impl.RCapabilitygetCapability()Get the capability.protected java.util.Set<jadex.bdiv3.runtime.impl.RGoal>getInhibitions(jadex.bdiv3.runtime.impl.RGoal goal, boolean create)Get or create the inhibition set.IFuture<java.lang.Void>goalIsActive(jadex.bdiv3.runtime.impl.RGoal goal)Called when a goal becomes active.IFuture<java.lang.Void>goalIsAdopted(jadex.bdiv3.runtime.impl.RGoal goal)Called when a goal has been adopted.IFuture<java.lang.Void>goalIsDropped(jadex.bdiv3.runtime.impl.RGoal goal)Called when a goal has been dropped.IFuture<java.lang.Void>goalIsNotActive(jadex.bdiv3.runtime.impl.RGoal goal)Called when a goal is not active any longer (suspended or option).IFuture<java.lang.Void>goalIsOption(jadex.bdiv3.runtime.impl.RGoal goal)Called when a goal becomes an option.protected voidinhibitGoal(jadex.bdiv3.runtime.impl.RGoal goal)Inhibit a goal by making it an option.protected booleaninhibits(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)Test if this goal inhibits the other.voidinit(IInternalAccess agent)Init the strategy.protected booleanisInhibited(jadex.bdiv3.runtime.impl.RGoal goal)Test if goal is inhibited.protected booleanisInhibitedBy(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)Test if goal is inhibited by another goal.protected voidreactivateGoal(jadex.bdiv3.runtime.impl.RGoal goal)(Re)activate a goal.protected voidremoveInhibitor(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal inhibitor)Remove an inhibitor from a goal.
-
-
-
Field Detail
-
agent
protected IInternalAccess agent
The agent.
-
inhibitions
protected java.util.Map<jadex.bdiv3.runtime.impl.RGoal,java.util.Set<jadex.bdiv3.runtime.impl.RGoal>> inhibitions
The set of inhibitors.
-
-
Method Detail
-
init
public void init(IInternalAccess agent)
Init the strategy.- Specified by:
initin interfaceIDeliberationStrategy- Parameters:
agent- The agent.
-
goalIsAdopted
public IFuture<java.lang.Void> goalIsAdopted(jadex.bdiv3.runtime.impl.RGoal goal)
Called when a goal has been adopted.- Specified by:
goalIsAdoptedin interfaceIDeliberationStrategy- Parameters:
goal- The goal.
-
goalIsDropped
public IFuture<java.lang.Void> goalIsDropped(jadex.bdiv3.runtime.impl.RGoal goal)
Called when a goal has been dropped.- Specified by:
goalIsDroppedin interfaceIDeliberationStrategy- Parameters:
goal- The goal.
-
goalIsOption
public IFuture<java.lang.Void> goalIsOption(jadex.bdiv3.runtime.impl.RGoal goal)
Called when a goal becomes an option.- Specified by:
goalIsOptionin interfaceIDeliberationStrategy- Parameters:
goal- The goal.
-
goalIsActive
public IFuture<java.lang.Void> goalIsActive(jadex.bdiv3.runtime.impl.RGoal goal)
Called when a goal becomes active.- Specified by:
goalIsActivein interfaceIDeliberationStrategy- Parameters:
goal- The goal.
-
goalIsNotActive
public IFuture<java.lang.Void> goalIsNotActive(jadex.bdiv3.runtime.impl.RGoal goal)
Called when a goal is not active any longer (suspended or option).- Specified by:
goalIsNotActivein interfaceIDeliberationStrategy- Parameters:
goal- The goal.
-
addInhibitor
public void addInhibitor(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal inhibitor)Add an inhibitor to a goal.
-
inhibitGoal
protected void inhibitGoal(jadex.bdiv3.runtime.impl.RGoal goal)
Inhibit a goal by making it an option.
-
removeInhibitor
protected void removeInhibitor(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal inhibitor)Remove an inhibitor from a goal.
-
reactivateGoal
protected void reactivateGoal(jadex.bdiv3.runtime.impl.RGoal goal)
(Re)activate a goal.
-
isInhibited
protected boolean isInhibited(jadex.bdiv3.runtime.impl.RGoal goal)
Test if goal is inhibited.
-
isInhibitedBy
protected boolean isInhibitedBy(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)Test if goal is inhibited by another goal.
-
inhibits
protected boolean inhibits(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)Test if this goal inhibits the other.
-
getCapability
protected jadex.bdiv3.runtime.impl.RCapability getCapability()
Get the capability.
-
getInhibitions
protected java.util.Set<jadex.bdiv3.runtime.impl.RGoal> getInhibitions(jadex.bdiv3.runtime.impl.RGoal goal, boolean create)Get or create the inhibition set.
-
-