net.simplace.sim.wrapper.SimplaceWrapper

This class serves as wrapper to access the SIMPLACE Model Engine (net.simplace.sim) from other applications. It can further be wrapped by system or language specific wrappers like the

See also: JavaSimplaceWrapper, SimplaceWrapper.R, PythonSimplaceWrapper.py, MatlabSimplaceWrapper.mat




public class SimplaceWrapper {
// Public Constructors
public SimplaceWrapper(String aWorkDir, String aOutputDir, String
aProjectsDir, String aDataDir);
public SimplaceWrapper(String aWorkDir, String aOutputDir);
public SimplaceWrapper();

// Protected Instance Variables
protected boolean isSimulationInitialized;
protected FWSimSession iCurrentSession;
protected List iSimulationsQueue;
protected int iSimulationsCount;
protected List iInitializedSimulations;
protected FWCheckHelper.CHECK_LEVEL iCheckLevel;

// Public Instance Methods
public void setDirectories(String aWorkDir, String aOutputDir, String
aProjectsDir, String aDataDir);

Sets directories used by solution
public String[] getDirectories();

Sets directories used by solution
returns
public FWSimSession prepareSession(String aProjectPath, String aSolutionPath);

prepares the project or solution to use it with next methods. CurrentSession instance variable is set and used. Just call net.simplace.sim.wrapper.SimplaceWrapper.run() to start the simulation. You can also use "step" to start the first step of the first simulation.
returns the newly created session.
public void run() throws Exception;

runs the prepared project or solution - not to be used without calling prepare Project before
public void run(String aProjectlines) throws Exception;

runs the prepared project or solution - not to be used without calling prepare Project before
public FWSimSimulation createSimulation(Object[][] aParameterMap)
throws Exception;

Pass a parameter map with key (name of variable) and value (value of variable) to the system. - not to be used without calling prepare Project before simulation is put into the prepared project to make possible to run them in parallel Note: only solution defined constants (v...) should be passed to the system
returns the simulation created from parameters passed to the method
public void runSimulations(boolean doSelectSolution, boolean
doUpdateResources) throws Exception;

Calculates the last prepared simulation (only one!) or, depending on your way to create the solutions, the whole queue of solutions. For the ladder you can choose, if a selection should be done. Therefore it is necessary to specify the selection variant in the project file. - not to be used without calling prepare Project before
public void runSimulations(boolean doSelectSolution) throws Exception;

Calculates the last prepared simulation (only one!) or, depending on your way to create the solutions, the whole queue of solutions. For the ladder you can choose, if a selection should be done. Therefore it is necessary to specify the selection variant in the project file. - not to be used without calling prepare Project before
public void initializeSpecificSimulation(int aSimulationQueueIndex);

Initializes an specific simulation before the parameters are set or the simulation is run stepwise.
public void resetSimulationQueue();

resets the queue of active simulations
public String[] getSimulationIDs();


returns List of all IDs of all simulations in the queue.
public DataContainer getResult(String aName, String aSimulationID);

Used for getting results of the performed simulations. You have to use - prepareProject and optional - createSimulation AND necessarily - runSimulations or run before!
returns an object array containing the cached data
public void setSimulationValues(int aSimulationQueueIndex, Object[][]
aParameterMap);

Sets the parameters of the first simulations varmap
public void setSimulationValues(Object[][] aParameterMap);

Sets the parameters of the first simulations varmap
public void setSpecificSimulationValues(int aSimulationQueueIndex, Object[][][]
aParameterMap);

Sets the parameters of all simulations varmap
public void setAllSimulationValues(Object[][][] aParameterMap);

Sets the parameters of all simulations varmap
public DataContainer stepSpecific(int aSimulationQueueIndex, Object[][]
aParameterMap, String[] aOutputFilterArray, int aStepCount)
throws Exception;

Used running the i-th simulation in queue stepwise. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, int aStepCount)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, String[]
aOutputFilterArray) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, String[]
aOutputFilterArray, int aStepCount) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, Object[][]
aParameterMap) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, Object[][]
aParameterMap, int aStepCount) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer stepSpecific(int aSimulationQueueIndex, Object[][]
aParameterMap, String[] aOutputFilterArray) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(Object[][] aParameterMap, String[]
aOutputFilterArray, int aStepCount) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is usable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step() throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(int aStepCount) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(String[] aOutputFilterArray) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(String[] aOutputFilterArray, int aStepCount)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(Object[][] aParameterMap) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(Object[][] aParameterMap, int aStepCount)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer step(Object[][] aParameterMap, String[]
aOutputFilterArray) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public void initSimulations() throws Exception, MissingSimResourceException;

public DataContainer[] stepAll(Object[][][] aParameterMap, String[]
aOutputFilterArray, int aStepCount, boolean aParallelized)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is usable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer[] stepAll(Object[][][] aParameterMap, String[]
aOutputFilterArray, int aStepCount) throws Exception;

public DataContainer[] stepAll() throws Exception;

public DataContainer[] stepAll(int aStepCount) throws Exception;

public DataContainer[] stepAll(String[] aOutputFilterArray) throws Exception;

public DataContainer[] stepAll(String[] aOutputFilterArray, int aStepCount)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer[] stepAll(Object[][][] aParameterMap) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer[] stepAll(Object[][][] aParameterMap, int aStepCount)
throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public DataContainer[] stepAll(Object[][][] aParameterMap, String[]
aOutputFilterArray) throws Exception;

Used running the simulation stepwise. Only the last created or the first simulation in the first project is useable. You have to run - prepareProject and optional - createSimulation before!
returns an object array containing the var map data of this step
public void registerOutputListener(FWSimOutputListener aOutputListener);

Output listener gets Output Event with the current VarMap
public void removeOutputListener(FWSimOutputListener aOutputListener);

Output listener gets Output Event with the current VarMap
public void registerModelListener(FWSimulationListener aModelListener);

Model listener gets Model Event with the current Model
public void removeModelListener(FWSimulationListener aModelListener);

Model listener gets Model Event with the current Model
public void shutDown();

Has to be called at the end.
public void setCheckLevel(String aCheckLevel);

public void setProjectLines(String aProjectLines);

public void setProjectLines(Integer[] aProjectLines);



}



Extended by: JavaSimplaceWrapper