|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<java.lang.Object,Dimension>
clarion.system.DimensionValueCollection
clarion.system.AbstractChunk
clarion.system.AbstractOutputChunk
clarion.system.Goal
public class Goal
This class implements a goal within CLARION. It extends the AbstractOutputChunk class.
Usage:
A goal acts as a directive within CLARION providing both internal instruction for the subsystems within CLARION as well as aiding more directly (e.g. as input into the ACS).
If a goal is activated, then all dimension-value pairs in the goal are also activated. Goals are not required to have dimension-value pairs. However, if you do not specify any dimension-value pairs, the goal cannot be used as input for the subsystems (mainly the ACS).
Note that the dimensions of a goal should have different IDs than the dimensions in the sensory information space otherwise conflicts will arise on the bottom level of the ACS. If a goal has a dimension that has the same ID as a dimension in the sensory information space, then if the goal is activated, the dimension with the same ID in the sensory information space will also be activated. The CLARION library has been implemented in this fashion to prevent the system from crashing in the event that this circumstance occurs.
Field Summary | |
---|---|
private int |
hash
The hash for this object. |
private java.util.LinkedHashMap<java.lang.Object,Value> |
Relevance
The relevance of the drives to this goal. |
private static long |
serialVersionUID
|
private java.util.LinkedHashMap<java.lang.Object,Goal> |
SubGoals
The sub goals related to this goal. |
Fields inherited from class clarion.system.AbstractOutputChunk |
---|
C, D, FULL_ACTIVATION_LEVEL, GLOBAL_C, GLOBAL_D, GLOBAL_FULL_ACTIVATION_LEVEL, GLOBAL_INITIAL_BLA, GLOBAL_MINIMUM_ACTIVATION_THRESHOLD, GLOBAL_PERSISTENCE, INITIAL_BLA, MINIMUM_ACTIVATION_THRESHOLD, PERSISTENCE |
Constructor Summary | |
---|---|
Goal(java.lang.Object id)
Initializes the goal with the ID specified. |
|
Goal(java.lang.Object id,
java.util.Collection<? extends Dimension> dims)
Initializes the goal with the specified ID and dimensions. |
|
Goal(java.lang.Object id,
java.util.Map<? extends java.lang.Object,? extends Dimension> dims)
Initializes the goal with the specified ID and map of dimensions. |
Method Summary | |
---|---|
void |
activateGoal()
Activates the goal by setting all of the dimension-values in the goal to the full activation threshold. |
Goal |
clone()
Clones the goal (including all of it's dimensions). |
void |
deactivateGoal()
Deactivates the goal by setting all of the dimension-values in the goal to the minimum activation threshold. |
Value |
getRelevance(java.lang.Object ID)
Gets the relevance to the goal of the drive with the specified ID. |
java.util.Collection<Goal> |
getSubGoals()
Gets sub goals of this goal. |
int |
hashCode()
|
Dimension |
put(java.lang.Object key,
Dimension dim)
Puts the dimension into the goal as long as the dimension is not already in the goal. |
void |
putAll(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
Puts all of the dimensions in the map into the goal as long as the dimensions are not already in the goal. |
void |
setRelevances(java.util.Collection<Value> Rel)
Sets the relevance to this goal for the drives with IDs equal to the values in the specified collection. |
void |
setSubGoals(java.util.Collection<Goal> subs)
Sets the sub goals for this goal. |
Methods inherited from class clarion.system.AbstractOutputChunk |
---|
addTimeStamp, adjustSelectionMeasure, getActivation, getBLA, getBLSelectionMeasure, getFinalSelectionMeasure, getTLSelectionMeasure, resetActivation, setActivation, setBLSelectionMeasure, setFinalSelectionMeasure, setTLSelectionMeasure |
Methods inherited from class clarion.system.AbstractChunk |
---|
equals, equalsID, getID, toString |
Methods inherited from class clarion.system.DimensionValueCollection |
---|
containsKeys, getNumDVPairs, getValueCollection, size |
Methods inherited from class java.util.LinkedHashMap |
---|
clear, containsValue, get, removeEldestEntry |
Methods inherited from class java.util.HashMap |
---|
containsKey, entrySet, isEmpty, keySet, remove, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
containsKey, entrySet, isEmpty, keySet, remove, values |
Field Detail |
---|
private static final long serialVersionUID
private int hash
private java.util.LinkedHashMap<java.lang.Object,Value> Relevance
private java.util.LinkedHashMap<java.lang.Object,Goal> SubGoals
Constructor Detail |
---|
public Goal(java.lang.Object id)
id
- The ID of the goal.public Goal(java.lang.Object id, java.util.Collection<? extends Dimension> dims)
id
- The ID of the goal.dims
- The dimensions for the goal.public Goal(java.lang.Object id, java.util.Map<? extends java.lang.Object,? extends Dimension> dims)
id
- The ID of the goal.dims
- The map of dimensions for the goal.Method Detail |
---|
public Dimension put(java.lang.Object key, Dimension dim) throws java.lang.IllegalArgumentException
put
in interface java.util.Map<java.lang.Object,Dimension>
put
in class DimensionValueCollection
key
- The key with which the specified dimension is to be associated. This MUST be the ID
of the specified dimension.dim
- The dimension to add to the goal.
java.lang.IllegalArgumentException
- If the dimension is already in the goal
or the specified key is not the ID of the specified dimension.public void putAll(java.util.Map<? extends java.lang.Object,? extends Dimension> map)
putAll
in interface java.util.Map<java.lang.Object,Dimension>
putAll
in class DimensionValueCollection
map
- The map of dimensions to add.public Value getRelevance(java.lang.Object ID)
ID
- The ID of the drive whose relevance you wish to get.
public void setRelevances(java.util.Collection<Value> Rel)
Relevances are specified as a collection of values where the value ID is equal to the ID of a relevant drive. Only those drives whose relevance has been specified will be considered as being relevant to this goal.
Rel
- A collection of relevances.public java.util.Collection<Goal> getSubGoals()
public void setSubGoals(java.util.Collection<Goal> subs)
subs
- The array of sub goals.public void activateGoal()
public void deactivateGoal()
public int hashCode()
hashCode
in interface java.util.Map<java.lang.Object,Dimension>
hashCode
in class DimensionValueCollection
public Goal clone()
clone
in class AbstractOutputChunk
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |