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
  • » jwharington
  • » Profile

Posts

Posts

Feb-22-13 03:43:21
Code flattenning inner/outer failure

Flattening of the model results in losing aliases of inner/outer variables.

Here's a test case:

Code:


model teststate3

  block Common
    Integer b;
  end Common;

  model Hookup
    outer Common global;
    Boolean active;
    parameter Integer m;
  algorithm
    when (active) then
      global.b := m;
    end when;
  end Hookup;

  inner Common global;

  Hookup fred (m = 0, active = true);
  Hookup ginger (m = 1, active = false);

end teststate3;

This produces (output of instantiateModel()):

Code:


class teststate3
  Integer global.b;
  Boolean fred.active = true;
  parameter Integer fred.m = 0;
  Boolean ginger.active = false;
  parameter Integer ginger.m = 1;
algorithm
  when fred.active then
    fred.global.b := fred.m;
  end when;
  when ginger.active then
    ginger.global.b := ginger.m;
  end when;
end teststate3;

In this example, "ginger.global.b" should be "global.b" etc.

Feb-22-13 03:33:50
Roadmap to Modelica language 3.3
Category: Developer

Are there plans for support for language specification 3.3 in openmodelica?

In particular I am interested in using the new state machine system.

So far, I have not been able to find any reference implementation of this functionality.

Feb-22-13 03:15:03
Code flattening and compilation failure

I have discovered certain conditions whereby compilation of models that contain class instances, will fail, but where if I use instantiateModel() to produce flattened code, the flattened code (once copied into a new file and "." replaced with "_"), compiles ok.

This is certainly strange.  Where should I report the bug in greater detail?

  • Index
  • » Users
  • » jwharington
  • » Profile
You are here: