org.simulator.sbml.astnode
Class AssignmentRuleObject

java.lang.Object
  extended by org.simulator.sbml.astnode.RuleObject
      extended by org.simulator.sbml.astnode.AssignmentRuleObject

public class AssignmentRuleObject
extends RuleObject

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

Version:
$Rev: 149 $
Author:
Roland Keller

Field Summary
 
Fields inherited from class org.simulator.sbml.astnode.RuleObject
compartmentIndex, hasOnlySubstanceUnits, hasZeroSpatialDimensions, index, isSetInitialAmount, isSetInitialConcentration, isSpecies, nodeObject, value, valueHolder
 
Constructor Summary
AssignmentRuleObject(ASTNodeObject nodeObject, int index)
           
AssignmentRuleObject(ASTNodeObject nodeObject, int index, org.sbml.jsbml.Species sp, int compartmentIndex, boolean hasZeroSpatialDimensions, ValueHolder valueHolder)
          Constructor for rules that refer to a species
AssignmentRuleObject(ASTNodeObject nodeObject, java.lang.String speciesReferenceID, java.util.Map<java.lang.String,java.lang.Double> stoichiometricCoefHash)
          Constructor for rules that refer to a species reference
 
Method Summary
 java.lang.String getSpeciesReferenceID()
          Returns the id of the species reference (if present), null otherwise.
 boolean processRule(double[] Y, double time, boolean changeY)
          Processes the rule and saves the new value of the corresponding variable in the Y vector if changeY is set to true.
 
Methods inherited from class org.simulator.sbml.astnode.RuleObject
getIndex, getValue, processAssignmentVariable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignmentRuleObject

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

AssignmentRuleObject

public AssignmentRuleObject(ASTNodeObject nodeObject,
                            java.lang.String speciesReferenceID,
                            java.util.Map<java.lang.String,java.lang.Double> stoichiometricCoefHash)
Constructor for rules that refer to a species reference

Parameters:
nodeObject -
speciesReferenceID -
stoichiometricCoefHash -

AssignmentRuleObject

public AssignmentRuleObject(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

processRule

public boolean processRule(double[] Y,
                           double time,
                           boolean changeY)
Processes the rule and saves the new value of the corresponding variable in the Y vector if changeY is set to true.

Parameters:
Y -
time -
changeY -
Returns:
Has there been a change in the Y vector caused by the rule?

getSpeciesReferenceID

public java.lang.String getSpeciesReferenceID()
Returns the id of the species reference (if present), null otherwise.

Returns: