Opened 7 years ago

Closed 7 years ago

#5002 closed defect (fixed)

Issue with empty arrays and iterators in the NF

Reported by: Francesco Casella Owned by: Per Östlund
Priority: high Milestone: 2.0.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Please check the Modelica.Fluid.Examples.Tanks.EmptyTanks model. One more variable than equations is reported.

Inspection of the flattened models shows:

tank1.ports_mC_flow[1,:] = array(actualStream(tank1.ports[1].C_outflow[$i1]) for $i1 in 1:0) *
      tank1.ports[1].m_flow "Trace substance mass flow";

which shouldn't be there in the first place. It also shows

der(tank1.mC_scaled) = tank1.mbC_flow / {};

which shouldn't obviously be there - BTW, there is (correctly) no declaration of tank1.mC_scaled in the flattened model.

Change History (2)

comment:1 by Per Östlund, 7 years ago

The issue of empty array equations not being removed should be fixed in 5c30da0, but it doesn't affect the issue of the model being unbalanced. Which I guess is expected, since the backend should just ignore those equations when counting.

comment:2 by Per Östlund, 7 years ago

Resolution: fixed
Status: newclosed

With the fix in 9f7f5f7d the flat model is now balanced. The model now gets as far as the code generation, which fails because the model contains cardinality which isn't yet handled by the NF.

Note: See TracTickets for help on using tickets.