vssRunSimulation
Run the simulation of a given model.
Syntax
vssRunSimulation()
vssRunSimulation(model)
vssRunSimulation(model,context)
vssRunSimulation(model,context,workspace)
vssRunSimulation(model,context,workspace,simobject)
vssRunSimulation(model,context,workspace,simobject,raiseerror)
vssRunSimulation(model,context,workspace,simobject,raiseerror,reinitfunc)
sparams = vssRunSimulation(...)
Inputs
- model
- Model that will be simulated. If omitted, it is the current model by default.
- context
- Model context. If omitted, it is an empty struct by default.
- workspace
- Workspace where the simulator will read/write the signals. If omitted, the workspace is the base environment by default.
- simobject
- Workspace where the simulator will read/write the signals. If omitted, the workspace is the base environment by default.
- raiseerror
- If true, the function will not popup an error dialog if the simulation object is defined, else it will throw an error. Default value is false.
- reinitfunc
- Function that the compiler calls after evaluation. Default value is an empty string.
Outputs
- sparams
- Simulation parameters handle or pointer to a simulation parameter engine structure.
Example
Passing arguments before running the simulation and create a new environment variable to read/write the signals with the block SignalIn and SignalOut. The handle of the current model is obtained as the first step.
model = bdeGetCurrentModel;
ctx.temperature = 100;
ctx.resistence = 15;
env = getnewenv;
vssRunSimulation(model,ctx,env);
Running current Activate model and raising error if the simulation is not successfully finished
vssRunSimulation([],[],[],[],true)