﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5744	Problems to simulate MSL models with OM nightly	Christian Kral <dr.christian.kral@…>	Martin Sjölund	"Im am using the following version of OM nightly und Linux Mint 19.2:

{{{
Connected to OpenModelica 1.16.0~dev-72-gc3a557c
Connected to OMSimulator unknown-linux
}}}

However, I have a lot of difficulties to run OM simulations currently, but I cannot say whether this is the installation on my machine (which I guess is the case) or the actual OpenModelica version. After I noticed some problems a week ago, I re-installed everything (through Synaptic) but that did not change anything. Please let me step-by-step explain what I notice:

1) Start of OMEdit

I get the following messages:

{{{
[1] 20:18:35 Scripting Notification
Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[2] 20:18:35 Scripting Notification
Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[3] 20:18:35 Scripting Error
Failed to load package ModelicaReference (3.2.3) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/.
}}}

I go to the indicated directory {{{omlibrary}}} and see all the installed libraries:

{{{
christian@Yogix:/> 
christian@Yogix:/> cd /usr/bin/../lib/omlibrary
christian@Yogix:omlibrary> ls
'Buildings 5.1.0'                 OpenBLDC
'ElectroMechanicalDrives 2.2.0'  'PhotoVoltaics 1.5.0'
'EMOTH 1.4.0'                    'PhotoVoltaics_TGM 1.5.0'
 GNU_ScientificLibrary           'PlanarMechanics 1.4.1'
'HanserModelica 1.1.0'            PlanarMechanicsTest
'KeyWordIO 0.9.0'                'PowerFlow 0.3'
'Modelica 3.1'                    PraxisSimulationstechnik
'Modelica 3.2.1'                 'PVSystems 0.6.3'
'Modelica 3.2.2'                 'SiemensPower 2.2'
'Modelica 3.2.3'                 'Spot 0.706.1'
'ModelicaTest 3.2.1'             'SpotExamples 0.706.1'
'ModelicaTest 3.2.2'             'SystemDynamics 2.1'
'ModelicaTest 3.2.3'             'VehicleInterfaces 1.2.4'
'ModelicaTest trunk'             'WindPowerPlants 1.3.0'
'Modelica trunk'                 'XogenyTest 1.1'
}}}

2) I try a simple Model

{{{
model Test
  Real x(start = 1);
equation
  der(x) = -x;
end Test;
}}}

This model simulates OK with no complaints.

3) I simulate {{{Modelica.Blocks.Examples.Filter}}}

When I try to simulate this model I get asked to switch back the old frontend and then the following error messages occur in the **Messages Browser**:

{{{
[1] 20:25:59 Scripting Notification
Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[2] 20:25:59 Scripting Notification
Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[3] 20:25:59 Translation Error
[Modelica.Constants: 25:3-26:101]: Variable ModelicaServices.Machine.Integer_inf not found in scope Constants.

[4] 20:25:59 Translation Error
[Modelica.Blocks.Continuous: 2271:9-2271:37]: Import Modelica.Constants.pi not found in scope <top>.

[5] 20:25:59 Translation Error
[Modelica.Blocks.Continuous: 2293:11-2293:73]: Variable pi not found in scope Butterworth.

[6] 20:26:08 Scripting Notification
Skipped loading package Complex (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[7] 20:26:08 Scripting Notification
Skipped loading package ModelicaServices (3.2.3,default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/christian/.openmodelica/libraries/ (uses-annotation may be wrong).

[8] 20:26:08 Translation Error
[Modelica.Blocks.Continuous: 2410:9-2411:40]: Variable .Modelica.Constants.pi not found in scope Modelica.Blocks.Continuous.Internal.Filter.coefficients.lowPass.

[9] 20:26:08 Translation Error
[Modelica.Constants: 19:3-20:47]: Variable ModelicaServices.Machine.eps not found in scope Modelica.Constants.

[10] 20:26:08 Translation Error
[Modelica.Blocks.Continuous: 2446:9-2447:40]: Variable .Modelica.Constants.pi not found in scope Modelica.Blocks.Continuous.Internal.Filter.coefficients.highPass.

[11] 20:26:08 Translation Error
Error occurred while flattening model Modelica.Blocks.Examples.Filter
}}}

So this model does neither compile nor simulate. 

---

So it seems there is a problem with loading and/or treating the Modelica Standard Library correctly.

 * Could anyone on a Linux machine please confirm / not confirm my findings?  
 * Any ideas what could have gone wrong? 
 * Could that have been caused by installing some other software?"	defect	assigned	high	Future	Installation program	v1.16.0-dev		Linux	Adrian Pop
