]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.simulator/src/org/simantics/simulator/IDynamicExperimentLocal.java
Simulator toolkit enhancements
[simantics/platform.git] / bundles / org.simantics.simulator / src / org / simantics / simulator / IDynamicExperimentLocal.java
1 /*******************************************************************************
2  * Copyright (c) 2018 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     Semantum Oy - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.simulator;
13
14 import org.simantics.databoard.binding.Binding;
15
16 public interface IDynamicExperimentLocal extends IExperimentLocal {
17
18     /**
19      * Starts or stops simulation depending on the
20      * parameter.
21      */
22     public void simulate(boolean enabled);
23
24     /**
25      * Simulates the experiment at lest the given period of time.
26      * Giving 0 as parameter simulates the experiment one 'step'.
27      * After the duration, the simulation is stopped.
28      */
29     public void simulateDuration(double duration);
30
31     void setVariableValueById(String id, Object value, Binding binding);
32     Object getVariableValueById(String id);
33
34     double getSimulationTime();
35
36 }