Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#3223 closed defect (duplicate)

Check error when using ComplexBlocks.Sources.ComplexConstant

Reported by: Christian Kral <dr.christian.kral@…> Owned by: somebody
Priority: high Milestone: never
Component: *unknown* Version: trunk
Keywords: Cc:

Description

I used an instance of ComplexBlocks.Sources.ComplexConstant in an example (see attachment) and changed the constant k to Complex(1,0). When I check the model a couple errors occur:

[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)1 DAE.PROP(Integer, C_CONST), value: 1}  and  = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)0 DAE.PROP(Integer, C_CONST), value: 0}  and  = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo:2056:11-2056:79:readonly] Error: Variable const.k: Duplicate modification of element  {start  = (typed)1 DAE.PROP(Integer, C_CONST), value: 1}  and  = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.
Error: Duplicate modification of element  {start  = (typed)0 DAE.PROP(Integer, C_CONST), value: 0}  and  = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.

When I simulate the model, I get the same errors again:

[1] 16:29:29 Translation Error
Duplicate modification of element {start = (typed)0 DAE.PROP(Integer, C_CONST), value: 0} and = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.

[2] 16:29:29 Translation Error
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo: 2056:11-2056:79]: Variable const.k: Duplicate modification of element {start = (typed)1 DAE.PROP(Integer, C_CONST), value: 1} and = (typed)1.0 DAE.PROP(Real, C_CONST), value: 1.0 on component re.

[3] 16:29:29 Translation Error
[/usr/lib/omlibrary/Modelica 3.2.1/ComplexBlocks.mo: 2056:11-2056:79]: Variable const.k: Duplicate modification of element {start = (typed)0 DAE.PROP(Integer, C_CONST), value: 0} and = (typed)0.0 DAE.PROP(Real, C_CONST), value: 0.0 on component im.

However, the simulation works OK with no obvious problems.

Attachments (1)

ComplexBlockExample.mo (508 bytes ) - added by Christian Kral <dr.christian.kral@…> 10 years ago.

Download all attachments as: .zip

Change History (4)

by Christian Kral <dr.christian.kral@…>, 10 years ago

Attachment: ComplexBlockExample.mo added

comment:1 by Adrian Pop, 10 years ago

This is a known bug (see #3159, #2348) but we haven't got around to fixing it.

comment:2 by Christian Kral <dr.christian.kral@…>, 10 years ago

Resolution: duplicate
Status: newclosed

Thanks Adrian. I close the ticket.

comment:3 by Dietmar Winkler, 9 years ago

Milestone: Futurenever

Sorting away the closed as invalid, won't fix and duplicate tickets from Future.

Note: See TracTickets for help on using tickets.