|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--pilot.Situations
| Field Summary | |
protected java.util.Vector |
constraints_
The contraints define the begin and end values of the controls for a situation. |
protected int |
currentIndex_
Because of the sliding window of situations, this property is needed to pinpoint the index of the current situation. |
protected java.util.Vector |
names_
This vector contains the names of the situations. |
protected java.util.Vector[] |
situationValues_
This array of vectors maintains the values of the situation certainties. |
protected java.util.Vector |
tempSituation_
This method is accessed by Jess to set the current situation. |
protected int |
windowSize_
The window size determines the number of past situations that are maintained. |
| Constructor Summary | |
Situations()
This constructor sets the default window size and initiates the properties of this class. |
|
Situations(int ws)
This constructor sets a specific window size and initiates the properties of this class. |
|
| Method Summary | |
void |
addConstaints(java.util.Vector constraints)
|
void |
addName(java.lang.String name)
The method addName adds a new situation to the list of situation names. |
void |
addSituationValues(java.util.Vector situation)
The method addSituationValue appends a situation vector to the window of situations. |
void |
addValueToTempSituation(java.lang.String name,
java.lang.String value)
The method addValueToTempSituation sets a value in the temporary Situation vector. |
java.lang.String |
constructRule(java.lang.String name,
java.lang.String constraint,
java.lang.String type)
The method constructRule creates a defrule for Jess. |
java.util.Vector |
getConstraints()
The method getConstraints returns all the contraints of all the situations. |
int |
getCurrentIndex()
The method getCurrentIndex returns the index of the current situation. |
int |
getNameIndex(java.lang.String name)
The method getNameIndex returns the index of a situation. |
java.util.Vector |
getNames()
The method getNames returns a vector with the situation names. |
java.util.Vector[] |
getSituationValues()
This method getSituationValues returns the complete array of situation vectors. |
java.util.Vector |
getSituationValues(int index)
This method getSituationValues returns a specific situation in the array of situations. |
java.util.Vector |
getTempSituation()
The method getTempSituation returns the temporary Situation vector. |
int |
getWindowSize()
The method getWindowSize returns the value of the window size of this class. |
java.lang.String[] |
parseBeginEndString(java.util.Vector constraints)
The method parseBeginEndString parses the constraints to a string in Jess format. |
java.util.Vector |
parseConstraintRules()
The method parseConstraintRules parses all the constraints to rules in Jess format |
void |
resetTempSituation()
The method resetTempSituation resets the temporary Situation vector. |
void |
setConstraints(java.util.Vector constraints)
The method setConstraints sets the begin and end constraints of all the situations. |
void |
setCurrentIndex(int index)
The method setCurrentIndex sets the index that determines the current situation. |
void |
setNames(java.util.Vector names)
The method setNames sets the vector of situation names. |
void |
setSituationValues(int index,
java.util.Vector situation)
This method setSituationsValues sets one situation vector in the array of situations. |
void |
setSituationValues(java.util.Vector[] situations)
This method setSituationValues sets the complete array of situation vectors. |
void |
setTempSituation(java.util.Vector temp)
The method setTempSituation sets the temporary Situation vector. |
void |
setWindowSize(int ws)
The method setWindowSize sets the value of the property windowSize_. |
int |
size()
The method size returns the number of situations that are maintained by an object of this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int windowSize_
protected java.util.Vector names_
protected java.util.Vector[] situationValues_
protected java.util.Vector constraints_
protected int currentIndex_
protected java.util.Vector tempSituation_
| Constructor Detail |
public Situations()
public Situations(int ws)
ws - The value of the desired window size| Method Detail |
public void setWindowSize(int ws)
setWindowSize in interface StatesAndSituationsws - The value of the desired window sizepublic int getWindowSize()
getWindowSize in interface StatesAndSituationspublic void setNames(java.util.Vector names)
setNames in interface StatesAndSituationsnames - The vector with situation names.public java.util.Vector getNames()
getNames in interface StatesAndSituationspublic void addName(java.lang.String name)
addName in interface StatesAndSituationsname - The name of the situationpublic void setSituationValues(java.util.Vector[] situations)
situations - The array of values for the situation vectors.
public void setSituationValues(int index,
java.util.Vector situation)
index - The index of the situation.situations - The situations vector.public java.util.Vector[] getSituationValues()
public java.util.Vector getSituationValues(int index)
index - The index value of the requested situation.public void addSituationValues(java.util.Vector situation)
situation - The situation vector.public void setCurrentIndex(int index)
index - The index of the current situation.public int getCurrentIndex()
public int size()
size in interface StatesAndSituationspublic int getNameIndex(java.lang.String name)
name - The name of the situation.public void setTempSituation(java.util.Vector temp)
temp - The temporary situation vectorpublic java.util.Vector getTempSituation()
public void resetTempSituation()
public void addValueToTempSituation(java.lang.String name,
java.lang.String value)
name - The name of the situation.value - The value of the situation.public void setConstraints(java.util.Vector constraints)
constraints - The vector of all constraints.public java.util.Vector getConstraints()
public void addConstaints(java.util.Vector constraints)
public java.util.Vector parseConstraintRules()
public java.lang.String[] parseBeginEndString(java.util.Vector constraints)
constraints - A vector with constraints.
public java.lang.String constructRule(java.lang.String name,
java.lang.String constraint,
java.lang.String type)
name - The name of the situation.constraint - A string defining the constraints.type - The type is either start or end.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||