Remove 'Run with' comments because they won't be valid if files move.
Turned constants such as "3*10^-3" into 'real constants' "3d-3" for faster comprehension.
Change-Id: I30a13d52d6856b5e1221f4c8d6dd6e7a3fc8dbaf
[maxi, indexMaxi] = max(compa);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 5*10^-(5));
-assert_checktrue(mea <= 5*10^-(5));
-assert_checktrue(stdeviation <= 5*10^-(5));
+assert_checktrue(maxi <= 5d-5);
+assert_checktrue(mea <= 5d-5);
+assert_checktrue(stdeviation <= 5d-5);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 5*10^-(5));
-assert_checktrue(mea <= 5*10^-(5));
-assert_checktrue(stdeviation <= 5*10^-(5));
+assert_checktrue(maxi <= 5d-5);
+assert_checktrue(mea <= 5d-5);
+assert_checktrue(stdeviation <= 5d-5);
[maxi, indexMaxi] = max(compa);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 2*10^-(6));
-assert_checktrue(mea <= 2*10^-(6));
-assert_checktrue(stdeviation <= 2*10^-(6));
+assert_checktrue(maxi <= 2d-6);
+assert_checktrue(mea <= 2d-6);
+assert_checktrue(stdeviation <= 2d-6);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 2*10^-(6));
-assert_checktrue(mea <= 2*10^-(6));
-assert_checktrue(stdeviation <= 2*10^-(6));
+assert_checktrue(maxi <= 2d-6);
+assert_checktrue(mea <= 2d-6);
+assert_checktrue(stdeviation <= 2d-6);
! !
! !
! !
-!Generated files path: TMPDIR/ !
+!Generated files path: TMPDIR/ !
! !
! !
Generate a loader file
[maxi, indexMaxi] = max(compa);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 10^-(12));
-assert_checktrue(mea <= 10^-(12));
-assert_checktrue(stdeviation <= 10^-(12));
+assert_checktrue(maxi <= 1d-12);
+assert_checktrue(mea <= 1d-12);
+assert_checktrue(stdeviation <= 1d-12);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 10^-(12));
-assert_checktrue(mea <= 10^-(12));
-assert_checktrue(stdeviation <= 10^-(12));
+assert_checktrue(maxi <= 1d-12);
+assert_checktrue(mea <= 1d-12);
+assert_checktrue(stdeviation <= 1d-12);
! !
! !
! !
-!Generated files path: TMPDIR/ !
+!Generated files path: TMPDIR/ !
! !
! !
Generate a loader file
! !
! !
! !
-!Generated files path: TMPDIR/ !
+!Generated files path: TMPDIR/ !
! !
! !
Generate a loader file
[maxi, indexMaxi] = max(compa);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 2*10^-(7));
-assert_checktrue(mea <= 2*10^-(7));
-assert_checktrue(stdeviation <= 2*10^-(7));
+assert_checktrue(maxi <= 2d-7);
+assert_checktrue(mea <= 2d-7);
+assert_checktrue(stdeviation <= 2d-7);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 2*10^-(7));
-assert_checktrue(mea <= 2*10^-(7));
-assert_checktrue(stdeviation <= 2*10^-(7));
+assert_checktrue(maxi <= 2d-7);
+assert_checktrue(mea <= 2d-7);
+assert_checktrue(stdeviation <= 2d-7);
[maxi, indexMaxi] = max(compa);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 10^-8);
-assert_checktrue(mea <= 10^-8);
-assert_checktrue(stdeviation <= 10^-8);
+assert_checktrue(maxi <= 1d-8);
+assert_checktrue(mea <= 1d-8);
+assert_checktrue(stdeviation <= 1d-8);
stdeviation = st_deviation(compa);
// Verifying closeness of the results
-assert_checktrue(maxi <= 10^-8);
-assert_checktrue(mea <= 10^-8);
-assert_checktrue(stdeviation <= 10^-8);
+assert_checktrue(maxi <= 1d-8);
+assert_checktrue(mea <= 1d-8);
+assert_checktrue(stdeviation <= 1d-8);
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/Rootfinding.sce");
-
// Import the "with-ZC" diagram and augment the ending time
loadScicos();
loadXcosLibs();
scs_m.props.tf = 30000;
// Set tolerances and select LSodar
-scs_m.props.tol(1) = 1.0e-13;
-scs_m.props.tol(2) = 1.0e-13;
+scs_m.props.tol(1) = 1d-13;
+scs_m.props.tol(2) = 1d-13;
scs_m.props.tol(6) = 0;
// Start the timer, launch the simulation and display time
scs_m.props.tf = 30000;
// Set tolerances and select LSodar
-scs_m.props.tol(1) = 1.0e-13;
-scs_m.props.tol(2) = 1.0e-13;
+scs_m.props.tol(1) = 1d-13;
+scs_m.props.tol(2) = 1d-13;
scs_m.props.tol(6) = 0;
// Start the timer, launch the simulation and display time
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/RootfindingSimple.sce");
-
// Import the "with-ZC" diagram and augment the ending time
loadScicos();
loadXcosLibs();
scs_m.props.tf = 30;
// Set tolerances and select LSodar
-scs_m.props.tol(1) = 1.0e-7;
-scs_m.props.tol(2) = 1.0e-7;
+scs_m.props.tol(1) = 1d-7;
+scs_m.props.tol(2) = 1d-7;
scs_m.props.tol(6) = 0;
// Start the timer, launch the simulation and display time
scs_m.props.tf = 30;
// Set tolerances and select LSodar
-scs_m.props.tol(1) = 1.0e-7;
-scs_m.props.tol(2) = 1.0e-7;
+scs_m.props.tol(1) = 1d-7;
+scs_m.props.tol(2) = 1d-7;
scs_m.props.tol(6) = 0;
// Start the timer, launch the simulation and display time
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/benchBasic.sce");
-
// Import the diagram, augment the ending time and store its compilation in Info()
loadScicos();
loadXcosLibs();
Info = scicos_simulate(scs_m, "nw");
tf = 4000;
tolerances = scs_m.props.tol;
-tolerances(1) = 10^(-13);
-tolerances(2) = 10^(-13);
+tolerances(1) = 1d-13;
+tolerances(2) = 1d-13;
[%tcur, %cpr, alreadyran, needstart, needcompile, %state0] = Info(:);
solverName = ["LSodar", "CVode BDF/Newton", "CVode BDF/Functional", "CVode Adams/Newton", "CVode Adams/Functional", "Dormand-Prince", "Runge-Kutta", "implicit Runge-Kutta"];
tolerances(6) = solver;
// Modify 'Max step size' if RK-based solver
- if (solver >= 5) then tolerances(7) = 3*10^(-2); end
+ if (solver >= 5) then tolerances(7) = 0.03; end
// Start the solver
[state, t] = scicosim(%state0, 0.0, tf, %cpr.sim, "start", tolerances);
end
disp("--------------------------------");
-
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/benchKalman.sce");
-
// Import the diagram, augment the ending time and store its compilation in Info()
loadScicos();
loadXcosLibs();
Info = scicos_simulate(scs_m, "nw");
tf = 1050;
tolerances = scs_m.props.tol;
-tolerances(1) = 10^(-13);
-tolerances(2) = 10^(-13);
+tolerances(1) = 1d-13;
+tolerances(2) = 1d-13;
[%tcur, %cpr, alreadyran, needstart, needcompile, %state0] = Info(:);
solverName = ["LSodar", "CVode BDF/Newton", "CVode BDF/Functional", "CVode Adams/Newton", "CVode Adams/Functional", "Dormand-Prince", "Runge-Kutta", "implicit Runge-Kutta"];
tolerances(6) = solver;
// Modify 'Max step size' if RK-based solver
- if (solver >= 5) then tolerances(7) = 3*10^(-2); end
+ if (solver >= 5) then tolerances(7) = 0.03; end
- // Implicit RK does not support tolerances above 10^-(11) for this diagram
- if (solver >= 7) then tolerances(1) = 10^(-10); end
- if (solver >= 7) then tolerances(2) = 10^(-10); end
+ // Implicit RK does not support tolerances above 10^-11 for this diagram
+ if (solver >= 7) then tolerances(1) = 1d-10; end
+ if (solver >= 7) then tolerances(2) = 1d-10; end
// Start the solver
[state, t] = scicosim(%state0, 0.0, tf, %cpr.sim, "start", tolerances);
end
disp("--------------------------------");
-
tolerances(6) = solver;
// Modify 'Max step size' if RK-based solver
- if (solver >= 5) then tolerances(7) = 10^(-2); end
+ if (solver >= 5) then tolerances(7) = 0.01; end
// Start the solver
[state, t] = scicosim(%state0, 0.0, tf, %cpr.sim, "start", tolerances);
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/integ.sce");
-
// Import the diagram and augment the ending time
loadScicos();
loadXcosLibs();
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/integDoPri.sce");
-
// Import the diagram and augment the ending time
loadScicos();
loadXcosLibs();
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/integRK.sce");
-
// Import the diagram and augment the ending time
loadScicos();
loadXcosLibs();
if (solver == 5) then scs_m.props.tol(6) = 7; end
// Set max step size and reltol if implicit Runge-Kutta
- if (solver == 5) then scs_m.props.tol(7) = 0.01; scs_m.props.tol(2) = 1.0e-10; end
+ if (solver == 5) then scs_m.props.tol(7) = 0.01; scs_m.props.tol(2) = 1d-10; end
// Start the timer, launch the simulation and display time
tic();
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/integLSodar.sce");
-
// Import the diagram and augment the ending time
loadScicos();
loadXcosLibs();
//
// This file is released under the 3-clause BSD license. See COPYING-BSD.
-// Run with exec("SCI/modules/xcos/examples/solvers/integRK.sce");
-
// Import the diagram and augment the ending time
loadScicos();
loadXcosLibs();