Function for running xcos simulation in batch mode
Info=scicos_simulate(scs_m)
Info=scicos_simulate(scs_m,Info)
Info=scicos_simulate(scs_m,context)
Info=scicos_simulate(scs_m,flag)
Info=scicos_simulate(scs_m ,Info [, context] [,flag])
list() at
the first call, then use output Info as
input Infofor the next
calls. Info contains compilation and
simulation information and is used to avoid recompilation when
not needed.
.xcos file (see importXcosDiagram).
The ContextValues may be used to change
the main parameters value set in the main diagram
context. example: if the variable A is set to 1
in the main context of the diagram. One can change the
A value for a scicos_simulate simulation by setting
It is also possible to use variables defined inside Scilab
directly without using the ContextValues
argument, but for such a use the context definition must allow
this: example, if one wants to allow simulation use the
A Scilab variable value for the parameter
A the diagram context definition should contain
if ~exists('A') then A=1,end | ![]() | ![]() |
A in Scilab.SCI/modules/scicos/macros/scicos_auto/scicos_simulate.sci
SCI/modules/xcos/demos/batch_simulation.xcos

importXcosDiagram("SCI/modules/xcos/demos/batch_simulation.xcos") typeof(scs_m) //The diagram data structure //This diagram uses 3 context variables : // Amplitude : the sin function amplitude // Pulsation : the sin function pulsation // Tf : the final simulation time scs_m.props.context; //the embedded definition //first batch simulation with the parameters embedded in the diagram scicos_simulate(scs_m); // Change the final time value Context.Tf=10; scicos_simulate(scs_m,Context); // without display Context.Tf=10; Context.Pulsation=9; scicos_simulate(scs_m,list(),Context,'nw'); //get the variable created by the "from workspace block" counter | ![]() | ![]() |
Ramine Nikoukhah - INRIA
Serge Steer - INRIA