public abstract class EquationSystem extends Object implements SBMLValueHolder, DelayedDESystem, EventDESystem, FastProcessDESystem, RichDESystem, PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
double[] |
changeRate
An array that stores derivatives of each species in the model system at current time.
|
static String |
TEMP_VALUE
Key to memorize user objects in
ASTNode |
| Constructor and Description |
|---|
EquationSystem(org.sbml.jsbml.Model model) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addConstraintListener(ConstraintListener listener)
Adds the given
ConstraintListener to this interpreter's list of listeners. |
double |
computeDelayedValue(double time,
String id,
DESystem DES,
double[] initialValues,
int yIndex)
Returns the value for the element with the given id at a time point in the past, where the time
gives the amount of time in the past.
|
boolean |
containsEventsOrRules()
This method is used to check if this differential equation system contains any events or rules
that would require a special treatment by the numerical solver.
|
boolean |
containsFastProcesses() |
org.sbml.jsbml.ASTNode |
copyAST(org.sbml.jsbml.ASTNode node,
boolean mergingPossible,
FunctionValue function,
List<org.sbml.jsbml.ASTNode> inFunctionNodes)
Creates a copy of an
ASTNode or returns an ASTNode that is equal to the
presented node. |
int |
getAdditionalValueCount()
Gives the number of intermediate results that are computed by this class.
|
String[] |
getAdditionalValueIds()
This provides the column/row identifiers of all intermediate results: one identifier per
result.
|
double[] |
getChangeRate() |
Map<String,Boolean> |
getConstantHash() |
int |
getConstraintListenerCount() |
double |
getCurrentCompartmentSize(String id)
Returns the size of the compartment with the given id.
|
double |
getCurrentCompartmentValueOf(String speciesId)
Returns the size of the compartment of the species with the given id.
|
double |
getCurrentParameterValue(String id)
Returns the value of the parameter with the given id.
|
double |
getCurrentSpeciesValue(String id)
Returns the value of the species with the given id.
|
double |
getCurrentStoichiometry(String id)
Returns the value of the stoichiometry of the species reference with the given id.
|
double |
getCurrentTime()
Returns the current simulation time.
|
double |
getCurrentValueOf(int position)
Returns the current value of the Y vector at the given position.
|
double |
getCurrentValueOf(String id)
Returns the current value of the SBase with the given id.
|
int |
getDimension() |
int |
getEventCount()
Counts the number of events in this system.
|
String[] |
getIdentifiers()
|
double[] |
getInitialValues()
Returns the initial values of the model to be simulated.
|
org.sbml.jsbml.Model |
getModel()
Returns the model that is used by this object.
|
boolean |
getNoDerivatives() |
int |
getParameterCount()
This method tells you the complete number of parameters within the model.
|
int |
getPositionOfParameters() |
int |
getPositiveValueCount() |
List<RateRuleValue> |
getRateRulesRoots() |
int |
getRuleCount()
Counts the number of rules to be evaluated in each time point.
|
Map<String,Integer> |
getSymbolHash() |
double[] |
getY()
Get state array.
|
void |
init(boolean renewTree,
double defaultSpeciesValue,
double defaultParameterValue,
double defaultCompartmentValue,
Map<String,Boolean> amountHash)
This method initializes the differential equation system for simulation.
|
void |
propertyChange(PropertyChangeEvent propertyChangeEvent) |
void |
registerDelayValueHolder(DelayValueHolder dvh) |
boolean |
removeConstraintListener(ConstraintListener listener)
Removes the given
ConstraintListener from this interpreter. |
ConstraintListener |
removeConstraintListener(int index)
Removes the
ConstraintListener with the given index from this interpreter. |
void |
setCurrentTime(double currentTime) |
void |
setDelaysIncluded(boolean delaysIncluded) |
void |
setFastProcessComputation(boolean isProcessing) |
void |
setPreviousTimePoint(double previousTimePoint) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextEventAssignments, processAssignmentRulesgetAdditionalValuespublic static final String TEMP_VALUE
ASTNodepublic double[] changeRate
public void init(boolean renewTree,
double defaultSpeciesValue,
double defaultParameterValue,
double defaultCompartmentValue,
Map<String,Boolean> amountHash)
throws org.sbml.jsbml.validator.ModelOverdeterminedException
ASTNodes has to be refreshed, give some default values and state
whether a Species is seen as an amount or a concentration.renewTree - defaultSpeciesValue - defaultParameterValue - defaultCompartmentValue - amountHash - org.sbml.jsbml.validator.ModelOverdeterminedExceptionorg.sbml.jsbml.SBMLExceptionpublic org.sbml.jsbml.ASTNode copyAST(org.sbml.jsbml.ASTNode node,
boolean mergingPossible,
FunctionValue function,
List<org.sbml.jsbml.ASTNode> inFunctionNodes)
ASTNode or returns an ASTNode that is equal to the
presented node.node - the node to copymergingPossible - flag that is true if it is allowed to return a node that is equal to the
given nodefunction - the function that is currently processed (if any) or nullinFunctionNodes - the nodes that already belong to the functionpublic double getCurrentCompartmentSize(String id)
getCurrentCompartmentSize in interface SBMLValueHolderpublic double getCurrentCompartmentValueOf(String speciesId)
getCurrentCompartmentValueOf in interface SBMLValueHolderpublic double getCurrentParameterValue(String id)
getCurrentParameterValue in interface SBMLValueHolderpublic double getCurrentSpeciesValue(String id)
getCurrentSpeciesValue in interface SBMLValueHolderpublic double getCurrentStoichiometry(String id)
getCurrentStoichiometry in interface SBMLValueHolderpublic double getCurrentTime()
getCurrentTime in interface SBMLValueHolderpublic double getCurrentValueOf(String id)
getCurrentValueOf in interface SBMLValueHolderpublic double getCurrentValueOf(int position)
getCurrentValueOf in interface SBMLValueHolderpublic double computeDelayedValue(double time,
String id,
DESystem DES,
double[] initialValues,
int yIndex)
DelayValueHoldercomputeDelayedValue in interface DelayValueHoldertime - the time point (in the past) at which the value is to be computed for the
element with the given id.id - the id of the delayed valueDES - the DESysteminitialValues - the initialValues of the DESyIndex - the index corresponding to the id in the vector of the DESpublic void registerDelayValueHolder(DelayValueHolder dvh)
registerDelayValueHolder in interface DelayedDESystemdvh - the delay value holder to be registeredpublic String[] getIdentifiers()
Strings that describe the content of each dimension of the
resulting array of this DESystem.getIdentifiers in interface DESystemStrings which has the same length than the number given by FirstOrderDifferentialEquations.getDimension(). Each String describes the content of the given dimension.public boolean containsEventsOrRules()
containsEventsOrRules in interface DESystemtrue if any events or rules are contained in the differential
equation system.public int getPositiveValueCount()
getPositiveValueCount in interface DESystempublic void setDelaysIncluded(boolean delaysIncluded)
setDelaysIncluded in interface DESystemdelaysIncluded - Determines whether delay expression should be included in the
calculation.public int getDimension()
getDimension in interface org.apache.commons.math.ode.FirstOrderDifferentialEquationspublic int getEventCount()
getEventCount in interface EventDESystempublic org.sbml.jsbml.Model getModel()
public int getRuleCount()
getRuleCount in interface EventDESystempublic boolean getNoDerivatives()
getNoDerivatives in interface EventDESystemtrue, if the change vector is always zero in the system.public boolean containsFastProcesses()
containsFastProcesses in interface FastProcessDESystempublic String[] getAdditionalValueIds()
String array must equal the length of
the array returned by RichDESystem.getAdditionalValues(double, double[]).getAdditionalValueIds in interface RichDESystempublic int getAdditionalValueCount()
RichDESystem.getAdditionalValueIds() and RichDESystem.getAdditionalValues(double, double[]).getAdditionalValueCount in interface RichDESystempublic double[] getInitialValues()
public void propertyChange(PropertyChangeEvent propertyChangeEvent)
propertyChange in interface PropertyChangeListenerpublic boolean addConstraintListener(ConstraintListener listener)
ConstraintListener to this interpreter's list of listeners.listener - the element to be added.true if this operation was successful, false otherwise.NullPointerExceptionList.add(Object)public boolean removeConstraintListener(ConstraintListener listener)
ConstraintListener from this interpreter.listener - the element to be removed.true if this operation was successful, false otherwise.NullPointerExceptionList.remove(Object)public ConstraintListener removeConstraintListener(int index)
ConstraintListener with the given index from this interpreter.index - of the ConstraintListener to be removed.true if this operation was successful, false otherwise.IndexOutOfBoundsExceptionList.remove(int)public int getConstraintListenerCount()
ConstraintListeners currently assigned to this interpreter.public void setPreviousTimePoint(double previousTimePoint)
public void setCurrentTime(double currentTime)
public List<RateRuleValue> getRateRulesRoots()
public double[] getY()
public void setFastProcessComputation(boolean isProcessing)
setFastProcessComputation in interface FastProcessDESystemisProcessing - Should there be a splitting of fast and slow reactions in the simulation?public double[] getChangeRate()
public int getPositionOfParameters()
public int getParameterCount()
int value, whereas the SBML model may contain int values.Copyright © 2007–2021. All rights reserved.