org.simulator.sbml.astnode
Class RuleObject

java.lang.Object
  extended by org.simulator.sbml.astnode.RuleObject
Direct Known Subclasses:
AssignmentRuleObject, RateRuleObject

public class RuleObject
extends java.lang.Object

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

Version:
$Rev: 149 $
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  ASTNodeObject nodeObject
          Object that refers to the math of the rule
protected  double value
          The calculated value of the rul
protected  ValueHolder valueHolder
          The value holder that stores the current simulation results
 
Constructor Summary
RuleObject(ASTNodeObject nodeObject, int index)
           
RuleObject(ASTNodeObject nodeObject, int index, org.sbml.jsbml.Species sp, int compartmentIndex, boolean hasZeroSpatialDimensions, ValueHolder 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 ASTNodeObject 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 ValueHolder 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

RuleObject

public RuleObject(ASTNodeObject nodeObject,
                  int index)
Parameters:
nodeObject -
index -

RuleObject

public RuleObject(ASTNodeObject nodeObject,
                  int index,
                  org.sbml.jsbml.Species sp,
                  int compartmentIndex,
                  boolean hasZeroSpatialDimensions,
                  ValueHolder 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:

getValue

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

Returns:

getIndex

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

Returns: