Xcos tests: fixes 58/12258/10
Paul BIGNIER [Mon, 12 Aug 2013 12:27:02 +0000 (14:27 +0200)]
Removed results display and fully compiled diagram for test to pass on the compilation chain.

Change-Id: I582d0fc3d552140eeaebb736a672c41313d51cda

43 files changed:
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_ODE.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_ODE.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_ODE.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_ODE.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.unix.dia.ref [moved from scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.dia.ref with 55% similarity]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.dia.ref [deleted file]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.tst
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.unix.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.win.dia.ref [new file with mode: 0644]
scilab/modules/scicos/tests/unit_tests/Solvers/DoPri.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/DoPri.tst
scilab/modules/scicos/tests/unit_tests/Solvers/ExpRK.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/ExpRK.tst
scilab/modules/scicos/tests/unit_tests/Solvers/ImpRK.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/ImpRK.tst
scilab/modules/scicos/tests/unit_tests/Solvers/LSodar.dia.ref
scilab/modules/scicos/tests/unit_tests/Solvers/LSodar.tst

diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.dia.ref
deleted file mode 100644 (file)
index ebeb7b7..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-Info = scicos_simulate(scs_m, list());
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Bouncing_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Bouncing_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Bouncing_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 0                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 1                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Bouncing_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-// Modify solver + run DDaskr + save results
-scs_m.props.tol(6) = 102;       // Solver
-scicos_simulate(scs_m, Info);   // DDaskr
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-ddaskrval = res.values;         // Results
-time = res.time;                // Time
-// Modify solver + run IDA + save results
-scs_m.props.tol(6) = 100;      // Solver
-scicos_simulate(scs_m, Info);  // IDA
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-idaval = res.values;           // Results
-// Compare results
-compa = abs(ddaskrval-idaval);
-// Extract mean, standard deviation, maximum
-mea = mean(compa);
-[maxi, indexMaxi] = max(compa);
-stdeviation = st_deviation(compa);
-// Verifying closeness of the results
-assert_checktrue(maxi <= 5d-5);
-assert_checktrue(mea <= 5d-5);
-assert_checktrue(stdeviation <= 5d-5);
index f61423c..3fde5ac 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
@@ -15,7 +19,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 Info = scicos_simulate(scs_m, list());
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.unix.dia.ref
new file mode 100644 (file)
index 0000000..84f1b9e
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Bouncing_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Bouncing_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Bouncing_test_im.c
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 102;       // Solver
+scicos_simulate(scs_m, Info);   // DDaskr
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;      // Solver
+scicos_simulate(scs_m, Info);  // IDA
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+idaval = res.values;           // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 5d-5);
+assert_checktrue(mea <= 5d-5);
+assert_checktrue(stdeviation <= 5d-5);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Bouncing.win.dia.ref
new file mode 100644 (file)
index 0000000..a1ba1f7
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Bouncing_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Bouncing_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Bouncing_test_im.c
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 102;       // Solver
+scicos_simulate(scs_m, Info);   // DDaskr
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;      // Solver
+scicos_simulate(scs_m, Info);  // IDA
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+idaval = res.values;           // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 5d-5);
+assert_checktrue(mea <= 5d-5);
+assert_checktrue(stdeviation <= 5d-5);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.dia.ref
deleted file mode 100644 (file)
index 7bfab2d..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-// Modify solver + run DDaskr + save results
-scs_m.props.tol(6) = 102;       // Solver
-scicos_simulate(scs_m);   // DDaskr
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 5                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 19                     !
-!                                                         !
-!Number of modes  : 19                                    !
-!                                                         !
-!Number of inputs : 1                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[F]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Hydraulics_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-ddaskrval = res.values;         // Results
-time = res.time;                // Time
-// Modify solver + run IDA + save results
-scs_m.props.tol(6) = 100;      // Solver
-scicos_simulate(scs_m);  // IDA
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 5                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 19                     !
-!                                                         !
-!Number of modes  : 19                                    !
-!                                                         !
-!Number of inputs : 1                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[F]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Hydraulics_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-idaval = res.values;           // Results
-// Compare results
-compa = abs(ddaskrval-idaval);
-// Extract mean, standard deviation, maximum
-mea = mean(compa);
-[maxi, indexMaxi] = max(compa);
-stdeviation = st_deviation(compa);
-// Verifying closeness of the results
-assert_checktrue(maxi <= 2d-6);
-assert_checktrue(mea <= 2d-6);
-assert_checktrue(stdeviation <= 2d-6);
index 51b8ca2..c21660d 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
@@ -15,7 +19,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.unix.dia.ref
new file mode 100644 (file)
index 0000000..4896484
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 102;       // Solver
+scicos_simulate(scs_m);   // DDaskr
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;      // Solver
+scicos_simulate(scs_m);  // IDA
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
+idaval = res.values;           // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-6);
+assert_checktrue(mea <= 2d-6);
+assert_checktrue(stdeviation <= 2d-6);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Hydraulics.win.dia.ref
new file mode 100644 (file)
index 0000000..336020a
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 102;       // Solver
+scicos_simulate(scs_m);   // DDaskr
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Hydraulics_test_im.c
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;      // Solver
+scicos_simulate(scs_m);  // IDA
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Hydraulics_test_im.c
+idaval = res.values;           // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-6);
+assert_checktrue(mea <= 2d-6);
+assert_checktrue(stdeviation <= 2d-6);
index c36dc1a..95067b3 100644 (file)
@@ -4,21 +4,20 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 prot = funcprot();
 funcprot(0);
 function message(msg)
- disp(msg);
 endfunction
 funcprot(prot);
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 102;       // Solver
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
-!Diagram has been compiled for explicit solver  !
-!                                               !
-!switching to explicit Solver                   !
 assert_checkequal(ier, 0);
index c194990..d27d0ad 100644 (file)
@@ -4,17 +4,20 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 
 prot = funcprot();
 funcprot(0);
 function message(msg)
- disp(msg);
 endfunction
 funcprot(prot);
 
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.dia.ref
deleted file mode 100644 (file)
index 9a2a9b3..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-Info = scicos_simulate(scs_m, list());
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Platform_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Platform_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Platform_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 4                         !
-!                                                         !
-!Number of algebraic states: 0                            !
-!                                                         !
-!Number of discrete time states  : 2                      !
-!                                                         !
-!Number of zero-crossing surfaces: 1                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/          !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Platform_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-for i=1:2  // 'max step size' = 10^-i, precision
-    // Start by updating the clock block period (sampling)
-    Context.per = 5*10^-i;
-    // Modify solver + run DDaskr + save results
-    scs_m.props.tol(6) = 102;     // Solver
-    scicos_simulate(scs_m, Info, Context); // DDaskr
-    ddaskrval = res.values;       // Results
-    time = res.time;              // Time
-    // Modify solver + run IDA + save results
-    scs_m.props.tol(6) = 100;     // Solver
-    scicos_simulate(scs_m, Info, Context); // IDA
-    idaval = res.values;          // Results
-    // Compare results
-    compa = abs(ddaskrval-idaval);
-    // Extract mean, standard deviation, maximum
-    mea = mean(compa);
-    [maxi, indexMaxi] = max(compa);
-    maxi, mea
-    stdeviation = st_deviation(compa);
-    // Verifying closeness of the results
-    assert_checktrue(maxi <= 5*10^-(i+2));
-    assert_checktrue(mea <= 5*10^-(i+2));
-    assert_checktrue(stdeviation <= 5*10^-(i+2));
-end
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
- maxi  =
-    0.0000197  
- mea  =
-    0.0000043  
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
- maxi  =
-    0.0002730  
- mea  =
-    0.0000455  
index e589c96..9ce78c6 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
@@ -15,9 +19,7 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
-funcprot(prot);
 Info = scicos_simulate(scs_m, list());
 
 for i=1:2  // 'max step size' = 10^-i, precision
@@ -42,7 +44,6 @@ for i=1:2  // 'max step size' = 10^-i, precision
     // Extract mean, standard deviation, maximum
     mea = mean(compa);
     [maxi, indexMaxi] = max(compa);
-    maxi, mea
     stdeviation = st_deviation(compa);
 
     // Verifying closeness of the results
@@ -51,3 +52,4 @@ for i=1:2  // 'max step size' = 10^-i, precision
     assert_checktrue(stdeviation <= 5*10^-(i+2));
 
 end
+funcprot(prot);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.unix.dia.ref
new file mode 100644 (file)
index 0000000..71d4558
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Platform_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Platform_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Platform_test_im.c
+for i=1:2  // 'max step size' = 10^-i, precision
+    // Start by updating the clock block period (sampling)
+    Context.per = 5*10^-i;
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 102;     // Solver
+    scicos_simulate(scs_m, Info, Context); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m, Info, Context); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 5*10^-(i+2));
+    assert_checktrue(mea <= 5*10^-(i+2));
+    assert_checktrue(stdeviation <= 5*10^-(i+2));
+end
+funcprot(prot);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_Platform.win.dia.ref
new file mode 100644 (file)
index 0000000..fe0228d
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Platform_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Platform_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Platform_test_im.c
+for i=1:2  // 'max step size' = 10^-i, precision
+    // Start by updating the clock block period (sampling)
+    Context.per = 5*10^-i;
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 102;     // Solver
+    scicos_simulate(scs_m, Info, Context); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m, Info, Context); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 5*10^-(i+2));
+    assert_checktrue(mea <= 5*10^-(i+2));
+    assert_checktrue(stdeviation <= 5*10^-(i+2));
+end
+funcprot(prot);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.dia.ref
deleted file mode 100644 (file)
index 8b1abed..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-for i=2:3
-    // Start by updating the clock block period (sampling)
-    Context.per = 5*10^-i;
-    Info = scicos_simulate(scs_m, list(), Context);
-    // Modify solver + run DDaskr + save results
-    scs_m.props.tol(6) = 102;     // Solver
-    scicos_simulate(scs_m, Info); // DDaskr
-    ddaskrval = res.values;       // Results
-    time = res.time;              // Time
-    // Modify solver + run IDA + save results
-    scs_m.props.tol(6) = 100;     // Solver
-    scicos_simulate(scs_m, Info); // IDA
-    idaval = res.values;          // Results
-    // Compare results
-    compa = abs(ddaskrval-idaval);
-    // Extract mean, standard deviation, maximum
-    mea = mean(compa);
-    [maxi, indexMaxi] = max(compa);
-    stdeviation = st_deviation(compa);
-    // Verifying closeness of the results
-    assert_checktrue(maxi <= 10^-(i+4));
-    assert_checktrue(mea <= 10^-(i+4));
-    assert_checktrue(stdeviation <= 10^-(i+4));
-end
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 1                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 0                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/          !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 1                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 0                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/          !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
index 04feead..6a3924f 100644 (file)
@@ -4,10 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
 
+ilib_verbose(0); //to remove ilib_* traces
+
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 
@@ -15,25 +18,23 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 
 for i=2:3
 
     // Start by updating the clock block period (sampling)
-    Context.per = 5*10^-i;
-    Info = scicos_simulate(scs_m, list(), Context);
+    scs_m.props.context = "per = 5*10^-"+string(i);
 
     // Modify solver + run DDaskr + save results
     scs_m.props.tol(6) = 102;     // Solver
-    scicos_simulate(scs_m, Info); // DDaskr
+    scicos_simulate(scs_m); // DDaskr
     ddaskrval = res.values;       // Results
     time = res.time;              // Time
 
     // Modify solver + run IDA + save results
     scs_m.props.tol(6) = 100;     // Solver
-    scicos_simulate(scs_m, Info); // IDA
+    scicos_simulate(scs_m); // IDA
     idaval = res.values;          // Results
 
     // Compare results
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.unix.dia.ref
new file mode 100644 (file)
index 0000000..2c90345
--- /dev/null
@@ -0,0 +1,62 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+for i=2:3
+    // Start by updating the clock block period (sampling)
+    scs_m.props.context = "per = 5*10^-"+string(i);
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 102;     // Solver
+    scicos_simulate(scs_m); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 10^-(i+4));
+    assert_checktrue(mea <= 10^-(i+4));
+    assert_checktrue(stdeviation <= 10^-(i+4));
+end
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrK_RLC.win.dia.ref
new file mode 100644 (file)
index 0000000..5d3eb51
--- /dev/null
@@ -0,0 +1,62 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+for i=2:3
+    // Start by updating the clock block period (sampling)
+    scs_m.props.context = "per = 5*10^-"+string(i);
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 102;     // Solver
+    scicos_simulate(scs_m); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 10^-(i+4));
+    assert_checktrue(mea <= 10^-(i+4));
+    assert_checktrue(stdeviation <= 10^-(i+4));
+end
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.dia.ref
deleted file mode 100644 (file)
index 60547b8..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-Info = scicos_simulate(scs_m, list());
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Bouncing_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Bouncing_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Bouncing_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 0                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 1                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/           !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Bouncing_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-// Modify solver + run DDaskr + save results
-scs_m.props.tol(6) = 101;      // Solver
-scicos_simulate(scs_m, Info);  // DDaskr
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-ddaskrval = res.values;         // Results
-time = res.time;                // Time
-// Modify solver + run IDA + save results
-scs_m.props.tol(6) = 100;     // Solver
-scicos_simulate(scs_m, Info); // IDA
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-idaval = res.values;          // Results
-// Compare results
-compa = abs(ddaskrval-idaval);
-// Extract mean, standard deviation, maximum
-mea = mean(compa);
-[maxi, indexMaxi] = max(compa);
-stdeviation = st_deviation(compa);
-// Verifying closeness of the results
-assert_checktrue(maxi <= 1d-12);
-assert_checktrue(mea <= 1d-12);
-assert_checktrue(stdeviation <= 1d-12);
index 5fa85e4..b660814 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
@@ -15,7 +19,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 Info = scicos_simulate(scs_m, list());
@@ -40,6 +43,6 @@ mea = mean(compa);
 stdeviation = st_deviation(compa);
 
 // Verifying closeness of the results
-assert_checktrue(maxi <= 1d-12);
+assert_checktrue(maxi <= 2d-12);
 assert_checktrue(mea <= 1d-12);
 assert_checktrue(stdeviation <= 1d-12);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.unix.dia.ref
