Xcos MVC: for Params, match Scilab 5 order 26/17926/2
Paul Bignier [Mon, 14 Mar 2016 16:03:39 +0000 (17:03 +0100)]
 * https://help.scilab.org/docs/5.5.2/en_US/scicos_params.html shows the right order
 * https://codereview.scilab.org/#/c/17913/ did the same for the Java part

Change-Id: Iea59872afed46dedd06523a06480bd4e6b3432ab

scilab/modules/scicos/src/cpp/model/Diagram.hxx

index 15fe80b..02631cb 100644 (file)
@@ -35,19 +35,19 @@ struct SimulationConfig
     double relative_tolerance;  //!< Integrator relative tolerance for the numerical solver.
     double time_tolerance;      //!< Tolerance on time.
     double delta_t;             //!< Maximum integration time interval.
-    double delta_h;             //!< Maximum step interval.
     double realtime_scale;      //!< Real-time scaling; the value 0 corresponds to no real-time scaling.
     double solver;              //!< Current numerical solver.
+    double delta_h;             //!< Maximum step interval.
 
     SimulationConfig() : final_time(100000), absolute_tolerance(1e-6), relative_tolerance(1e-6),
-        time_tolerance(1e-10), delta_t(final_time + 1), delta_h(0), realtime_scale(1), solver(0) {};
+        time_tolerance(1e-10), delta_t(final_time + 1), realtime_scale(0), solver(1), delta_h(0) {};
 
     SimulationConfig(const SimulationConfig& p) :  final_time(p.final_time), absolute_tolerance(p.absolute_tolerance),
         relative_tolerance(p.relative_tolerance), time_tolerance(p.time_tolerance), delta_t(p.delta_t),
-        delta_h(p.delta_h), realtime_scale(p.realtime_scale), solver(p.solver) {};
+        realtime_scale(p.realtime_scale), solver(p.solver), delta_h(p.delta_h) {};
 
     SimulationConfig(const std::vector<double>& p) : final_time(p[0]), absolute_tolerance(p[1]), relative_tolerance(p[2]),
-        time_tolerance(p[3]), delta_t(p[4]), delta_h(p[5]), realtime_scale(p[6]), solver(p[7]) {};
+        time_tolerance(p[3]), delta_t(p[4]), realtime_scale(p[5]), solver(p[6]), delta_h(p[7]) {};
 
     void fill(std::vector<double>& p) const
     {
@@ -57,15 +57,15 @@ struct SimulationConfig
         p[2] = relative_tolerance;
         p[3] = time_tolerance;
         p[4] = delta_t;
-        p[5] = delta_h;
-        p[6] = realtime_scale;
-        p[7] = solver;
+        p[5] = realtime_scale;
+        p[6] = solver;
+        p[7] = delta_h;
     }
     bool operator==(const SimulationConfig& p) const
     {
         return final_time == p.final_time && absolute_tolerance == p.absolute_tolerance &&
                relative_tolerance == p.relative_tolerance && time_tolerance == p.time_tolerance &&
-               delta_t == p.delta_t && delta_h == p.delta_h && realtime_scale == p.realtime_scale && solver == p.solver;
+               delta_t == p.delta_t && realtime_scale == p.realtime_scale && solver == p.solver && delta_h == p.delta_h;
     }
 };