|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.AbstractSequentialList<E>
java.util.LinkedList<T>
clarion.system.AbstractIntermediateModule<Goal>
clarion.system.GoalStructure
public class GoalStructure
This class implements the goal structure within CLARION. It extends the AbstractIntermediateModule class. Conceptually, this system exists on the top level of the MS. However, implementationally it is logical to specify it as an intermediate module since it is used by several subsystems. Therefore, in the CLARION Library, the goal structure is contained within the CLARION class.
Usage:
The goal structure's main function is to act as a container for the goals within CLARION. In addition to containing methods for adding and removing items from the goal list, it also keeps track of all of the possible goals that can be set and has a method for getting the current goal.
It is EXTREMELY important that you only manipulate the goal structure using the add and remove methods that have been overridden by this class.
Currently this is simply a container for the goal list.
This class contains both global (static) and local constants. The default is to use the local constants. If you want to change any of the global constants, you need to do so before any instances of this class are initialized.
Field Summary | |
---|---|
static int |
GLOBAL_GOAL_LIST_CAPACITY
The number of slots in the goal list. |
int |
GOAL_LIST_CAPACITY
The number of slots in the goal list. |
private GoalCollection |
PossibleGoals
All of the possible Goals that can be added to the goal structure. |
private static long |
serialVersionUID
|
Fields inherited from class clarion.system.AbstractIntermediateModule |
---|
InputSpace |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
GoalStructure(CLARION Agent)
Initializes the goal structure. |
Method Summary | |
---|---|
boolean |
add(Goal G)
Adds a goal to the goal list. |
boolean |
addAll(java.util.Collection<? extends Goal> G)
Adds a collection of goals to the goal structure. |
boolean |
addPossibleGoal(Goal G)
Adds a goal to the list of possible goals. |
boolean |
addPossibleGoals(java.util.Collection<Goal> Goals)
Adds a collection of goals to the list of possible goals. |
protected void |
attachSelfToAgent(CLARION Agent)
Attaches the goal structure to the specified CLARION agent. |
Goal |
getCurrentGoal()
Gets the current goal. |
int |
getNumPossibleGoals()
Gets the number of possible goals. |
java.util.Collection<Goal> |
getPossibleGoals()
Gets a collection of the possible goals. |
Goal |
remove(int Index)
Removes a goal from the goal list. |
boolean |
remove(java.lang.Object G)
Removes the goal object from the goal list. |
Methods inherited from class clarion.system.AbstractIntermediateModule |
---|
updateInputSpace |
Methods inherited from class java.util.LinkedList |
---|
add, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, removeFirst, removeLast, set, size, toArray, toArray |
Methods inherited from class java.util.AbstractSequentialList |
---|
iterator |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, isEmpty, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList |
Field Detail |
---|
private static final long serialVersionUID
public static int GLOBAL_GOAL_LIST_CAPACITY
public int GOAL_LIST_CAPACITY
private GoalCollection PossibleGoals
Constructor Detail |
---|
public GoalStructure(CLARION Agent)
Agent
- The agent to which the goal structure is being attached.Method Detail |
---|
public Goal getCurrentGoal()
public boolean add(Goal G) throws FullContainerException, java.lang.IllegalArgumentException
If you want to add a new goal to the list of possible goals in the goal structure, call the addPossibleGoal method.
add
in interface java.util.Collection<Goal>
add
in interface java.util.List<Goal>
add
in class java.util.LinkedList<Goal>
G
- The goal to add.
FullContainerException
- If the goal structure is full.
java.lang.IllegalArgumentException
- If the input space does not contain all of the dimension-value
pairs specified in the goal.public boolean addAll(java.util.Collection<? extends Goal> G)
addAll
in interface java.util.Collection<Goal>
addAll
in interface java.util.List<Goal>
addAll
in class java.util.LinkedList<Goal>
G
- The goals to add.
public Goal remove(int Index)
remove
in interface java.util.List<Goal>
remove
in class java.util.LinkedList<Goal>
Index
- The index of the goal to remove.
public boolean remove(java.lang.Object G)
remove
in interface java.util.Collection<Goal>
remove
in interface java.util.List<Goal>
remove
in class java.util.LinkedList<Goal>
G
- The goal to remove.
public int getNumPossibleGoals()
public java.util.Collection<Goal> getPossibleGoals()
public boolean addPossibleGoal(Goal G)
Remember that the input layer of an implicit module or rule in the ACS must contain nodes for all dimension-value pairs contained within any of the possible goals you wish to have as input into the network or rule condition.
G
- The possible goal to add.
public boolean addPossibleGoals(java.util.Collection<Goal> Goals)
Remember that the input layer of an implicit module or rule in the ACS must contain nodes for all dimension-value pairs contained within any of the possible goals you wish to have as input into the network or rule condition.
Goals
- The collection of possible goals to add.
protected void attachSelfToAgent(CLARION Agent)
attachSelfToAgent
in class AbstractIntermediateModule<Goal>
Agent
- The agent to wish this goal structure will be attached.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |