|
Module Simantics/SimulationThis module is undocumented. This is a list of its definitions. DISPOSED :: ExperimentState The states of a running experiment: INITIALIZING :: ExperimentState The states of a running experiment: RUNNING :: ExperimentState The states of a running experiment: STOPPED :: ExperimentState The states of a running experiment: activateExperiment :: Resource -> <WriteGraph> Resource Creates a new run for the given experiment resource, activates it and returns it. This is createExperimentRun performed in the memory persistent virtual graph that holds experiment activations, so the activation does not survive a restart of the platform. activateExperimentAction :: Resource -> <Proc> () Activates the given experiment in a write transaction and discards the run
that gets created. This is the implementation of the modelled
activateRun :: Resource -> <WriteGraph> () Marks the given experiment run as the active one and removes the active mark from the run that was active before it. createExperimentRun :: Resource -> <WriteGraph> Resource Creates a new run of the given experiment, activates it and returns it. The
experiment must already exist in the model. The type of the run is taken
from the type of the experiment, which must have exactly one createExperimentRunWithType :: Resource -> Resource -> <WriteGraph> Resource
disposeExperiment :: IExperiment -> <Proc> () Shuts the given experiment down and removes the active mark from its run. Does nothing if the experiment is not a dynamic one. experimentFromRun :: Variable -> <ReadGraph> IExperiment Returns the running experiment of the given experiment run variable, that is,
the value of its getExperimentState :: IExperiment -> <ReadGraph> ExperimentState Returns the current state of the given experiment. possibleActiveRunVariable :: Resource -> <ReadGraph> Maybe Variable Returns the variable of the experiment run that is currently active in the
given model, or refreshExperiment :: IExperiment -> <ReadGraph> () Synchronizes the running experiment with the configuration it was started from, so that changes made to the model since then are taken into account. simulate :: Boolean -> <Proc> () Starts or stops the simulation of the experiment that is currently active in the project, depending on the flag. Does nothing if no experiment is active or if the active one is not a dynamic experiment. simulateExperiment :: IExperiment -> Boolean -> <Proc> () Starts or stops the continuous simulation of the given experiment, depending on the flag. Does nothing if the experiment is not a dynamic one. stepExperiment :: IExperiment -> Double -> <Proc> ()
|