new file mode 100644 (file)
index 0000000..c02095f
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Bouncing_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Bouncing_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Bouncing_test_im.c
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 101;      // Solver
+scicos_simulate(scs_m, Info);  // DDaskr
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;     // Solver
+scicos_simulate(scs_m, Info); // IDA
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+idaval = res.values;          // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-12);
+assert_checktrue(mea <= 1d-12);
+assert_checktrue(stdeviation <= 1d-12);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Bouncing.win.dia.ref
new file mode 100644 (file)
index 0000000..bba92d4
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Bouncing_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Bouncing_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Bouncing_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Bouncing_test_im.c
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 101;      // Solver
+scicos_simulate(scs_m, Info);  // DDaskr
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;     // Solver
+scicos_simulate(scs_m, Info); // IDA
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+idaval = res.values;          // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-12);
+assert_checktrue(mea <= 1d-12);
+assert_checktrue(stdeviation <= 1d-12);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.dia.ref
deleted file mode 100644 (file)
index 1bb65a6..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-// Modify solver + run DDaskr + save results
-scs_m.props.tol(6) = 101;       // Solver
-scicos_simulate(scs_m);   // DDaskr
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 5                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 19                     !
-!                                                         !
-!Number of modes  : 19                                    !
-!                                                         !
-!Number of inputs : 1                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[F]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/          !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Hydraulics_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-ddaskrval = res.values;         // Results
-time = res.time;                // Time
-// Modify solver + run IDA + save results
-scs_m.props.tol(6) = 100;       // Solver
-scicos_simulate(scs_m);   // IDA
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 5                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 19                     !
-!                                                         !
-!Number of modes  : 19                                    !
-!                                                         !
-!Number of inputs : 1                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[F]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/          !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Hydraulics_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-idaval = res.values;            // Results
-// Compare results
-compa = abs(ddaskrval-idaval);
-// Extract mean, standard deviation, maximum
-mea = mean(compa);
-[maxi, indexMaxi] = max(compa);
-stdeviation = st_deviation(compa);
-// Verifying closeness of the results
-assert_checktrue(maxi <= 2d-7);
-assert_checktrue(mea <= 2d-7);
-assert_checktrue(stdeviation <= 2d-7);
index 4780eb5..1704647 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
@@ -15,7 +19,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.unix.dia.ref
new file mode 100644 (file)
index 0000000..cf59af8
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 101;       // Solver
+scicos_simulate(scs_m);   // DDaskr
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;       // Solver
+scicos_simulate(scs_m);   // IDA
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_Hydraulics_test_im.c
+idaval = res.values;            // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-7);
+assert_checktrue(mea <= 2d-7);
+assert_checktrue(stdeviation <= 2d-7);
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Hydraulics.win.dia.ref
new file mode 100644 (file)
index 0000000..f6e25d9
--- /dev/null
@@ -0,0 +1,49 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Hydraulics_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+// Modify solver + run DDaskr + save results
+scs_m.props.tol(6) = 101;       // Solver
+scicos_simulate(scs_m);   // DDaskr
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Hydraulics_test_im.c
+ddaskrval = res.values;         // Results
+time = res.time;                // Time
+// Modify solver + run IDA + save results
+scs_m.props.tol(6) = 100;       // Solver
+scicos_simulate(scs_m);   // IDA
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Hydraulics_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Hydraulics_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Hydraulics_test_im.c
+idaval = res.values;            // Results
+// Compare results
+compa = abs(ddaskrval-idaval);
+// Extract mean, standard deviation, maximum
+mea = mean(compa);
+[maxi, indexMaxi] = max(compa);
+stdeviation = st_deviation(compa);
+// Verifying closeness of the results
+assert_checktrue(maxi <= 2d-7);
+assert_checktrue(mea <= 2d-7);
+assert_checktrue(stdeviation <= 2d-7);
index c5d0fef..7c8b8ba 100644 (file)
@@ -4,21 +4,20 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 prot = funcprot();
 funcprot(0);
 function message(msg)
- disp(msg);
 endfunction
 funcprot(prot);
 // Modify solver + run DDaskr + save results
 scs_m.props.tol(6) = 101;       // Solver
 ier = execstr('xcos_simulate(scs_m, 4);', 'errcatch'); // Run simulation (LSodar will actually take over DDaskr)
-!Diagram has been compiled for explicit solver  !
-!                                               !
-!switching to explicit Solver                   !
 assert_checkequal(ier, 0);
index 6e7d62c..e588bbf 100644 (file)
@@ -4,17 +4,20 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/ODE.zcos"));
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 
 prot = funcprot();
 funcprot(0);
 function message(msg)
- disp(msg);
 endfunction
 funcprot(prot);
 
index b78423c..63f40e2 100644 (file)
@@ -4,9 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+
+ilib_verbose(0); //to remove ilib_* traces
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
@@ -15,7 +19,6 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 Info = scicos_simulate(scs_m, list());
@@ -4,15 +4,18 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
 // Redefining messagebox() to avoid popup
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 Info = scicos_simulate(scs_m, list());
@@ -21,44 +24,6 @@ Info = scicos_simulate(scs_m, list());
 
  Flat Modelica : TMPDIR/DDaskr_Platform_test_imf.mo
  Simulation C code :TMPDIR/DDaskr_Platform_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 4                         !
