[Scilab-users] xcos : xcos_simulate(scs_m, 1) or xcos_simulate(scs_m, 4)

Quentin Mazué mazue.quentin at gmail.com
Tue Sep 23 16:45:47 CEST 2014


Hello,

I finished a quite large Xcos-diagram and I have to launch calculation in
batch mode from a GUI.

I have 2 different procedures : 

Procedure 1 : 
1) Use importXcosDiagram(...) to get the scs_m : import once for all my
simulations
2) Use xcos_compile(scs_m) to get the %cpr : done once for all my
simulations
3) Use xcos_simulate(scs_m,1) to launch the first simulation.


Procedure 2 :
1) Use importXcosDiagram(...) to get the scs_m : import once for all my
simulations
2) Do nothing
3) Use xcos_simulate(scs_m,4) to launch the first simulation.

All the duration are obtained with tic();...;disp(toc());

I notice that for procedure 1 and 2, the step 1 is fast (around 2-3sec)
For procedure 1, step 2 last around 25sec when step 3 last 40sec. => for 1
simulation : total time = 65sec
However for procedure 2 step 3 last 50sec. => for 1 simulation : total time
= 50sec

According to the help, the difference between my two procedures is that in
procedure 1 I compile the diagram and then I simulate and in procedure 2 I
compile and simulate within the same function.

=> Consequently why is there a difference of 15sec between this 2 procedures
even though they should be the same ?

=>After step 3), could I change my input variables (which are not in Xcos
context but in Scilab workspace) and then launch a new simulation as in step
3 ? Will my new results be correct ?





--
View this message in context: http://mailinglists.scilab.org/xcos-xcos-simulate-scs-m-1-or-xcos-simulate-scs-m-4-tp4031207.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list