org.eclipse.amp.axf.sd.model
Class AbstractVariable

java.lang.Object
  extended by org.eclipse.amp.axf.sd.model.AbstractVariable
Direct Known Subclasses:
AbstractStock

public abstract class AbstractVariable
extends java.lang.Object

Author:
fei

Constructor Summary
AbstractVariable()
           
 
Method Summary
 double calculate(int time)
           
protected abstract  double equation()
           
 int getCurrentTime()
           
protected static EulerIntegration getIntegrationMethod()
           
 AbstractSDModel getParent()
           
 SimResult getSimResult()
           
 void init(AbstractSDModel parentModel)
           
 void setCurrentTime(int currentTime)
          This method should be called before the calculation of this variable takes place.
 void startSimulation()
          This method is called before the simulation starts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVariable

public AbstractVariable()
Method Detail

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()