-!                                                         !
-!Number of algebraic states: 0                            !
-!                                                         !
-!Number of discrete time states  : 2                      !
-!                                                         !
-!Number of zero-crossing surfaces: 1                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_Platform_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
 for i=1:3  // 'max step size' = 10^-i, precision
     // Start by updating the clock block period (sampling)
     Context.per = 5*10^-i;
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_Platform.win.dia.ref
new file mode 100644 (file)
index 0000000..4eda407
--- /dev/null
@@ -0,0 +1,60 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+//
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_Platform_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+Info = scicos_simulate(scs_m, list());
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_Platform_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_Platform_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_Platform_test_im.c
+for i=1:3  // 'max step size' = 10^-i, precision
+    // Start by updating the clock block period (sampling)
+    Context.per = 5*10^-i;
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 101;     // Solver
+    scicos_simulate(scs_m, Info, Context); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m, Info, Context); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 5*10^-(i+3));
+    assert_checktrue(mea <= 5*10^-(i+3));
+    assert_checktrue(stdeviation <= 5*10^-(i+3));
+end
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
+
+Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.dia.ref
deleted file mode 100644 (file)
index 9593072..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-// =============================================================================
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
-//
-//  This file is distributed under the same license as the Scilab package.
-// =============================================================================
-// <-- ENGLISH IMPOSED -->
-// <-- XCOS TEST -->
-// Import diagram
-assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
-// Redefining messagebox() to avoid popup
-prot = funcprot();
-funcprot(0);
-function messagebox(msg, msg_title)
- disp(msg);
-endfunction
-funcprot(prot);
-for i=2:3
-    // Start by updating the clock block period (sampling)
-    Context.per = 5*10^-i;
-    Info = scicos_simulate(scs_m, list(), Context);
-    // Modify solver + run DDaskr + save results
-    scs_m.props.tol(6) = 101;     // Solver
-    scicos_simulate(scs_m, Info); // DDaskr
-    ddaskrval = res.values;       // Results
-    time = res.time;              // Time
-    // Modify solver + run IDA + save results
-    scs_m.props.tol(6) = 100;     // Solver
-    scicos_simulate(scs_m, Info); // IDA
-    idaval = res.values;          // Results
-    // Compare results
-    compa = abs(ddaskrval-idaval);
-    // Extract mean, standard deviation, maximum
-    mea = mean(compa);
-    [maxi, indexMaxi] = max(compa);
-    stdeviation = st_deviation(compa);
-    // Verifying closeness of the results
-    assert_checktrue(maxi <= 10^-(i+4));
-    assert_checktrue(mea <= 10^-(i+4));
-    assert_checktrue(stdeviation <= 10^-(i+4));
-end
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 1                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 0                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
---------------------------------------------\
- Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
-
- Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
- Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
-!Modelica blocks are reduced to a block with:             !
-!                                                         !
-!Number of differential states: 2                         !
-!                                                         !
-!Number of algebraic states: 1                            !
-!                                                         !
-!Number of discrete time states  : 0                      !
-!                                                         !
-!Number of zero-crossing surfaces: 0                      !
-!                                                         !
-!Number of modes  : 0                                     !
-!                                                         !
-!Number of inputs : 0                                     !
-!                                                         !
-!Number of outputs: 1                                     !
-!                                                         !
-!Input/output dependency:[T]                              !
-!                                                         !
-!Analytical Jacobian: enabled  (%Jacobian=%t)             !
-!                                                         !
-!Parameter embedding mode: enabled (%Modelica_ParEmb=%t)  !
-!                                                         !
-!                                                         !
-!                                                         !
-!Generated files path: TMPDIR/         !
-!                                                         !
-!                                                         !
-   Generate a loader file
-   Generate a Makefile
-   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR
-   ilib_gen_Make: Copy DDaskr_RLC_test_im.c to TMPDIR
-   ilib_gen_Make: configure : Generate Makefile.
-   ilib_gen_Make: Modification of the Makefile in TMPDIR.
-   Running the Makefile
-   Generate a cleaner file
-Shared archive loaded.
-Link done.
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
-Warning : redefining function: dst                     . Use funcprot(0) to avoid this message
-
index 70ee9dd..8f274ba 100644 (file)
@@ -4,10 +4,13 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
 
+ilib_verbose(0); //to remove ilib_* traces
+
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
 
@@ -15,25 +18,23 @@ assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DD
 prot = funcprot();
 funcprot(0);
 function messagebox(msg, msg_title)
- disp(msg);
 endfunction
 funcprot(prot);
 
 for i=2:3
 
     // Start by updating the clock block period (sampling)
-    Context.per = 5*10^-i;
-    Info = scicos_simulate(scs_m, list(), Context);
+    scs_m.props.context = "per = 5*10^-"+string(i);
 
     // Modify solver + run DDaskr + save results
     scs_m.props.tol(6) = 101;     // Solver
