Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4944 closed defect (invalid)

Simulation wrongly reported as successful.

Reported by: massimo ceraolo Owned by: Willi Braun
Priority: normal Milestone: Future
Component: Run-time Version:
Keywords: Cc:

Description

The simulation of the enclosed file InvSVPWM.mo wrongly reports to be successful. Indeed all plot variables seem to be empty.
Note that InvSVPWM.mo requires loading power Systems Library.

Attachments (1)

InvSVPWM.mo (6.1 KB ) - added by massimo ceraolo 7 years ago.

Download all attachments as: .zip

Change History (9)

by massimo ceraolo, 7 years ago

Attachment: InvSVPWM.mo added

comment:1 by Adeel Asghar, 7 years ago

Component: OMEditRun-time
Owner: changed from Adeel Asghar to Willi Braun
Status: newassigned

comment:2 by Martin Sjölund, 7 years ago

I get:

marsj@marsj-Precision-5510:~/tmp$ ./InvSVPWM 
LOG_SUCCESS       | info    | The initialization finished successfully without homotopy method.
LOG_SUCCESS       | info    | The simulation finished successfully.
marsj@marsj-Precision-5510:~/tmp$ echo $?
0
marsj@marsj-Precision-5510:~/tmp$ ls -lh InvSVPWM_res.mat 
-rw-rw-r-- 1 marsj marsj 37M maj 22 07:50 InvSVPWM_res.mat

Did you run the simulation with any special flags?

comment:3 by massimo ceraolo, 7 years ago

My mistake, sorry: final time was inadvertently set to 0:

experiment(StopTime = 0, Interval = 2e-05),

OpenModelica_commandLineOptions = "");

I'm going to close this.
However, maybe it is not a bad idea to emit a warning when final time equals initial time.

Or maybe in cases like this, in which Interval is larger than (StopTime-StartTime) it is more appropriate to generate an error?

Last edited 7 years ago by massimo ceraolo (previous) (diff)

comment:4 by massimo ceraolo, 7 years ago

Resolution: invalid
Status: assignedclosed

in reply to:  3 ; comment:5 by Francesco Casella, 7 years ago

Replying to ceraolo:

My mistake, sorry: final time was inadvertently set to 0:

experiment(StopTime = 0, Interval = 2e-05),

OpenModelica_commandLineOptions = "");

I'm going to close this.
However, maybe it is not a bad idea to emit a warning when final time equals initial time.

This could be useful.

Or maybe in cases like this, in which Interval is larger than (StopTime-StartTime) it is more appropriate to generate an error?

I don't think so. If one has issues with initialization, a typical strategy is to turn on all LOG_NLS_V and at the same time set StopTime=0, so that when the initialization problem is finally fixed, the simulation result window is not clogged by a ton of (irrelevant) debug info during simulation, which may actuall hang OMEdit for good. This situation should not lead to an error.

in reply to:  5 comment:6 by Adeel Asghar, 7 years ago

Replying to casella:

Replying to ceraolo:

My mistake, sorry: final time was inadvertently set to 0:

experiment(StopTime = 0, Interval = 2e-05),

OpenModelica_commandLineOptions = "");

I'm going to close this.
However, maybe it is not a bad idea to emit a warning when final time equals initial time.

This could be useful.

OMEdit already have this check,

if (starttime > stoptime) then error;

I will update it to,

if (starttime >= stoptime) then error;


Or maybe in cases like this, in which Interval is larger than (StopTime-StartTime) it is more appropriate to generate an error?

I don't think so. If one has issues with initialization, a typical strategy is to turn on all LOG_NLS_V and at the same time set StopTime=0, so that when the initialization problem is finally fixed, the simulation result window is not clogged by a ton of (irrelevant) debug info during simulation, which may actuall hang OMEdit for good. This situation should not lead to an error.

comment:7 by Martin Sjölund, 7 years ago

No, OMEdit should not make starttime == stoptime an error. Better would be to make the simulation output something like:

LOG_SUCCESS       | info    | Skipped time integration since starttime == stoptime

Instead of:

LOG_SUCCESS       | info    | The simulation finished successfully.

in reply to:  7 comment:8 by Lennart Ochel, 7 years ago

Replying to sjoelund.se:

No, OMEdit should not make starttime == stoptime an error. Better would be to make the simulation output something like: [...]

+1

Note: See TracTickets for help on using tickets.