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: Francesco Casella Owned by: Per Östlund
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 by Per Östlund, 6 years ago

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 by Francesco Casella, 6 years ago

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 :)

in reply to:  2 comment:3 by Per Östlund, 6 years ago

Resolution: fixed
Status: newclosed

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 by Francesco Casella, 6 years ago

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.