Opened 12 years ago

Closed 12 years ago

#2159 closed defect (fixed)

Non-stream component becomes stream and fails to connect

Reported by: Martin Sjölund Owned by: somebody
Priority: high Milestone: 1.9.0
Component: Frontend Version: trunk
Keywords: Cc: Per Östlund

Description (last modified by Martin Sjölund)

Non-stream component becomes stream and fails to connect:

[Buildings/Airflow/Multizone/Examples/OneEffectiveAirLeakageArea.mo:53:3-56:27:writable] Error: Cannot connect stream component cra.port_b.p to non-stream component volB.ports[1].p
[Buildings/Airflow/Multizone/Examples/OneEffectiveAirLeakageArea.mo:53:3-56:27:writable] Error: The type of variables volB.ports[1] and cra.port_b (Modelica.Fluid.Vessels.BaseClasses.VesselFluidPorts_b connector and Modelica.Fluid.Interfaces.FluidPort_b connector) are inconsistent in connect equations
Error: Error occurred while flattening model Buildings.Airflow.Multizone.Examples.OneEffectiveAirLeakageArea

git: https://github.com/sjoelund/modelica-buildings.git or https://github.com/lbl-srg/modelica-buildings.git
svn: https://github.com/sjoelund/modelica-buildings/trunk

Attachments (1)

InstClassBindingMod.mo (755 bytes ) - added by Per Östlund 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Martin Sjölund, 12 years ago

Description: modified (diff)

comment:2 by Per Östlund, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r15866. The issue was that we sort elements during instantiation, which means that components in e.g. connectors can be reordered because of modifiers. I've added yet another workaround to the big pile of workaround that is the element sorting, so that this particular case works.

comment:3 by Per Östlund, 12 years ago

Resolution: fixed
Status: closedreopened

And unfixed in r15867, since it broke some test cases that I missed due to the broken test suite. Changing the element sorting apparently caused a lot of problems for some of the Media tests, so this seems like an annoying issue to fix. I've attached a test case if anyone wants to take a stab at it.

by Per Östlund, 12 years ago

Attachment: InstClassBindingMod.mo added

comment:4 by Adrian Pop, 12 years ago

Hi,

I had a look at the 6 models that failed, it
seems only the error messages moved around and
nothing more than that. Or am I wrong?
I think you can safely apply the fix and just
update the expected text.

Cheers,
Adrian Pop/

comment:5 by Adrian Pop, 12 years ago

comment:6 by Per Östlund, 12 years ago

No, some tests now fail to compile, see the MediaTestModels tests.

comment:7 by Adrian Pop, 12 years ago

OK, I didn't scroll enough.
I think that those will compile with +d=scodeInstShortcut
because most of the Media tests now have a Fluid dependency.
I'll have a look on Monday and reapply the fix if everything is OK.

comment:8 by Per Östlund, 12 years ago

Fixed in r15874 by sorting the connectors before connecting them.

comment:9 by Per Östlund, 12 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.