-    scicos_simulate(scs_m, Info); // DDaskr
+    scicos_simulate(scs_m); // DDaskr
     ddaskrval = res.values;       // Results
     time = res.time;              // Time
 
     // Modify solver + run IDA + save results
     scs_m.props.tol(6) = 100;     // Solver
-    scicos_simulate(scs_m, Info); // IDA
+    scicos_simulate(scs_m); // IDA
     idaval = res.values;          // Results
 
     // Compare results
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.unix.dia.ref
new file mode 100644 (file)
index 0000000..201e8bf
--- /dev/null
@@ -0,0 +1,62 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+for i=2:3
+    // Start by updating the clock block period (sampling)
+    scs_m.props.context = "per = 5*10^-"+string(i);
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 101;     // Solver
+    scicos_simulate(scs_m); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 10^-(i+4));
+    assert_checktrue(mea <= 10^-(i+4));
+    assert_checktrue(stdeviation <= 10^-(i+4));
+end
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR/DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR/DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR/DDaskr_RLC_test_im.c
diff --git a/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.win.dia.ref b/scilab/modules/scicos/tests/unit_tests/Solvers/DDaskrN_RLC.win.dia.ref
new file mode 100644 (file)
index 0000000..c8aa06d
--- /dev/null
@@ -0,0 +1,62 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Paul Bignier
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- ENGLISH IMPOSED -->
+//
+// <-- XCOS TEST -->
+ilib_verbose(0); //to remove ilib_* traces
+// Import diagram
+assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/DDaskr_RLC_test.zcos"));
+// Redefining messagebox() to avoid popup
+prot = funcprot();
+funcprot(0);
+function messagebox(msg, msg_title)
+endfunction
+funcprot(prot);
+for i=2:3
+    // Start by updating the clock block period (sampling)
+    scs_m.props.context = "per = 5*10^-"+string(i);
+    // Modify solver + run DDaskr + save results
+    scs_m.props.tol(6) = 101;     // Solver
+    scicos_simulate(scs_m); // DDaskr
+    ddaskrval = res.values;       // Results
+    time = res.time;              // Time
+    // Modify solver + run IDA + save results
+    scs_m.props.tol(6) = 100;     // Solver
+    scicos_simulate(scs_m); // IDA
+    idaval = res.values;          // Results
+    // Compare results
+    compa = abs(ddaskrval-idaval);
+    // Extract mean, standard deviation, maximum
+    mea = mean(compa);
+    [maxi, indexMaxi] = max(compa);
+    stdeviation = st_deviation(compa);
+    // Verifying closeness of the results
+    assert_checktrue(maxi <= 10^-(i+4));
+    assert_checktrue(mea <= 10^-(i+4));
+    assert_checktrue(stdeviation <= 10^-(i+4));
+end
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
+--------------------------------------------\
+ Main Modelica : TMPDIR\DDaskr_RLC_test_im.mo
+
+ Flat Modelica : TMPDIR\DDaskr_RLC_test_imf.mo
+ Simulation C code :TMPDIR\DDaskr_RLC_test_im.c
index 1a9b74e..fef90a5 100644 (file)
@@ -4,8 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 Info = scicos_simulate(scs_m, list());
index b466d7f..41adabd 100644 (file)
@@ -4,9 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
index 0627b6b..5b5886c 100644 (file)
@@ -4,8 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 Info = scicos_simulate(scs_m, list());
index e6d29fc..5126277 100644 (file)
@@ -4,9 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
index 44fbf36..fc0bd51 100644 (file)
@@ -4,8 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 Info = scicos_simulate(scs_m, list());
index 475def4..12b6431 100644 (file)
@@ -4,9 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
index 214704a..45ffae4 100644 (file)
@@ -4,8 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));
 // Set solver to LSodar + run LSodar + save results
index b887f6c..982b28a 100644 (file)
@@ -4,9 +4,11 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
-
+//
 // <-- ENGLISH IMPOSED -->
+//
 // <-- XCOS TEST -->
+//
 
 // Import diagram
 assert_checktrue(importXcosDiagram("SCI/modules/xcos/tests/unit_tests/Solvers/Kalman.zcos"));