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 IInternalAccess
agent
The agent.protected java.util.Map<jadex.bdiv3.runtime.impl.RGoal,java.util.Set<jadex.bdiv3.runtime.impl.RGoal>>
inhibitions
The set of inhibitors.
-
Constructor Summary
Constructors Constructor Description EasyDeliberationStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInhibitor(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal inhibitor)
Add an inhibitor to a goal.protected jadex.bdiv3.runtime.impl.RCapability
getCapability()
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 void
inhibitGoal(jadex.bdiv3.runtime.impl.RGoal goal)
Inhibit a goal by making it an option.protected boolean
inhibits(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)
Test if this goal inhibits the other.void
init(IInternalAccess agent)
Init the strategy.protected boolean
isInhibited(jadex.bdiv3.runtime.impl.RGoal goal)
Test if goal is inhibited.protected boolean
isInhibitedBy(jadex.bdiv3.runtime.impl.RGoal goal, jadex.bdiv3.runtime.impl.RGoal other)
Test if goal is inhibited by another goal.protected void
reactivateGoal(jadex.bdiv3.runtime.impl.RGoal goal)
(Re)activate a goal.protected void
removeInhibitor(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:
init
in 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:
goalIsAdopted
in 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:
goalIsDropped
in 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:
goalIsOption
in 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:
goalIsActive
in 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:
goalIsNotActive
in 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.
-
-