Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5092 closed defect (fixed)

Issu with Connection.isRoot in NFTyping.typeClassSections

Reported by: casella Owned by: perost
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check PowerSystems.Examples.PowerWorld.PowerWorld. The following error is reported

[PowerSystems 0.6.0/Examples/PowerWorld/package.mo:260:7-267:13:writable] Error:
The first argument of Connections.isRoot must be on the form A.R, 
where A is a connector and R an over-determined type/record.

the offending source code line reads:

if Connections.isRoot(generator.terminal.theta) then

which seems ok to me.

Change History (4)

comment:1 Changed 6 years ago by perost

generator.terminal.theta is obviously not on the form A.R, it's more like A.B.R. So according to how the specification is written right now it's not a valid model, but that could of course be a mistake in the specification.

comment:2 follow-up: Changed 6 years ago by casella

The specification reads

Connections.isRoot(A.R)
Returns true, if the overdetermined type or record instance R in
connector instance A is selected as a root in the virtual connection graph.

From my understanding generator.terminal is indeed a connector instance, so I don't see a problem :)

comment:3 in reply to: ↑ 2 Changed 6 years ago by perost

  • Resolution set to fixed
  • Status changed from new to closed

Replying to casella:

From my understanding generator.terminal is indeed a connector instance, so I don't see a problem :)

That's a matter of interpretation, but I can't really see any reason why not to allow it. So I changed the check to use your interpretation in ca60c16.

comment:4 Changed 6 years ago by casella

From an end-user perspective I see no reason to introduce the restriction than A cannot be a qualified component.

Feel free to open a ticket for the Modelica Specification

Note: See TracTickets for help on using tickets.