]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.simulation/src/org/simantics/simulation/experiment/IDynamicExperiment.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.simulation / src / org / simantics / simulation / experiment / IDynamicExperiment.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.simulation.experiment;\r
13 \r
14 import org.simantics.simulation.data.Datasource;\r
15 \r
16 /**\r
17  * An experiment that evolves in time.\r
18  */\r
19 public interface IDynamicExperiment extends IExperiment {\r
20 \r
21         /**\r
22          * Starts or stops simulation depending on the\r
23          * parameter. \r
24          */\r
25         public void simulate(boolean enabled);\r
26 \r
27         /**\r
28          * Simulates the experiment at lest the given period of time.\r
29          * Giving 0 as parameter simulates the experiment one 'step'.\r
30          * After the duration, the simulation is stopped.\r
31          */\r
32         public void simulateDuration(double duration);\r
33 \r
34         /**\r
35          * Sets the simulation time to some time instance before\r
36          * the given time. Simulator continues running if it\r
37          * was already running before rewind. Many simulators don't \r
38          * support arbitrary rewinds and therefore reinitialize \r
39          * simulation and begin at zero.\r
40          */\r
41         public void rewindTo(double time);\r
42 \r
43         /**\r
44          * Ensure that the current state of the experiment at the time of invocation\r
45          * is stored so that it can be returned to during a later session.\r
46          */\r
47         void saveState();\r
48 \r
49         /**\r
50          * Get data source for history collection purposes.\r
51          */\r
52         Datasource getDatasource();\r
53 \r
54 }\r