Wolfram Computation Meets Knowledge

Simulation CenterDeploying Simulations

Batch ModeInteractive Mode

Simulations can be exported from Simulation Center and then be deployed to run standalone on any computer without any dependency on System Modeler being installed on the target computer. The only restriction is that the export has to be done from the same operating system and architecture as the target computer. This can be used for to run batch jobs on a computer cluster or to deploy real-time simulations that connect to another system using, for example, ModelPlug, OPCUA or OPCClassic.

To export the simulation executable and the corresponding settings file from the active experiment, choose File Export Simulation executable and select the desired output directory. At least two files will be created in that directory: ExperimentName.exe, which is the simulation executable, and ExperimentName.sim, which is the settings file. If the model uses any external C code that is linked dynamically, those shared libraries will also be copied to the destination folder. To deploy the simulation to another computer, all those files need to be transferred to the target computer.

The simulation executable takes four switches:

Batch Mode

To start the simulation in batch mode, specify the simulation settings file to use with the -f switch and the result file with the -r switch. The following will run MyExperiment.exe using the parameters and start values specified in MyExperiment.sim and saving the simulation result in ResultFile.mat.

MyExperiment.exe -f MyExperiment.sim -r ResultFile.mat

Interactive Mode

To start the simulation in interactive mode, specify the simulation settings file to use with the -f switch and the IP address and port that the simulation should listen on with the -server switch. The argument to the -server specifies the IP-address and PORT using the format IP-address:PORT. When the simulation is run in interactive mode, it will start in a paused state, and a client needs to connect to it to start the simulation. For information on how to interact with the simulation, see the Simulation API documentation.

Note that it is also possible to save the simulation result to file using the -r switch as in batch mode. However, since interactive simulations are in general unbounded in time, that is not advisable.

The following will run MyExperiment.exe using the MyExperiment.sim settings file and listening to IP address and port 7000.

MyExperiment.exe -f MyExperiment.sim -server ""