문제

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!

도움이 되었습니까?

해결책

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

다른 팁

I suspect your issue is that the Modelica path should be set to:

C:/OpenModelica1.9.1Beta1/lib/omlibrary

Although, strangely, I thought it was automatically set to that. But perhaps OMOptim or your scripts change that.

In other words, don't point it to the package.mo file and don't point it to Modelica 3.2.1. Point it to the directory that contains the Modelica 3.2.1 folder.

I hope that helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top