-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to specify version of additional Modelica libraries in ModelicaSystem #44
Comments
Yeah, we should make it so that you are be able to specify tuples: [("Modelica", "4.0.0"), ...]. |
This is wrong, it should be |
Yes indeed, the following works: |
I will modify the |
@christiankral , the issue is fixed with this commit 8a6cf80, please test it Usage
|
OK, I am trying the following two examples: Example model Test3
parameter Modelica.SIunits.Current I = 1 "Current";
equation
annotation(experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.002));
end Test3; Example model Test4
parameter Modelica.Units.SI.Current I = 1 "Current";
equation
annotation(experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-6, Interval = 0.002));
end Test4; So In Julia I try (after updating using OMJulia
mod = OMJulia.OMCSession()
ModelicaSystem(mod, "Test3.mo", "Test3", [("Modelica","3.2.3")]) causes the following error:
If I use ModelicaSystem(mod, "Test3.mo", "Test3", ("Modelica","3.2.3")) it causes a different error:
If I use instead
the following error is caused:
|
The following error msg is correct, |
I don't understand why the error message caused by Note In the MSL 3.2.3 it's |
@christiankral I cannot reproduce the error, see below
|
@arun3688 Can you please paste the code of your file |
@christiankral It is the same code what you posted for Test3.mo, I changed the filename, below is the code
|
Oh I see: it was my fault: I had fixed OMJulia to a previous SHA1 hash number and forgot to switch to master. Therefore All the cases that should work, now work indeed. Thanks for your support, sorry for bothering you. The ticket can now be closed from my point of view. |
@christiankral great and thanks for testing |
The documentation of ModelicaSystem shows the following text and example:
The third argument is apparently a list of additional libraries to be loaded. In the included example the library
Modelica
and others are loaded.I have a user example that relies on the MSL 3.2.3:
Consider the following cases after applying
Case 1: Do not specify
Modelica
mod.ModelicaSystem
read theuses
annotation, or why does it work?Case 2: Specify
Modelica
Modelica
version is loadedCase 3: How to specify the
Modelica
3.2.3 library explicitly?Modelica
(or any other library) explicitly throughmod.ModelicaSystem("Test.mo", "Test", ...)
?Modelica
3.2.3 library throughsendExpression
it seems the be loaded correctly, as no error message is drawnModelica
4.0.0 library throughsendExpression
I would expect a warning message, as theModelica
4.0.0 library is not compatible with modelTest
; the following, however, works with not error message:Modelica
4.0.0 library is not loaded / usedSummary
The main question is: How can I specify the version number of any library through
mod.ModelicaSystem("Test.mo", "Test", ...)
?The text was updated successfully, but these errors were encountered: