RePast
v. 2.0

uchicago.src.sim.engine
Class Parameter

java.lang.Object
  |
  +--uchicago.src.sim.engine.Parameter
Direct Known Subclasses:
NumericParameter

public abstract class Parameter
extends Object

Abstract base class for batch run parameters.


Field Summary
protected  Incrementer incrementer
           
protected  Vector list
           
protected  int listIndex
           
protected  String name
           
protected  long numRuns
           
protected  long numRunsIndex
           
protected  Parameter parent
           
protected  Vector subParams
           
protected  long subRuns
           
 
Constructor Summary
Parameter()
           
 
Method Summary
 void addChild(Parameter subParam)
          Adds a Parameter to this parameter as a child.
 Vector getChildren()
          Gets the children of this parameter.
 String getName()
          Gets the name of this parameter.
 long getNumRuns()
          Gets the number of runs associated with this Parameter.
 Parameter getParent()
          Gets the parent parameter of this parameter
 long getSubRuns()
           
 String getValAsParameterSet()
           
abstract  String getValue()
          Gets the current value of this parameter as a string.
 boolean hasChildren()
          Does this Parameter have any children.
abstract  boolean increment()
          Increments the parameter.
abstract  boolean isComplete()
          Does this parameter have all its necessary values assigned.
abstract  boolean isConstant()
           
 boolean isListParameter()
           
 void removeChild(Parameter p)
          Removes the specified Parameter from this Parameter's list of children.
 void setConstVal(Object o)
           
abstract  void setEnd(Object o)
           
abstract  void setIncr(Object o)
           
 void setList(Vector v)
           
 void setName(String name)
          Sets the name of this to the specified name.
 void setNumRuns(long runs)
          Sets the number of runs associated with this parameter.
 void setParent(Parameter p)
          Sets the parent parameter of this parameter
abstract  void setStart(Object o)
           
 void setSubRuns(long runs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected String name

parent

protected Parameter parent

list

protected Vector list

listIndex

protected int listIndex

subParams

protected Vector subParams

numRunsIndex

protected long numRunsIndex

subRuns

protected long subRuns

numRuns

protected long numRuns

incrementer

protected Incrementer incrementer
Constructor Detail

Parameter

public Parameter()
Method Detail

setParent

public void setParent(Parameter p)
Sets the parent parameter of this parameter


getParent

public Parameter getParent()
Gets the parent parameter of this parameter


setSubRuns

public void setSubRuns(long runs)

getSubRuns

public long getSubRuns()

setName

public void setName(String name)
Sets the name of this to the specified name.

Parameters:
name - the name of the parameter

getName

public String getName()
Gets the name of this parameter.


isComplete

public abstract boolean isComplete()
Does this parameter have all its necessary values assigned.

Returns:
true if this Parameter is complete, otherwise false.

addChild

public void addChild(Parameter subParam)
Adds a Parameter to this parameter as a child.

Parameters:
subParam - the parameter to add

getChildren

public Vector getChildren()
Gets the children of this parameter.


hasChildren

public boolean hasChildren()
Does this Parameter have any children.

Returns:
true if this Parameter has children, otherwise false.

removeChild

public void removeChild(Parameter p)
Removes the specified Parameter from this Parameter's list of children.


setNumRuns

public void setNumRuns(long runs)
Sets the number of runs associated with this parameter.


getNumRuns

public long getNumRuns()
Gets the number of runs associated with this Parameter.


setList

public void setList(Vector v)

isListParameter

public boolean isListParameter()

setConstVal

public void setConstVal(Object o)

getValAsParameterSet

public String getValAsParameterSet()

increment

public abstract boolean increment()
Increments the parameter.

Returns:
true if the parameter can be incremented (hasn't reached its limit condition and false if cannot.

getValue

public abstract String getValue()
Gets the current value of this parameter as a string. Used to write a run's parameters to a file, and set the model to the current parameter.

Returns:
the current value of this parameter

isConstant

public abstract boolean isConstant()

setStart

public abstract void setStart(Object o)

setEnd

public abstract void setEnd(Object o)

setIncr

public abstract void setIncr(Object o)

RePast
v. 2.0

Bug reports and feature requests to RePast