Ticket #95 (new defect)

Opened 6 months ago

Last modified 8 weeks ago

rooted() operator is used in MultiBody library but not in specification

Reported by: PHarman Owned by: otter
Priority: normal Milestone: Design60
Component: Mechanics.MultiBody Version: 3.0
Severity: normal Keywords: rooted multibody
Cc: Hide ticket: no

Description (last modified by dietmarw) (diff)

The operator "rooted", which is not mentioned in the specification, is used in the following models:

Modelica.Mechanics.MultiBody.Parts.FixedRotation
Modelica.Mechanics.MultiBody.Joints.Revolute
Modelica.Mechanics.MultiBody.Joints.Spherical
Modelica.Mechanics.MultiBody.Joints.FreeMotion

Attachments

Change History

Changed 6 months ago by otter

  • milestone changed from undecided to Design58

You are right that this is a bug.

The operator "rooted" was introduced to improve efficiency: A tool that constructs the graph with the Connections.branch/.root etc. built-in operators has to cut the graph in order to arrive at "spanning trees". If there is a statement "Connections.branch(A,B)", then "rooted(A)" returns true, if "A" is closer to the root of the spanning tree as "B". Otherwise false is returned. For the MultiBody library this allows to avoid unnecessary small linear systems of equations.

There had been discussions to introduce this operator in to the Modelica Language Specification. However, no agreement was reached, because this is a reflective operator and there was the opinion that it is not the right solution and that something better is needed to define this feature (in a declarative form).

I would propose to discuss this topic at the next design meeting. Preverably, to find a declarative built-in operator for this purpose. Removing this operator from the library has the disadvantage that the efficiency of the generated code depends on the way how a user connects components (if a component is flipped, the generated code might be less efficient). I therefore hesitate to just remove it. Note, a simple implementation of a tool is that this operator always returns true. The code is still correct, but sometimes less efficient.

Changed 6 months ago by dietmarw

Shouldn't we make this ticket public?

Changed 5 months ago by dietmarw

  • hide_ticket unset
  • description modified (diff)

Pete:

I'd appreciate it if you did make it public as I can't actually see it myself and I reported it''

Published as requested by the reporter.

Changed 8 weeks ago by dietmarw

#116 has been marked as duplicate of this ticket.

Add/Change #95 (rooted() operator is used in MultiBody library but not in specification)

Author



Action
as new
 
Note: See TracTickets for help on using tickets.