Package jadex.bdi.runtime.impl
Class RCapability
java.lang.Object
jadex.bdi.runtime.impl.RElement
jadex.bdi.runtime.impl.RCapability
Runtime element for storing goal and plan instances.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map
<Class<?>, Collection<RGoal>> The goals by goal type (class or string).protected static final boolean
Flag to save first exceptions.protected IDeliberationStrategy
The deliberation strategy.The map of exceptions.protected Collection
<RGoal> The goals.protected Map
<MGoal, Collection<RGoal>> The goals by model element.protected Map
<MPlan, Collection<RPlan>> The plans by model element.protected Collection
<RPlan> The plans.Fields inherited from class jadex.bdi.runtime.impl.RElement
cnt, id, modelelement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new goal.void
Add a new plan.boolean
containsGoal
(Object goal) Test if a goal is contained.protected void
determineValid
(RPlan plan, RPlan orig, StringBuffer buf) protected void
protected void
protected void
protected void
static String
getBeautifiedName
(String name) Get beautified element name.static String
getCapabilityPart
(String name) Get the capability part of a complex element name.getGoals()
Get the goals.Get goals of a specific pojo type.Get goals of a specific pojo type.static String
getNamePart
(String name) Get the name part of a complex element name.getPlans()
Get the plans.Get goals of a specific pojo type.Get the rGoal for a pojogoal.void
removeGoal
(RGoal goal) Remove a goal.void
removePlan
(RPlan plan) Remove a plan.void
The deliberationStrategy to set.void
setGoals
(Collection<RGoal> goals) Set the goals.void
setPlans
(Collection<RPlan> plans) Set the plans.Methods inherited from class jadex.bdi.runtime.impl.RElement
getAgent, getCapability, getCount, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
-
Field Details
-
DEBUG
protected static final boolean DEBUGFlag to save first exceptions.- See Also:
-
ex
The map of exceptions. -
goals
The goals. -
mgoals
The goals by model element. -
cgoals
The goals by goal type (class or string). -
plans
The plans. -
mplans
The plans by model element. -
delstr
The deliberation strategy.
-
-
Constructor Details
-
RCapability
Create a new bdi state.
-
-
Method Details
-
getGoals
Get the goals.- Returns:
- The goals.
-
getGoals
Get goals of a specific pojo type.- Parameters:
type
- The type.- Returns:
- The goals.
-
getGoals
Get goals of a specific pojo type.- Parameters:
type
- The type.- Returns:
- The goals.
-
getRGoal
Get the rGoal for a pojogoal. -
containsGoal
Test if a goal is contained. Goal can be either pojogoal or an IGoal.- Parameters:
type
- The type.- Returns:
- The goals.
-
setGoals
Set the goals.- Parameters:
goals
- The goals to set.
-
addGoal
Add a new goal.- Parameters:
goal
- The goal.
-
removeGoal
Remove a goal.- Parameters:
goal
- The goal.
-
getPlans
Get the plans.- Returns:
- The plans.
-
setPlans
Set the plans.- Parameters:
plans
- The plans to set.
-
getPlans
Get goals of a specific pojo type.- Parameters:
type
- The type.- Returns:
- The goals.
-
addPlan
Add a new plan.- Parameters:
plan
- The plan.
-
removePlan
Remove a plan.- Parameters:
plan
- The plan.
-
setDeliberationStrategy
The deliberationStrategy to set.- Parameters:
delstr
- The deliberationStrategy to set
-
dumpGoalsPeriodically
protected void dumpGoalsPeriodically() -
dumpPlansPeriodically
protected void dumpPlansPeriodically() -
dumpGoals
protected void dumpGoals() -
dumpPlans
protected void dumpPlans() -
determineValid
- Parameters:
plan
-orig
-buf
-
-
getCapabilityPart
Get the capability part of a complex element name. -
getNamePart
Get the name part of a complex element name. -
getBeautifiedName
Get beautified element name.
-