Scicos tests: regroup the solver tests 40/12240/3
Paul BIGNIER [Wed, 7 Aug 2013 14:40:05 +0000 (16:40 +0200)]
File vision is improved, and this will ease the addition of Sundials tests.

DoPri, ExpRK, ImpRKnow, DDaskrK_ODE and DDaskrN_ODE now call the same diagram Kalman.zcos,
intelligently modifying it when necessary.

Change-Id: Id34711d35dc05e8dff77a7519504fa461bc036b1

36 files changed:
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Bouncing.dia.ref with 98% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Bouncing.tst with 96% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Hydraulics.dia.ref with 99% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Hydraulics.tst with 96% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_ODE.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_ODE.dia.ref with 89% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_ODE.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_ODE.tst with 88% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Platform.dia.ref with 98% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_Platform.tst with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_RLC.dia.ref with 98% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrK_RLC.tst with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Bouncing.dia.ref with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Bouncing.tst with 96% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Hydraulics.dia.ref with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Hydraulics.tst with 96% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_ODE.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_ODE.dia.ref with 89% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_ODE.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_ODE.tst with 88% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Platform.dia.ref with 99% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_Platform.tst with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_RLC.dia.ref with 99% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.tst [moved from scilab/modules/scicos/tests/unit_tests/DDaskrN_RLC.tst with 97% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DoPri.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/DoPri.dia.ref with 81% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DoPri.tst [moved from scilab/modules/scicos/tests/unit_tests/DoPri.tst with 81% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/ExpRK.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/ExpRK.dia.ref with 77% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/ExpRK.tst [moved from scilab/modules/scicos/tests/unit_tests/ExpRK.tst with 78% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/ImpRK.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/ImpRK.dia.ref with 85% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/ImpRK.tst [moved from scilab/modules/scicos/tests/unit_tests/ImpRK.tst with 85% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/LSodar.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/LSodar.dia.ref with 86% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/LSodar.tst [moved from scilab/modules/scicos/tests/unit_tests/LSodar.tst with 87% similarity]
scilab/modules/xcos/tests/unit_tests/DoPri_test.zcos [deleted file]
scilab/modules/xcos/tests/unit_tests/LSodar_test.zcos [deleted file]
scilab/modules/xcos/tests/unit_tests/RK_test.zcos [deleted file]
scilab/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos [moved from scilab/modules/xcos/tests/unit_tests/DDaskr_Bouncing_test.zcos with 100% similarity]
scilab/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos [moved from scilab/modules/xcos/tests/unit_tests/DDaskr_Hydraulics_test.zcos with 100% similarity]
scilab/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos [moved from scilab/modules/xcos/tests/unit_tests/DDaskr_Platform_test.zcos with 100% similarity]
scilab/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos [moved from scilab/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos with 100% similarity]
scilab/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos [new file with mode: 0644]

@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Bouncing_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Bouncing_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Hydraulics_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Hydraulics_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -42,4 +42,3 @@ stdeviation = st_deviation(compa);
 assert_checktrue(maxi <= 2*10^-(6));
 assert_checktrue(mea <= 2*10^-(6));
 assert_checktrue(stdeviation <= 2*10^-(6));
-
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
 prot = funcprot();
 funcprot(0);
 function message(msg)
@@ -16,8 +16,6 @@ endfunction
 funcprot(prot);
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 102;       // Solver
-scs_m.props.tol(1) = 1.0e-10;   // abstol
-scs_m.props.tol(2) = 1.0e-10;   // reltol
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
  
 !Diagram has been compiled for explicit solver  !
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
 
 prot = funcprot();
 funcprot(0);
@@ -20,7 +20,5 @@ funcprot(prot);
 
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 102;       // Solver
-scs_m.props.tol(1) = 1.0e-10;   // abstol
-scs_m.props.tol(2) = 1.0e-10;   // reltol
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
 assert_checkequal(ier, 0);
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Platform_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -46,7 +46,7 @@ Info = scicos_simulate(scs_m, list());
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/         !
+!Generated files path: TMPDIR/          !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Platform_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -69,7 +69,7 @@ end
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/         !
+!Generated files path: TMPDIR/          !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -116,7 +116,7 @@ Warning : redefining function: dst                     . Use funcprot(0) to avoi
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/         !
+!Generated files path: TMPDIR/          !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Bouncing_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -46,7 +46,7 @@ Info = scicos_simulate(scs_m, list());
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/          !
+!Generated files path: TMPDIR/         !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Bouncing_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Hydraulics_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -48,7 +48,7 @@ scicos_simulate(scs_m);   // DDaskr
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/          !
+!Generated files path: TMPDIR/         !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -96,7 +96,7 @@ scicos_simulate(scs_m);   // IDA
 !                                                         !
 !                                                         !
 !                                                         !
-!Generated files path: TMPDIR/          !
+!Generated files path: TMPDIR/         !
 !                                                         !
 !                                                         !
    Generate a loader file
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Hydraulics_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -42,4 +42,3 @@ stdeviation = st_deviation(compa);
 assert_checktrue(maxi <= 2*10^-(7));
 assert_checktrue(mea <= 2*10^-(7));
 assert_checktrue(stdeviation <= 2*10^-(7));
-
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
 prot = funcprot();
 funcprot(0);
 function message(msg)
@@ -16,8 +16,6 @@ endfunction
 funcprot(prot);
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 101;       // Solver
-scs_m.props.tol(1) = 1.0e-10;   // abstol
-scs_m.props.tol(2) = 1.0e-10;   // reltol
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
  
 !Diagram has been compiled for explicit solver  !
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
 
 prot = funcprot();
 funcprot(0);
@@ -20,7 +20,5 @@ funcprot(prot);
 
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 101;       // Solver
-scs_m.props.tol(1) = 1.0e-10;   // abstol
-scs_m.props.tol(2) = 1.0e-10;   // reltol
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
 assert_checkequal(ier, 0);
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Platform_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_Platform_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,7 +7,7 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
@@ -9,7 +9,7 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DDaskr_RLC_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 
 // Redefining messagebox() to avoid popup
 prot = funcprot();
@@ -7,20 +7,20 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
 for i=2:4  // 'max step size' = 5*10^-i, precision
  // Start by updating the clock block period (sampling)
- scs_m.objs(8).model.rpar(1) = 5*10^(-i);
- scs_m.objs(9).model.rpar(1) = 5*10^(-i);
+ scs_m.objs(8).model.rpar(1) = 5*10^-i;
+ scs_m.objs(9).model.rpar(1) = 5*10^-i;
  // Modify solver and 'max step size' + run DoPri + save results
  scs_m.props.tol(7) = 5*10^(-i); scs_m.props.tol(6) = 5;           // 'max step size' + solver
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;   // DoPri
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;   // DoPri
  doprival = res.values;   // Results
  time = res.time;         // Time
  // Modify solver and 'max step size' + run CVode + save results
  scs_m.props.tol(7) = 0; scs_m.props.tol(6) = 1;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;
  cvval = res.values;
  // Compare results
  compa = abs(doprival-cvval);
@@ -1,4 +1,3 @@
-
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2012 - Scilab Enterprises - Paul Bignier
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/DoPri_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
 
 for i=2:4  // 'max step size' = 5*10^-i, precision
 
  // Start by updating the clock block period (sampling)
- scs_m.objs(8).model.rpar(1) = 5*10^(-i);
- scs_m.objs(9).model.rpar(1) = 5*10^(-i);
+ scs_m.objs(8).model.rpar(1) = 5*10^-i;
+ scs_m.objs(9).model.rpar(1) = 5*10^-i;
 
  // Modify solver and 'max step size' + run DoPri + save results
  scs_m.props.tol(7) = 5*10^(-i); scs_m.props.tol(6) = 5;           // 'max step size' + solver
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;   // DoPri
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;   // DoPri
  doprival = res.values;   // Results
  time = res.time;         // Time
 
  // Modify solver and 'max step size' + run CVode + save results
  scs_m.props.tol(7) = 0; scs_m.props.tol(6) = 1;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;
  cvval = res.values;
 
  // Compare results
@@ -7,20 +7,20 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/RK_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
-for i=2:4  // 'max step size' = 10^-i, precision
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
+for i=2:4  // 'max step size' = 5*10^-i, precision
  // Start by updating the clock block period (sampling)
- scs_m.objs(7).model.rpar(1) = 5*10^(-i);
- scs_m.objs(8).model.rpar(1) = 5*10^(-i);
+ scs_m.objs(7).model.rpar(1) = 5*10^-i;
+ scs_m.objs(8).model.rpar(1) = 5*10^-i;
  // Modify solver and 'max step size' + run ExpRK + save results
  scs_m.props.tol(7) = 5*10^(-i); scs_m.props.tol(6) = 6;     // 'max step size' + solver
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;   // ExpRK
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;   // ExpRK
  rkval = res.values;   // Results
  time = res.time;      // Time
  // Modify solver and 'max step size' + run CVode + save results
  scs_m.props.tol(7) = 0; scs_m.props.tol(6) = 1;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;
  cvval = res.values;
  // Compare results
  compa = abs(rkval-cvval);
@@ -1,4 +1,3 @@
-
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2012 - Scilab Enterprises - Paul Bignier
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/RK_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
 
-for i=2:4  // 'max step size' = 10^-i, precision
+for i=2:4  // 'max step size' = 5*10^-i, precision
 
  // Start by updating the clock block period (sampling)
- scs_m.objs(7).model.rpar(1) = 5*10^(-i);
- scs_m.objs(8).model.rpar(1) = 5*10^(-i);
+ scs_m.objs(7).model.rpar(1) = 5*10^-i;
+ scs_m.objs(8).model.rpar(1) = 5*10^-i;
 
  // Modify solver and 'max step size' + run ExpRK + save results
  scs_m.props.tol(7) = 5*10^(-i); scs_m.props.tol(6) = 6;     // 'max step size' + solver
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;   // ExpRK
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;   // ExpRK
  rkval = res.values;   // Results
  time = res.time;      // Time
 
  // Modify solver and 'max step size' + run CVode + save results
  scs_m.props.tol(7) = 0; scs_m.props.tol(6) = 1;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end;
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end;
  cvval = res.values;
 
  // Compare results
@@ -7,21 +7,21 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/RK_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
 for i=2:4  // 'max step size' = 10^-i, precision
  // Start by updating the clock block period (sampling)
  scs_m.objs(7).model.rpar(1) = 5*(10^-i);
  scs_m.objs(8).model.rpar(1) = 5*(10^-i);
  // Modify solver and 'max step size' + run ImpRK + save results
- scs_m.props.tol(7) = 5*(10^-i); scs_m.props.tol(6) = 7;         // 'max step size' + solver
+ scs_m.props.tol(7) = 5*(10^-i); scs_m.props.tol(6) = 7;        // 'max step size' + solver
  scs_m.props.tol(2) = 1.0e-12;                                   // reltol
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end  // ImpRK
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end  // ImpRK
  rkval = res.values;   // Results
  time = res.time;      // Time
  // Modify solver and reltol + run CVode + save results
  scs_m.props.tol(6) = 4; scs_m.props.tol(2) = 1.0e-15;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end
  cvval = res.values;
  // Compare results
  compa = abs(rkval-cvval);
@@ -9,8 +9,8 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/RK_test.zcos"));
-Info = scicos_simulate(scs_m, list(), 'nw');
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
+Info = scicos_simulate(scs_m, list());
 
 for i=2:4  // 'max step size' = 10^-i, precision
 
@@ -19,15 +19,15 @@ for i=2:4  // 'max step size' = 10^-i, precision
  scs_m.objs(8).model.rpar(1) = 5*(10^-i);
 
  // Modify solver and 'max step size' + run ImpRK + save results
- scs_m.props.tol(7) = 5*(10^-i); scs_m.props.tol(6) = 7;         // 'max step size' + solver
+ scs_m.props.tol(7) = 5*(10^-i); scs_m.props.tol(6) = 7;        // 'max step size' + solver
  scs_m.props.tol(2) = 1.0e-12;                                   // reltol
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end  // ImpRK
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end  // ImpRK
  rkval = res.values;   // Results
  time = res.time;      // Time
 
  // Modify solver and reltol + run CVode + save results
  scs_m.props.tol(6) = 4; scs_m.props.tol(2) = 1.0e-15;
- try scicos_simulate(scs_m, Info, 'nw'); catch disp(lasterror()); end
+ try scicos_simulate(scs_m, Info); catch disp(lasterror()); end
  cvval = res.values;
 
  // Compare results
@@ -7,15 +7,15 @@
 // <-- ENGLISH IMPOSED -->
 // <-- XCOS TEST -->
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/LSodar_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 // Set solver to LSodar + run LSodar + save results
 scs_m.props.tol(6) = 0;                                         // Set solver to LSodar
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end; // Run LSodar
+try scicos_simulate(scs_m); catch disp(lasterror()); end; // Run LSodar
 lsodarval = res.values;  // Results
 time = res.time;         // Time
 // Set solver to CVode BDF/Newton + run + save results
 scs_m.props.tol(6) = 1;
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end;
+try scicos_simulate(scs_m); catch disp(lasterror()); end;
 cvval = res.values;
 // Compare results
 compa = abs(lsodarval-cvval);
@@ -9,17 +9,17 @@
 // <-- XCOS TEST -->
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/LSodar_test.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 
 // Set solver to LSodar + run LSodar + save results
 scs_m.props.tol(6) = 0;                                         // Set solver to LSodar
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end; // Run LSodar
+try scicos_simulate(scs_m); catch disp(lasterror()); end; // Run LSodar
 lsodarval = res.values;  // Results
 time = res.time;         // Time
 
 // Set solver to CVode BDF/Newton + run + save results
 scs_m.props.tol(6) = 1;
-try scicos_simulate(scs_m, 'nw'); catch disp(lasterror()); end;
+try scicos_simulate(scs_m); catch disp(lasterror()); end;
 cvval = res.values;
 
 // Compare results
diff --git a/scilab/modules/xcos/tests/unit_tests/DoPri_test.zcos b/scilab/modules/xcos/tests/unit_tests/DoPri_test.zcos
deleted file mode 100644 (file)
index 60a3be7..0000000
Binary files a/scilab/modules/xcos/tests/unit_tests/DoPri_test.zcos and /dev/null differ
diff --git a/scilab/modules/xcos/tests/unit_tests/LSodar_test.zcos b/scilab/modules/xcos/tests/unit_tests/LSodar_test.zcos
deleted file mode 100644 (file)
index e464047..0000000
Binary files a/scilab/modules/xcos/tests/unit_tests/LSodar_test.zcos and /dev/null differ
diff --git a/scilab/modules/xcos/tests/unit_tests/RK_test.zcos b/scilab/modules/xcos/tests/unit_tests/RK_test.zcos
deleted file mode 100644 (file)
index 36c3a80..0000000
Binary files a/scilab/modules/xcos/tests/unit_tests/RK_test.zcos and /dev/null differ
diff --git a/scilab/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos b/scilab/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos
new file mode 100644 (file)
index 0000000..49f2167
Binary files /dev/null and b/scilab/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos differ