File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
SimulationRuntime/cpp/Solver/RTEuler Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1794,9 +1794,18 @@ extern "C" void debugSimulation(void)
17941794 getMotionCycle(cycletime);
17951795
17961796 initSimulation(simController, simData, cycletime);
1797- for(int i = 0; i < 1000; i++ )
1797+ while(true )
17981798 {
1799- simController->calcOneStep();
1799+ try
1800+ {
1801+ wvEvent(1,NULL,0);
1802+ simController->calcOneStep();
1803+ wvEvent(2,NULL,0);
1804+ }
1805+ catch(ModelicaSimulationError& ex)
1806+ {
1807+ break;
1808+ }
18001809 }
18011810 delete simController;
18021811
Original file line number Diff line number Diff line change @@ -36,14 +36,16 @@ void RTEuler::initialize()
3636 _mixed_system = dynamic_cast <IMixedSystem*>(_system);
3737 _time_system = dynamic_cast <ITime*>(_system);
3838
39+ _dimSys = _continuous_system->getDimContinuousStates ();
40+
3941 if (_dimSys == 0 )
4042 return ;
4143
4244 // (Re-) Initialization of solver -> call default implementation service
4345 SolverDefaultImplementation::initialize ();
4446
4547 // Dimension of the system (number of variables)
46- _dimSys = _continuous_system-> getDimContinuousStates ();
48+
4749
4850 // Check system dimension
4951 if (_dimSys == 0 )
You can’t perform that action at this time.
0 commit comments