Package org.simulator.sbml

Classes for storing and interpreting an SBML model. The most important class is SBMLinterpreter that can return the current vector of derivatives to the solver.

One important special case of during the simulation of SBML models is dealing with Constraint violation. To this end, this package also provides the interface ConstraintListener, which takes a special EventObject, namely the ConstraintEvent as an argument. The method ConstraintListener.processViolation(ConstraintEvent) can then be used to deal with the Constraint. It receives the time, when the Constraint's condition has been violated together with a reference of the Constraint itself. By default, the SBMLinterpreter adds an instance of SimpleConstraintListener to its list of ConstraintListeners. You can remove this element by calling SBMLinterpreter.removeConstraintListener(int) with the argument 0 and add an arbitrary number of user-specific listeners instead. The SimpleConstraintListener uses the standard Java Logger and displays the time, condition (as formula String), and the message of the Constraint on the log-level Level.WARNING. A recommended practice would be maintain a list for each Constraint that gathers all points in time, when it was violated. This list could at the end of the simulation be presented to the user via a graphical user interface together with a rendered version of the message (note that the message element in the Constraint is not a simple text, but an arbitrary XHTML document and therefore not always suitable to be displayed on the console).

Version:
$Rev$
Skip navigation links

Copyright © 2007–2018. All rights reserved.