Simulation Core Library

org.simulator.sbml.astnode
Class RuleValue

java.lang.Object
  extended by org.simulator.sbml.astnode.RuleValue
Direct Known Subclasses:
AssignmentRuleValue, RateRuleValue

public class RuleValue
extends Object

This class can compute and store the value of a rule together with the variable of the rule.

Version:
$Rev: 454 $
Author:
Roland Keller

Field Summary
protected  int compartmentIndex
          The index of the compartment of the species (if applicable)
protected  boolean hasOnlySubstanceUnits
          The hasOnlySubstanceUnits attribute of the species (if applicable)
protected  boolean hasZeroSpatialDimensions
          This flag is true if the variable is a species and its compartment has no spatial dimensions
protected  int index
          The index of the variable in the Y vector of the value holder
protected  boolean isSetInitialAmount
          The isSetInitialAmount attribute of the species (if applicable)
protected  boolean isSetInitialConcentration
          The isSetInitialConcentration attribute of the species (if applicable)
protected  boolean isSpecies
          Flag that is true if the variable is referring to a species, otherwise false
protected  ASTNodeValue nodeObject
          Object that refers to the math of the rule
protected  double value
          The calculated value of the rul
protected  SBMLValueHolder valueHolder
          The value holder that stores the current simulation results
 
Constructor Summary
RuleValue(ASTNodeValue nodeObject, int index)
           
RuleValue(ASTNodeValue nodeObject, int index, Species sp, int compartmentIndex, boolean hasZeroSpatialDimensions, SBMLValueHolder valueHolder)
          Constructor for rules that refer to a species.
 
Method Summary
 int getIndex()
          Returns the index of the variable in the Y vector of the value holder.
 double getValue()
          Returns the value of the rule.
protected  double processAssignmentVariable(double time)
          Calculates the math of the rule and returns the new value of the variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeObject

protected ASTNodeValue nodeObject
Object that refers to the math of the rule


value

protected double value
The calculated value of the rul


isSpecies

protected boolean isSpecies
Flag that is true if the variable is referring to a species, otherwise false


valueHolder

protected SBMLValueHolder valueHolder
The value holder that stores the current simulation results


compartmentIndex

protected int compartmentIndex
The index of the compartment of the species (if applicable)


hasOnlySubstanceUnits

protected boolean hasOnlySubstanceUnits
The hasOnlySubstanceUnits attribute of the species (if applicable)


isSetInitialAmount

protected boolean isSetInitialAmount
The isSetInitialAmount attribute of the species (if applicable)


isSetInitialConcentration

protected boolean isSetInitialConcentration
The isSetInitialConcentration attribute of the species (if applicable)


hasZeroSpatialDimensions

protected boolean hasZeroSpatialDimensions
This flag is true if the variable is a species and its compartment has no spatial dimensions


index

protected int index
The index of the variable in the Y vector of the value holder

Constructor Detail

RuleValue

public RuleValue(ASTNodeValue nodeObject,
                 int index)
Parameters:
nodeObject -
index -

RuleValue

public RuleValue(ASTNodeValue nodeObject,
                 int index,
                 Species sp,
                 int compartmentIndex,
                 boolean hasZeroSpatialDimensions,
                 SBMLValueHolder valueHolder)
Constructor for rules that refer to a species.

Parameters:
nodeObject -
index -
sp -
compartmentIndex -
hasZeroSpatialDimensions -
valueHolder -
Method Detail

processAssignmentVariable

protected double processAssignmentVariable(double time)
Calculates the math of the rule and returns the new value of the variable.

Parameters:
time -
Returns:
value the computed value of the variable

getValue

public double getValue()
Returns the value of the rule.

Returns:
value

getIndex

public int getIndex()
Returns the index of the variable in the Y vector of the value holder.

Returns:
index

Generated at March 17 2014
Version 1.4 Revision 453