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, wait
getNextEventAssignments, processAssignmentRules
getAdditionalValues
public static final String TEMP_VALUE
ASTNode
public double[] changeRate
public void init(boolean renewTree, double defaultSpeciesValue, double defaultParameterValue, double defaultCompartmentValue, Map<String,Boolean> amountHash) throws org.sbml.jsbml.validator.ModelOverdeterminedException
ASTNode
s 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.ModelOverdeterminedException
org.sbml.jsbml.SBMLException
public 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 SBMLValueHolder
public double getCurrentCompartmentValueOf(String speciesId)
getCurrentCompartmentValueOf
in interface SBMLValueHolder
public double getCurrentParameterValue(String id)
getCurrentParameterValue
in interface SBMLValueHolder
public double getCurrentSpeciesValue(String id)
getCurrentSpeciesValue
in interface SBMLValueHolder
public double getCurrentStoichiometry(String id)
getCurrentStoichiometry
in interface SBMLValueHolder
public double getCurrentTime()
getCurrentTime
in interface SBMLValueHolder
public double getCurrentValueOf(String id)
getCurrentValueOf
in interface SBMLValueHolder
public double getCurrentValueOf(int position)
getCurrentValueOf
in interface SBMLValueHolder
public double computeDelayedValue(double time, String id, DESystem DES, double[] initialValues, int yIndex)
DelayValueHolder
computeDelayedValue
in interface DelayValueHolder
time
- 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 DelayedDESystem
dvh
- the delay value holder to be registeredpublic String[] getIdentifiers()
String
s that describe the content of each dimension of the
resulting array of this DESystem
.getIdentifiers
in interface DESystem
String
s 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 DESystem
true
if any events or rules are contained in the differential
equation system.public int getPositiveValueCount()
getPositiveValueCount
in interface DESystem
public void setDelaysIncluded(boolean delaysIncluded)
setDelaysIncluded
in interface DESystem
delaysIncluded
- Determines whether delay expression should be included in the
calculation.public int getDimension()
getDimension
in interface org.apache.commons.math.ode.FirstOrderDifferentialEquations
public int getEventCount()
getEventCount
in interface EventDESystem
public org.sbml.jsbml.Model getModel()
public int getRuleCount()
getRuleCount
in interface EventDESystem
public boolean getNoDerivatives()
getNoDerivatives
in interface EventDESystem
true
, if the change vector is always zero in the system.public boolean containsFastProcesses()
containsFastProcesses
in interface FastProcessDESystem
public String[] getAdditionalValueIds()
String
array must equal the length of
the array returned by RichDESystem.getAdditionalValues(double, double[])
.getAdditionalValueIds
in interface RichDESystem
public int getAdditionalValueCount()
RichDESystem.getAdditionalValueIds()
and RichDESystem.getAdditionalValues(double, double[])
.getAdditionalValueCount
in interface RichDESystem
public double[] getInitialValues()
public void propertyChange(PropertyChangeEvent propertyChangeEvent)
propertyChange
in interface PropertyChangeListener
public 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.NullPointerException
List.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.NullPointerException
List.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.IndexOutOfBoundsException
List.remove(int)
public int getConstraintListenerCount()
ConstraintListener
s 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 FastProcessDESystem
isProcessing
- 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.