Help - Search - Members - Calendar
Full Version: Managing Collections in Modelica
Modelica Forum > Modelica > Modelica
Tamas Juhasz
I am working on a new Modelica.Mechanics.Multibody.Collision Library.
I have a new Actor class that defines the shape, mass, inertia and position / orientation of a single body.
The Actor class have subclasses BoxActor, SphereActor, etc. with various shape appearances.

In the virtual scene component I'd like to maintain a collection of the "generic" Actor instances, in order to make collision detection / respone in a straightforward way on each pair of the bodies in the scene.
In other object oriented languages the base "Actor" class reference could refer to a "BoxActor" object, as well.

I'm using Dymola 6.0d, and would like to be able to add these actor instances to the scene by simple dragging & dropping them into the model editor window. How could I automatically enumerate the actual instances of a known class (or base class) that are already added to a Modelica model?
Or is it possible to create a "connector" type that I could use to manually connect actors to a central CollisionManager component?

In Modelica there is no way to handle dynamic sized generic arrays, right?


wagner
Hello Tamas Juhasz,

can you give us a very simplified example of the problem you have? Best is to reduce a model to a few lines that contains only the necessary things. Then we can test it in a Modelica tool and maybe one of us will find a solution. Without these simplified models it's quite hard to understand the problem you have.

Best Regards

Florian
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.