Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » heinz.m
  • » Profile

Posts

Posts

Apr-08-14 00:24:30
SystemDynamics Library & OMEdit not really useful yet

Hello

I was very pleased to find the systemdynamics library in openmodelica.
I created some models. They were ok. After that, I used OMEdit & SystemDynamics Library in a course with students and we had a lot of trouble. E.g. one student built a model, that did not run, although it looked identical to models that were ok. One Student was unable to save his model....
I decided to give up OMEdit & SystemDynamics Library and went on with other Simulation Software.
OMEdit & SystemDynamics do not yet seem to be a useful combination. (April 2014)

I write this to prevent other people from the same experience.

Cheers

Heinz

Mar-22-14 17:16:01
I am looking for the equations created by OMEdit

When I try to simulate one of my first models, created with OMEdit, I get the error messages:

[:0:0-0:0] Warning: No system for the symbolic initialization was generated. A method using numerical algorithms will be used instead.
[:0:0-0:0] Warning: Trying to fix over-determined initial system with 5 variables and 6 equations... [not implemented yet!]

When I look into the code created in the step "Simulation - Instantiate model" I see many more than 6 equations and 5 variables .

Please give me a hint, how to examine equations and variables.

Cheers

Heinz


the model:

model Konto
  SystemDynamics.Sources.Source source1 annotation(Placement(visible = true, transformation(origin = {-80,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Rates.Rate_2 Einnahmen annotation(Placement(visible = true, transformation(origin = {-40,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Levels.Level Konto(x0 = 10000) annotation(Placement(visible = true, transformation(origin = {0,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Rates.Rate_3 Ausgaben annotation(Placement(visible = true, transformation(origin = {40,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Sources.Sink sink1 annotation(Placement(visible = true, transformation(origin = {80,40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Const Lohn(k = 100000) annotation(Placement(visible = true, transformation(origin = {-60,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Const Miete(k = 25000) annotation(Placement(visible = true, transformation(origin = {20,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Const Steuern(k = 20000) annotation(Placement(visible = true, transformation(origin = {40,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Const Zinssatz(k = 0.02) annotation(Placement(visible = true, transformation(origin = {-40,-40}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Prod_2 Zins annotation(Placement(visible = true, transformation(origin = {-20,0}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  SystemDynamics.Auxiliary.Const Auslagen(k = 50000) annotation(Placement(visible = true, transformation(origin = {60,0}, extent = {{10,-10},{-10,10}}, rotation = 0)));
equation
  connect(Auslagen.y,Ausgaben.u2) annotation(Line(points = {{60,7},{43.8512,7},{43.8512,29.4372},{43.8512,29.4372}}));
  connect(Steuern.y,Ausgaben.u1) annotation(Line(points = {{40,7},{40.0922,7},{40.0922,29.9539},{40.0922,29.9539}}));
  connect(Miete.y,Ausgaben.u) annotation(Line(points = {{20,7},{35.9447,7},{35.9447,29.4931},{35.9447,29.4931}}));
  connect(Zinssatz.y,Zins.u1) annotation(Line(points = {{-40,-33},{-27.6498,-33},{-27.6498,0.460829},{-27.6498,0.460829}}));
  connect(Lohn.y,Einnahmen.u) annotation(Line(points = {{-60,7},{-43.7788,7},{-43.7788,29.0323},{-43.7788,29.0323}}));
  connect(Zins.y,Einnahmen.u1) annotation(Line(points = {{-20,7},{-36.4055,7},{-36.4055,29.4931},{-36.4055,29.4931}}));
  connect(Konto.y3,Zins.u2) annotation(Line(points = {{0,33.5},{-13.3641,33.5},{-13.3641,-0.921659},{-13.3641,-0.921659}}));
  connect(Ausgaben.y1,sink1.MassInPort1) annotation(Line(points = {{45,40},{69.12439999999999,40},{69.12439999999999,38.2488},{69.12439999999999,38.2488}}));
  connect(Konto.u2,Ausgaben.y1) annotation(Line(points = {{11,40},{45.1613,40},{45.1613,40.553},{45.1613,40.553}}));
  connect(Einnahmen.y1,Konto.u2) annotation(Line(points = {{-35,40},{10.5991,40},{10.5991,39.1705},{10.5991,39.1705}}));
  connect(source1.MassInPort1,Einnahmen.y1) annotation(Line(points = {{-69,40},{-35.023,40},{-35.023,39.6313},{-35.023,39.6313}}));
  annotation(Icon(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})), Diagram(coordinateSystem(extent = {{-100,-100},{100,100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2,2})));
end Konto;

Mar-13-14 09:46:52
Cannot instantiate model from SystemDynamics Library

When i try to simulate SystemDynamics.PopulationDynamics.LarchBudMoth from OMEdit, I get the error message:

[:0:0-0:0] Error: Cannot instantiate SystemDynamics.PopulationDynamics.LarchBudMoth due to class specialization PACKAGE..advice

I would appreciate two types of advice:
1. How can I solve that problem?
2. What do you recommend to a beginner to read, to become able to help myself?

Cheers

Heinz

Mar-13-14 01:15:55
How do I define an equation in an interface of the system dynamics

In the system dynamics library are some interfaces. E.g. nonlin_2.

How do I define an equation for an interface? Let's say

y = u1 * u2    in nonlin_2 ?

Kind Regards

Heinz

  • Index
  • » Users
  • » heinz.m
  • » Profile
You are here: