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

I can not use DESLib

I can not use DESLib

I am trying to run an example in DESLib.ARENALib library but it does not work and gives an error about numEvents function. Here is the complete Messages I get:

[1] 19:02:39 Scripting Notification Modelica language version set to 2.x due to loading of MSL 2.2.2.

[2] 19:02:45 Scripting Notification sh: 1: impact: not found [31mvoid DBusMenuExporterPrivate::addAction(QAction*, int)[0m: Already tracking action "Search Browser" under id 100

[3] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 6:22-6:94]: The file was not encoded in UTF-8: "

Parallel DEVS and Process-Oriented Modeling in Modelica

[4] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 686:24-686:96]: The file was not encoded in UTF-8: "

RandomLib is a Modelica package for uniform random num...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[5] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 729:26-729:98]: The file was not encoded in UTF-8: "

Variates Modelica package contains the implementation ...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[6] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 1557:28-1557:100]: The file was not encoded in UTF-8: "

The Discrete package contains functions for generating...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[7] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 1952:28-1952:100]: The file was not encoded in UTF-8: "

The Continuous package contains functions to generate ...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[8] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 2695:26-2695:98]: The file was not encoded in UTF-8: "

CMRG package is the implementation in Modelica of the ...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[9] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 3846:26-3846:98]: The file was not encoded in UTF-8: "

This package contains some examples that show the use of the ...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[10] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4187:24-4187:96]: The file was not encoded in UTF-8: "

DEVSLib is a Modelica package for modeling systems usi...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[11] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4297:59-4297:3189]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[12] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4357:59-4357:998]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[13] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4357:59-4357:3486]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[14] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4357:59-4357:3521]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[15] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4515:59-4515:659]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[16] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4515:59-4515:697]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[17] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4515:59-4515:1673]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[18] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4515:59-4515:2778]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[19] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4515:59-4515:3487]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[20] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4594:59-4594:1834]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[21] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 4594:59-4594:2388]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[22] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 24155:63-24155:135]: The file was not encoded in UTF-8: " Users Guide of the CellularPDE...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[23] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 24337:65-24337:137]: The file was not encoded in UTF-8: " Developers Guide of the Cellul...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[24] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 25014:24-25014:96]: The file was not encoded in UTF-8: "

SIMANLib is a Modelica package for modeling and simula...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[25] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 25136:59-25136:1411]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[26] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 25136:59-25136:2662]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[27] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 25225:59-25225:587]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[28] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 25225:59-25225:1202]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[29] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 30603:24-30603:96]: The file was not encoded in UTF-8: "

ARENALib is a Modelica package for modeling discrete-e...". Defaulting to 7-bit ASCII with unknown characters replaced by '?'. To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY"). To change it in a package: add a file package.encoding at the top-level. Note: The Modelica Language Specification only allows files encoded in UTF-8.

[30] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 30734:59-30734:1443]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[31] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 30734:59-30734:2499]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[32] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 30815:59-30815:618]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[33] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 30815:59-30815:2146]: Lexer treating \ as \, since \F is not a valid Modelica escape sequence.

[34] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 15022:24-15022:34]: OpenModelica only supports 31-bit signed integers! Truncating integer: 2147483647 to 1073741823

[35] 19:02:53 Syntax Warning [/usr/lib/omlibrary/DESLib 1.6.1/package.mo: 15182:22-15182:32]: OpenModelica only supports 31-bit signed integers! Truncating integer: 2147483647 to 1073741823

[36] 19:02:53 Scripting Warning Requested package Modelica of version 2.2.1, but this package was already loaded with version 2.2.2. You might experience problems if these versions are incompatible.

[1] 19:05:00 Translation Error [DESLib: 21638:15-21640:21]: Class numEvents not found in scope DESLib.SIMANLib.Blocks.Dispose.$for loop scope$ (looking for a function or record).

[2] 19:05:00 Translation Error [DESLib: 21638:15-21640:21]: Class numEvents not found in scope DESLib.SIMANLib.SRC.Blocks.Dispose.Dispose.$for loop scope$ (looking for a function or record).

[3] 19:05:00 Translation Error Error occurred while flattening model DESLib.ARENALib.Examples.BankTeller

Re: I can not use DESLib

Hi,

What example do you try to run? Let me know and I can see if I can find the issue.

Cheers,
Adrian Pop/

Re: I can not use DESLib

It is BankTeller example

Re: I can not use DESLib

actually the problem happened in all the examples I tried

I think -as the messages suggest- it is at this line:
->          for i in 1:numEvents(s.dq) loop

It say that Class numEvents not found. But numEvents is a function not a class !!

Also there is no connectors (or ports) at the flowchart modules as shown in the picture in attachments
https://openmodelica.org/images/agorapro/attachments/4539/mini_Screenshot-from-2015-07-17.png
.

Re: I can not use DESLib

The main problem seems to be that our lookup doesn't seem to work properly in some cases where you have model X = A.B.C.D and the function numEvents is in package B. This is a bug. When I fully qualify the uses of function numEvents to .DESLib.DEVSLib.SRC.numEvents then it goes further until it cannot find function RandomUniform which doesn't seem to be defined anywhere and is not part of the Modelica Standard. Maybe RandomUniform is a function that is (or was) defined in Dymola but is not part of the Modelica standard.

Can you use the library with Dymola? It doesn't work for me with version 2015 FD 01. I get a lot of errors.

Re: I can not use DESLib

I must use openmodelica or anylogic because it is for university, anyway thank you very much adrpo

Re: I can not use DESLib

I got it. I'll see if I can change the library to work better with OpenModelica.

Cheers,
Adrian Pop/

Re: I can not use DESLib

I tried just now to see if the examples in ARENALib are working in OpenModelica, but no luck...
What software could be recommended for Discrete Event simulations?
Cheers,
Stefan

Re: I can not use DESLib

same problem here.......Did anyone try to debug it ?

Re: I can not use DESLib

I got it. I'll see if I can change the library to work better with OpenModelica.


^Goldenslot^

Re: I can not use DESLib

the problem is that even though i run it in Dymola , it shows errors too...

There are 0 guests and 0 other users also viewing this topic