Opened 14 years ago

Last modified 14 years ago

#1335 closed defect (fixed)

omc cannot handle annotation 3.x for some components

Reported by: mohsen Owned by: mohsen
Priority: high Milestone:
Component: Version:
Keywords: Cc: mohsen, adrpo

Description

If we set the annotations version to 3, then the OMC API getIconAnnotation don't returns the flat model for some components. I have tried it for Resistor, Conductor, EMF..........i am not sure how many more have this problem. Here is the output for 3 of them,


getIconAnnotation(Modelica.Electrical.Analog.Basic.Resistor)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0}

getIconAnnotation(Modelica.Electrical.Analog.Basic.EMF)>> {-100.0,-100.0,100.0,100.0,true,0.1,1.0,1.0}

getIconAnnotation(Modelica.Electrical.Analog.Basic.Conductor)>> {-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0}


I am using MSL31.

One more thing, can someone tell me what is the output of getComponentAnnotations,

getComponentAnnotations(Modelica.Electrical.Analog.Basic.Ground)
{{true,0.0,100.0,10.0,-10.0,-10.0,10.0,270.0,0.0,0.0,-,-,-,-,0.0}}

What does each parameter means? I have looked for it in the Modelica Specifications for 3.2 but couldn't find anything.


One more thing i have noticed is, the default parameter values for the components are empty. Like,

getParameterNames(Modelica.Electrical.Analog.Basic.Resistor)
{R, T_ref, alpha}

getParameterValue(Modelica.Electrical.Analog.Basic.Resistor, R)

6----------------------
Also there are old bug report related to this issue: bug 1166 and 1160

Best Regards
Mohsen

Attachments (2)

annotations.mos (2.7 KB) - added by adrpo 14 years ago.
example of calls/results.
trace-annotations.mos.txt (5.9 KB) - added by adrpo 14 years ago.
example of calls/results.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 14 years ago by adrpo

fixed in revision 6860

Changed 14 years ago by adrpo

example of calls/results.

comment:2 Changed 14 years ago by adrpo

call to
{{
getParameterValue(Modelica.Electrical.Analog.Basic.Resistor, R)
}}
returns nothing because R has no default parameter! If you call it on T_ref
you will get a value.
You can also get the start value for R. See how in the attached files.

Note: See TracTickets for help on using tickets.