﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3221	Equation count of models containing expandable connectors	anonymous	Mahder Alemseged Gebremedhin	"Consider the following code 


{{{
package ExpandableConn
  model IntegInput
    Modelica.Blocks.Interfaces.RealInput u;
    Modelica.Blocks.Continuous.Integrator integrator;
  equation 
    connect(integrator.u, u);
  end IntegInput;

  model IntegConn
    Modelica.Blocks.Continuous.Integrator integrator;
    Modelica.Icons.SignalBus conn;
  equation 
    connect(integrator.u, conn.signal);
  end IntegConn;
end ExpandableConn;

}}}

For me both models in the package should be balanced (=have the same number of equations and variables).
Indeed Dymola reports 2 equations and variables in both cases.
OM, instead, in the case of IntegConn reports three variables ad two equations.
Then this model is inserted in to a larger one, the count gests balanced again.

However i think the OM behaviour is worse. In fact one of the most beautiful characteristics of Modelica is that, when balanced models are connected to each other, the whole model stays balanced; when a large model is unbalanced, usually one expects to find where the unbalance comes from by looking at individual submodels: this OM counting technique makes this process more difficult.

I must add that I've not checked what Modelica Specifications say about how to count model variables when expandable connectors are present."	defect	assigned	normal	2.0.0	New Instantiation	trunk			
