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 booleanFlag to save first exceptions.protected IDeliberationStrategyThe 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 TypeMethodDescriptionvoidAdd a new goal.voidAdd a new plan.booleancontainsGoal(Object goal) Test if a goal is contained.protected voiddetermineValid(RPlan plan, RPlan orig, StringBuffer buf) protected voidprotected voidprotected voidprotected voidstatic StringgetBeautifiedName(String name) Get beautified element name.static StringgetCapabilityPart(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 StringgetNamePart(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.voidremoveGoal(RGoal goal) Remove a goal.voidremovePlan(RPlan plan) Remove a plan.voidThe deliberationStrategy to set.voidsetGoals(Collection<RGoal> goals) Set the goals.voidsetPlans(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.
-