org.eclipse.amp.axf.sd.model
Class AbstractVariable
java.lang.Object
org.eclipse.amp.axf.sd.model.AbstractVariable
- Direct Known Subclasses:
- AbstractStock
public abstract class AbstractVariable
- extends java.lang.Object
- Author:
- fei
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractVariable
public AbstractVariable()
getIntegrationMethod
protected static EulerIntegration getIntegrationMethod()
init
public void init(AbstractSDModel parentModel)
getParent
public AbstractSDModel getParent()
calculate
public final double calculate(int time)
- Returns:
- the calculated value
equation
protected abstract double equation()
- Returns:
- the equation that calculates the value of this variable
startSimulation
public void startSimulation()
- This method is called before the simulation starts.
getCurrentTime
public int getCurrentTime()
setCurrentTime
public void setCurrentTime(int currentTime)
- This method should be called before the calculation of this variable takes place.
- Parameters:
currentTime
-
getSimResult
public SimResult getSimResult()