Search code examples
modelicaopenmodelica

OMOptim not loading whole Modelica library[MSL]


I am trying to use OMOptim for the first time.

I want to run optimisation for code written in openmodelica that includes the following:

Modelica.Blocks.Sources.TimeTable solarThermal(table = [0:30:10800,100:10:3700]);
Modelica.Blocks.Sources.TimeTable solar(table = [0:30:10800,200:10:3800]);
Modelica.Blocks.Sources.TimeTable heatDemand(table = [0,450;3600,470;7200,400;10800,500]);
Modelica.Blocks.Sources.TimeTable electricityDemand(table =     
[0,300;3600,500;7200,400;10800,300]);

I defined in settings of omoptim that path to modelica library is C:/OpenModelica1.9.1Beta1/lib/omlibrary/Modelica 3.2.1/package.mo where TimeTable is located. Then I go Models=> Load Modelica Library.

But when it tries to load it, I get tons of error messages like this:

OMC : isClass(Modelica.SIunits.LossAngle)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.Conductance)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.Admittance)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.ModulusOfAdmittance)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.Susceptance)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.InstantaneousPower)
[18:46:32] false
[18:46:32] OMC : isClass(Modelica.SIunits.ActivePower)
[18:46:32] false
...

It loads something like 50% of library. It doesn't load TimeTable library which I need. Am I doing something wrong and how can I solve this?

Thanks!


Solution

  • The Modelica Standard Library has dependences to ModelicaServices. So you need also to load Modelica 3.2.1/ModelicaServices/package.mo.