uchicago.src.sim.engine
Class NumericParameter
java.lang.Object
|
+--uchicago.src.sim.engine.Parameter
|
+--uchicago.src.sim.engine.NumericParameter
- public class NumericParameter
- extends Parameter
A numeric batch run parameter. NumericParameters are created
by a ParameterReader for
use by a BatchController. Consequently, a user should never need to create one.
A numeric parameter like contains a starting value, an ending value, and an
increment value. At the start of a batch run, the current value of a
NumericParameter is the starting value. At the beginning of the next run,
this starting value is incremented by the increment amount until the
current amount is greater than the ending amount. The parameter space
defined by a NumericParameter is thus inclusive of both the starting and
ending values.
- See Also:
BatchController,
SimInit
|
Method Summary |
String |
getValue()
Returns the current value |
boolean |
increment()
Increments this parameter according to the increment value |
boolean |
isComplete()
Is this parameter complete? Does it have start, end, and increment set. |
boolean |
isConstant()
Returns true if this is constant (if the incrementing value == 0). |
void |
setEnd(double end)
Sets the ending value of this parameter. |
void |
setEnd(Object o)
Sets the ending value to the specified value. |
void |
setIncr(double incr)
Sets the increment value of this parameter. |
void |
setIncr(Object o)
Sets the increment value to the specified value. |
void |
setList(Vector v)
|
void |
setStart(double start)
Sets the start value of this parameter. |
void |
setStart(Object o)
Sets the starting value to the specified value. |
| Methods inherited from class uchicago.src.sim.engine.Parameter |
addChild, getChildren, getName, getNumRuns, getParent, getSubRuns, getValAsParameterSet, hasChildren, isListParameter, removeChild, setConstVal, setName, setNumRuns, setParent, setSubRuns |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumericParameter
public NumericParameter()
setStart
public void setStart(double start)
- Sets the start value of this parameter.
- Parameters:
start - the starting value
setEnd
public void setEnd(double end)
- Sets the ending value of this parameter.
- Parameters:
end - the ending value
setIncr
public void setIncr(double incr)
- Sets the increment value of this parameter.
- Parameters:
incr - the increment value
setStart
public void setStart(Object o)
- Sets the starting value to the specified value. Note: the specified
object must be a Double.
- Specified by:
setStart in class Parameter
- Parameters:
o - the starting Double value
setEnd
public void setEnd(Object o)
- Sets the ending value to the specified value. Note: the specified
object must be a Double.
- Specified by:
setEnd in class Parameter
- Parameters:
o - the ending Double value
setIncr
public void setIncr(Object o)
- Sets the increment value to the specified value. Note: the specified
object must be a Double.
- Specified by:
setIncr in class Parameter
- Parameters:
o - the increment Double value
setList
public void setList(Vector v)
- Overrides:
setList in class Parameter
isComplete
public boolean isComplete()
- Is this parameter complete? Does it have start, end, and increment set.
- Specified by:
isComplete in class Parameter
- Returns:
- true if complete, otherwise false
increment
public boolean increment()
- Increments this parameter according to the increment value
- Specified by:
increment in class Parameter
- Returns:
- true if value after incrementing is <= end value, otherwise
false
getValue
public String getValue()
- Returns the current value
- Specified by:
getValue in class Parameter
- Returns:
- the current value of this parameter
isConstant
public boolean isConstant()
- Returns true if this is constant (if the incrementing value == 0).
- Specified by:
isConstant in class Parameter
Bug reports and feature requests to RePast