Opened 6 years ago

Closed 6 years ago

#5259 closed discussion (wontfix)

Portability between OM and Dymola on the delay() operator

Reported by: J-Ph Tavella <jean-philippe.tavella@…> Owned by: Adeel Asghar
Priority: normal Milestone: Future
Component: OMEdit Version:
Keywords: Cc: audrey.jardin@…

Description

Hello,

Please open under OM the attached file temp.mo and check the model RealTransmission.mo (in Basics.Operators).
An error is detected on the function delay().
Now uncomment the line at the end of the model (y[i]...) and comment the line just above (y(i]...). The check is now correct.

As the first version of the model is correct for Dymola (and perfectly runs also) my suggestion is to do the same with OM for portability reason in spite of the fact the parameter maxDelay is mandatory in the Modelica specification.

Best

Attachments (1)

temp.mo (8.6 KB ) - added by J-Ph Tavella <jean-philippe.tavella@…> 6 years ago.

Download all attachments as: .zip

Change History (2)

by J-Ph Tavella <jean-philippe.tavella@…>, 6 years ago

Attachment: temp.mo added

comment:1 by Francesco Casella, 6 years ago

Resolution: wontfix
Status: newclosed

Sorry, the Modelica specification is very clear, see section 3.7.2

If delayMax is not supplied in the argument list, delayTime needs to be a parameter expression.

If you want to use OpenModelica, you need to use valid Modelica code.

In this case, you may easily add a parameter delayMax with a default of your choice, rather than leaving this choice to the tool. The code will be valid and will run in both tools.

Note: See TracTickets for help on using tickets.