org.simulator.math.odes
Class EventInProgress

java.lang.Object
  extended by org.simulator.math.odes.EventInProgress
Direct Known Subclasses:
SBMLEventInProgress

public class EventInProgress
extends Object

This class represents a compilation of the values and execution times during simulation concerning events.

Version:
$Rev: 203 $
Author:
Roland Keller

Field Summary
protected  Map<Integer,Double> assignments
           
protected  LinkedList<Double> execTimes
           
protected  boolean fired
           
protected  double lastTimeExecuted
           
protected  double lastTimeFired
           
protected  double lastTimeRecovered
           
protected  LinkedList<Double[]> values
           
 
Constructor Summary
EventInProgress(boolean fired)
          Creates a new EventInProcess with the given boolean value indicating whether or not it can fire at the initial time point.
 
Method Summary
 void aborted(double time)
          The event has been aborted between trigger and execution.
 void addAssignment(int index, double value)
          Adds an event assignment.
 void addValues(Double[] values, double time)
          The event associated with this class has been triggered.
 void clearAssignments()
          Clears all event assignments.
 void executed(double time)
          The event associated with this class has been executed therefore reset some values.
 void fired(double time)
          Associated event has triggered therefore current value of fired to true
 Map<Integer,Double> getAssignments()
          Returns all event assignments as a map.
 boolean getFireStatus(double time)
          Returns a boolean value indication if the associated event has recently been triggered / fired
 double getLastTimeExecuted()
          Returns the last time the event has been executed.
 double getLastTimeFired()
          Returns the last time the event has been fired.
 double getTime()
          Return the next time of execution of the associated event.
 Double[] getValues()
          Return the values used in the next execution of the associated event.
 boolean hasExecutionTime()
          Returns true if the event is supposed to be executed at some time.
 boolean hasMoreAssignments(double time)
          Checks if this event has still assignments to perform for the given point in time
 void recovered(double time)
          The trigger of the associated event has made a transition from true to false, so the event can be triggered again.
 void refresh(boolean fired)
           
 void refresh(double currentTime)
          Refreshes the status of the event regarding the current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fired

protected boolean fired

lastTimeFired

protected double lastTimeFired

lastTimeRecovered

protected double lastTimeRecovered

lastTimeExecuted

protected double lastTimeExecuted

execTimes

protected LinkedList<Double> execTimes

values

protected LinkedList<Double[]> values

assignments

protected Map<Integer,Double> assignments
Constructor Detail

EventInProgress

public EventInProgress(boolean fired)
Creates a new EventInProcess with the given boolean value indicating whether or not it can fire at the initial time point.

Parameters:
fired -
Method Detail

refresh

public void refresh(boolean fired)
Parameters:
fired -

aborted

public void aborted(double time)
The event has been aborted between trigger and execution. For this class it has the same effect as the event has been executed.


addValues

public void addValues(Double[] values,
                      double time)
The event associated with this class has been triggered. Therefore set the time of execution and the values used at this point in time. Please note that values can be null when the event does not use values from trigger time.

Parameters:
values -
time -

executed

public void executed(double time)
The event associated with this class has been executed therefore reset some values.


fired

public void fired(double time)
Associated event has triggered therefore current value of fired to true


getFireStatus

public boolean getFireStatus(double time)
Returns a boolean value indication if the associated event has recently been triggered / fired

Returns:

getTime

public double getTime()
Return the next time of execution of the associated event.

Returns:

hasExecutionTime

public boolean hasExecutionTime()
Returns true if the event is supposed to be executed at some time.

Returns:

getValues

public Double[] getValues()
Return the values used in the next execution of the associated event.

Returns:

recovered

public void recovered(double time)
The trigger of the associated event has made a transition from true to false, so the event can be triggered again.


hasMoreAssignments

public boolean hasMoreAssignments(double time)
Checks if this event has still assignments to perform for the given point in time

Parameters:
time -
Returns:

getLastTimeFired

public double getLastTimeFired()
Returns the last time the event has been fired.

Returns:

getLastTimeExecuted

public double getLastTimeExecuted()
Returns the last time the event has been executed.

Returns:

refresh

public void refresh(double currentTime)
Refreshes the status of the event regarding the current time.

Parameters:
currentTime -

clearAssignments

public void clearAssignments()
Clears all event assignments.


addAssignment

public void addAssignment(int index,
                          double value)
Adds an event assignment.

Parameters:
index -
value -

getAssignments

public Map<Integer,Double> getAssignments()
Returns all event assignments as a map.

Returns: