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
  • Index
  • » Users
  • » axelr
  • » Profile

Posts

Posts

Nov-17-16 23:20:17
Couldn't find an option to change the size of the white page

Thanks!

Nov-14-16 22:47:05
Couldn't find an option to change the size of the white page

Has this possibly been fixed?

If I change the extent attribute in the annotation of an element, I can make it look smaller, but the connections have then to be manually adapted, since the connections otherwise do not appear to be connected to the components. This seems be very time-consuming. Any alternative?

Oct-06-16 18:27:50
Need a command-line option for plot() (call under OMSHELL) to directly save the graph as...

I tried to use the OMC API methods to read simulation results like readSimulationResult but I didn't get any result.

I also tried to use JMatIO - Matlab's MAT-file I/O in JAVA but I got an error saying that the .mat file is not a valid MATLAB 5.0 MAT-file.

Should I just export the simulation results in csv? Is there another better alternative?

Thanks,
Axel

Feb-19-16 17:46:42
API call getExtendsModifierNames() returns Error

Thanks for clarifying this!

Feb-19-16 17:33:42
API call getExtendsModifierNames() returns Error

Thanks! Actually, I think that I asked the wrong question. Sorry!

Can I use the OMC Scritping API to parse redeclare statements in an extends clause, as shown below?

Code:


model MyModel
      extends MyClass(redeclare MySubComponentClass1 specificComponent1, redeclare MySubComponentClass2 specificComponent2);
end MyModel;

Jan-22-16 20:36:38
API call getExtendsModifierNames() returns Error

I would like to retrieve the modifications associated with a class extends redeclaration mechanism.

I used as test model the one from GitHub (https://github.com/OpenModelica/OpenMod … _calls.mo)

and I performed the call

getExtendsModifierNames(D2,B2)

as documented in this test case (https://github.com/OpenModelica/OpenMod … param.mos)

but the result was "Error" and the getErrorString() call returned an empty string. Is this normal?

Dec-22-15 20:49:04
how to convert Modelica models with multiple top-level entities into models that can be opened by...

Thank you very much!

Dec-20-15 03:06:27
how to convert Modelica models with multiple top-level entities into models that can be opened by...

Hello,

I have several Modelica models that I cannot open and simulate with OpenModelica because they don't have a single nonstructured entity. How best to convert these models into models that can be opened with OpenModelica? Is this only possible through manual refactoring of the models? If yes, is there a certain best practice to apply?

Best regards,
Axel

Dec-17-15 14:11:14
getParameterValue()

Thanks for your help. I want to improve the SysML-Modelica transformation and make it work between OpenModelica 1.9.3 and MagicDraw 18.2 (https://github.com/SysMLModelicaIntegra … modelica).

Dec-17-15 05:56:02
getParameterValue()

I tried this command

getParameterValue("BouncingBall","e")

on the BouncingBall model within share\doc\omc\testmodels:

model BouncingBall
  parameter Real e=0.7 "coefficient of restitution";
...


and I received this error message:

[<interactive>:1:1-1:0:writable] Error: Class getParameterValue not found in scope <global scope> (looking for a function or record).

According to this web page (https://build.openmodelica.org/Document … alue.html), the getParameterValue function should work. What did I miss? Any help would be greatly appreciated. Thanks.

BTW, loadModel(Modelica) and loadFile(getInstallationDirectoryPath()+"/share/doc/omc/testmodels/BouncingBall.mo") both returned true beforehand.

Best regards,
Axel

Dec-15-15 18:56:36
Simulating a model

I realized that I can simulate certain example Modelica models such as Modelica.Mechanics.Translational.Examples.Oscillator. However, I get this same error when simulating Modelica.Mechanics.Translational.Examples.Accelerate

c:/openmodelica1.9.3/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot open output file Modelica.Mechanics.Translational.Examples.Accelerate.exe: Permission denied
collect2: ld returned 1 exit status
mingw32-make: *** [omc_main_target] Error 1
Compilation process failed. Exited with code 2.

So the error is specific to this example model!?

Dec-15-15 15:45:33
Simulating a model

I have Avast Free Antivirus. I  turned it off and I still get the same error current/sad I launched OpenModelica as adminstrator. What could it be?

Dec-15-15 13:52:37
Simulating a model

Thanks a lot! I can now compile the model. However I then run into this new problem:

c:/openmodelica1.9.3/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot open output file Modelica.Mechanics.Translational.Examples.Accelerate.exe: Permission denied
collect2: ld returned 1 exit status
mingw32-make: *** [omc_main_target] Error 1
Compilation process failed. Exited with code 2.

How should I tell openModelica where to find ld.exe? Do I have to look at the compile.bat file? If yes, which lines do I have to change?

Dec-15-15 13:07:57
Simulating a model

Thanks for the recommendation. I tried to install the latest nightly build OpenModelica-v1.9.4-dev-578-ga08261b.exe but it made my Windows explorer freeze and I wasn't able to install it current/smile However, I tried to install the OpenModelica-v1.9.3 release again, this time as administrator, and I was able to compile a Modelica model. I got the message "compilation process finished sucessfully" but then OMEdit started to freeze (OMEdit window not responding). Do you have any idea what could cause this problem?

Dec-15-15 02:37:39
Simulating a model

Hello,

I just installed OpenModelica 1.9.3 for Windows. When I tried to simulate a model, the process would never end. No error message was indicated. I tried this from both from OMEdit and from OMShell. Same result. I suppose that my compilation settings are not ok. How can I check them? Do I need the OMDev folder? I had it installed on my machine a few years ago when I was using OpenModelica 1.8.1 and I deleted it to do a fresh start.

Best regards,
Axel

  • Index
  • » Users
  • » axelr
  • » Profile
You are here: