﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2386	Erroneous constant evaluation of condition in assert relating to connectors	carlj@…	Per Östlund	"The model instantiated bug_connect.main below 

{{{
package bug_connect
  model main
    inner Modelica.Mechanics.MultiBody.World world;
    Hub hub;
    Modelica.Mechanics.MultiBody.Parts.BodyBox bodybox(animation=false, r={1.0,0.0,0.0});
  equation
      connect(hub.revolute.frame_b,bodybox.frame_a);
  end main;

  model Hub
    outer Modelica.Mechanics.MultiBody.World world;
    Modelica.Mechanics.MultiBody.Joints.Revolute revolute(animation=false);
  equation
      connect(world.frame_b,revolute.frame_a);
  end Hub;
end bug_connect;
}}}

gets, when instantiating:
{{{
  assert(true,""Connector frame_a of revolute joint is not connected"");
  assert(false,""Connector frame_b of revolute joint is not connected"");
}}}

from the following Modelica code in Modelica.Mechanics.MultiBody.Joints.Revolute:

{{{
  assert(cardinality(frame_a) > 0, ""Connector frame_a of revolute joint is not connected"");
  assert(cardinality(frame_b) > 0, ""Connector frame_b of revolute joint is not connected"");
}}}

even though revolute.frame_b IS connected and the equations from the connect seem to be generated, one can e.g. find

{{{
  hub.revolute.frame_b.t[1] + bodybox.frame_a.t[1] = 0.0;
  hub.revolute.frame_b.t[2] + bodybox.frame_a.t[2] = 0.0;
  hub.revolute.frame_b.t[3] + bodybox.frame_a.t[3] = 0.0;
  hub.revolute.frame_b.f[1] + bodybox.frame_a.f[1] = 0.0;
  hub.revolute.frame_b.f[2] + bodybox.frame_a.f[2] = 0.0;
  hub.revolute.frame_b.f[3] + bodybox.frame_a.f[3] = 0.0;
}}}

in the instantiated model."	defect	closed	high	1.9.1	Frontend	trunk	fixed		Peter Aronsson
