net.simplace.simulation.FWSimEngine

Engine is started with the main configuration xml file having no need of GUI-configuration or classes Singleton implementation Needs Solution.sol.xml-File. Structure is defined by the SimSolution.dtd. For Project-Simulation a Project.proj.xml-File is needed defined by the SimProject.dtd. First the FWSimSolution is created with a call with the actionCommand "createSolution". Within the provided net.simplace.simulation.util.FWSimVarMap the parameter "solution" points to the solution.sol.xml-File Then the provided net.simplace.simulation.util.FWSimVarMap could point to the project.proj.xml-File within parameter "project". For Test mode no project file is provided. But "createProject" call is needed in all cases. Three types of simulations are supported: FWSimProject.PROJECT_MODE.SIMULATION: Test simulations without project or simple project runs for given project configuration FWSimProject.PROJECT_MODE.SENSITIVITY: Project creates java.util.List of FWSimSimulation via plug-in net.simplace.simulation.control.FWSimulationGenerator and runs them accordingly FWSimProject.PROJECT_MODE.CALIBRATION: Like SENSITIVITY but additional net.simplace.simulation.control.FWSimulationSelector selecting one simulation that fits most to the plug-in selector. simulations for each given A call of "run" command starts the process. FWSimEngine can be used to register Listeners to it: net.simplace.simulation.event.FWSimOutputListener and net.simplace.simulation.event.FWSimModelListener.


public final class FWSimEngine {

// Constants
public static final int MAX_SIMULATION_COUNT;

// Class Methods
public static FWSimEngine getInstance();

Returns a Reference to the Identity instance (if there is no one yet it creates one)
returns the singleton instance
public static FWSimSession prepareSession(String aProjectFileName, String
aSolutionFileName) throws IOException;

Ensemble of all needed calls to run a whole model specified in the solution-file and project-file if no project file name is given, the solution will be taken as default project and simulation will be run once in test mode.
returns the prepared Session
public static FWSimSession runProjects(String aProjectFileName, String
aSolutionFileName);

Ensemble of all needed calls to run a whole model specified in the solution-file and project-file if no project file name is given, the solution will be taken as default project and simulation will be run once in test mode.
returns runs all projects of the session and returns it.
public static void setWorkDir(String aPathString);

public static String getWorkDir();


returns the work directory
public static void setOutputDir(String aPathString);

public static String getOutputDir();


returns the output dir
public static FWSimSession registerSolution(FWSimSolution aSolutionO);


returns the created session
public static FWSimSession registerSession(FWSimSession aSessionO);


returns the created session
public static void reset();

resets the whole engine to be able to reinitialize it.
public static int getSlotCount();


returns number of free slots on this computer (processes)
public static void setSlotCount(int aSlotCount);


// Public Instance Methods
public void call(int aClickCount, String aActionCommand) throws Exception;

ModelViewControler architecture - net.simplace.simulation.FWSimEngine signifies the controller to be called
public void call(int aClickCount, String aFunction, HashMap aParameterMap)
throws Exception;

public FWSimSession prepareSession(HashMap aParameterMap) throws IOException;


returns the FWSimSolution object filled with the parameters from XML in file
public FWSimSession prepareSession(Element aSolutionElement, FWSimVarMap
aVarMap, String aSessionName);


returns the FWSimSolution object filled with the parameters from XML in file
public void shutDown();

Shutdown the Thread pool if it's finished
public void setAppMode(FWSimSession.APPLICATION_MODE aAppMode);

public List getSessions();


returns the current session (if only one)
public void finalizeSession(FWSimSession aCurrentSession);

finalizes one seesion


}



Returned by: getInstance()