]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - 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
diff --git a/bundles/org.simantics.simulation/src/org/simantics/simulation/experiment/IDynamicExperiment.java b/bundles/org.simantics.simulation/src/org/simantics/simulation/experiment/IDynamicExperiment.java
new file mode 100644 (file)
index 0000000..6c5e60e
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.simulation.experiment;\r
+\r
+import org.simantics.simulation.data.Datasource;\r
+\r
+/**\r
+ * An experiment that evolves in time.\r
+ */\r
+public interface IDynamicExperiment extends IExperiment {\r
+\r
+       /**\r
+        * Starts or stops simulation depending on the\r
+        * parameter. \r
+        */\r
+       public void simulate(boolean enabled);\r
+\r
+       /**\r
+        * Simulates the experiment at lest the given period of time.\r
+        * Giving 0 as parameter simulates the experiment one 'step'.\r
+        * After the duration, the simulation is stopped.\r
+        */\r
+       public void simulateDuration(double duration);\r
+\r
+       /**\r
+        * Sets the simulation time to some time instance before\r
+        * the given time. Simulator continues running if it\r
+        * was already running before rewind. Many simulators don't \r
+        * support arbitrary rewinds and therefore reinitialize \r
+        * simulation and begin at zero.\r
+        */\r
+       public void rewindTo(double time);\r
+\r
+       /**\r
+        * Ensure that the current state of the experiment at the time of invocation\r
+        * is stored so that it can be returned to during a later session.\r
+        */\r
+       void saveState();\r
+\r
+       /**\r
+        * Get data source for history collection purposes.\r
+        */\r
+       Datasource getDatasource();\r
+\r
+}\r