Ask Simulink engine to skip continuous state consistency check
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I am running a simulation file with simulink and I am getting the following warning:
Warning: Simulink detected that S-function 'sim_EG/SeriesHybridVehicle/S-Function' changed the value of one or more elements of its continuous
state vector without resetting the ODE solver at time 66.0. Continuous states should only be changed in a major time step and the S-function
should request a solver reset using 'ssSetSolverNeedsReset' macro. Changing states without resetting the solver can lead to unexpected results,
especially in accelerated simulation modes. Use 'ssSetSkipContStatesConsistencyCheck(S,1)' in mdlInitializeSizes method to disable this check
once you have fixed your S-function.
I am kinda pretty sure that my S-function for the simulation is correct and I just wanted to get rid of this warning. MATLAB help says that I have to use ssSetSkipContStatesConsistencyCheck(S,1) in the mdlInitializeSizes method but I really do not know how use it. Should I use the code in MATLAB editor or somewhere else.
I would really apprecitate it if someone could help me with that.
Thanks
Mo
2 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!