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
  • » adeas
  • » Profile

Posts

Posts

Choose csv result format in `Simulation->Simulation Setup->Output->Output Format` and then simulate the model. This will generate the csv result file for all variables instead of the default mat file.

Adeel.

The problem is due to "C:/Users/VED/Desktop/РЎРљРўРњ/OM_sample". You have special characters in the package location. Either change the package location or download the latest build which handles the special characters better.

Adeel.

Apr-25-22 08:14:50
Compile OMedit in QT
Category: Developer

You need to set the build environment. Tell Qt creator where to look for header files by setting OMBUILDIR variable.

https://openmodelica.org/images/agorapro/attachments/782/build-environment.png

Adeel.

We need more information. Compilation log etc.

Adeel.

And yes you need to restart after the change.

Adeel.

Change from Modelica 3.2.3 to Modelica 4.0.0 in the Tools->Libraries.

Adeel.

Feb-11-22 13:59:41
OMEdit quits upon startup splash screen after "creating widgets" stage

I can't find Transient 1.0.3. The only master version available is 2.0.0 and is using Modelica 4.0.0
https://github.com/ClaRaLibrary/TransiEnt

Adeel.

Feb-11-22 13:40:15
OMEdit quits upon startup splash screen after "creating widgets" stage

Any specific class that you are trying to open?
I test the same on my side and try to debug the issue.

Adeel.

Feb-11-22 13:25:23
OMEdit quits upon startup splash screen after "creating widgets" stage

It is hard for us to know why an older version is not working on a specific platform.
Maybe we can help you getting your models to run in the latest version. What is the exact problem when you use the latest build?

Adeel.

Feb-11-22 13:17:25
OMEdit quits upon startup splash screen after "creating widgets" stage

It says that you are using OpenModelica v1.14.1 (64-bit) and the latest available stable release is 1.18.1.
Please download the latest release or the nightly build and try again.

Adeel.

Looking at the extents in the annotation I can see that it should be vertically flipped. And I get the same behavior in OMEdit.
I even tested your model in Dymola and got the same output.

Here is the code where bitmap should be drawn without any vertical or horizontal flip,

Code:

model iconTest

equation

annotation(
    Icon(graphics = {Bitmap(extent = {{-100, -100}, {100, 100}}, imageSource = "/9j/4AAQSkZJRgABAQIAJQAlAAD/4QhoRXhpZgAASUkqAAgAAAAGABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAwAAADEBAgANAAAAZgAAADIBAgAUAAAAdAAAAGmHBAABAAAAiAAAAJoAAADOAgAAEwAAAM4CAAATAAAAR0lNUCAyLjEwLjIwAAAyMDIxOjEwOjE0IDE1OjE4OjEwAAEAAaADAAEAAAABAAAAAAAAAAgAAAEEAAEAAAAAAQAAAQEEAAEAAAAAAQAAAgEDAAMAAAAAAQAAAwEDAAEAAAAGAAAABgEDAAEAAAAGAAAAFQEDAAEAAAADAAAAAQIEAAEAAAAGAQAAAgIEAAEAAABZBwAAAAAAAAgACAAIAP/Y/+AAEEpGSUYAAQEAAAEAAQAA/9sAQwAIBgYHBgUIBwcHCQkICgwUDQwLCwwZEhMPFB0aHx4dGhwcICQuJyAiLCMcHCg3KSwwMTQ0NB8nOT04MjwuMzQy/9sAQwEJCQkMCwwYDQ0YMiEcITIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy/8AAEQgBAAEAAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A9/ooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiqVAF2isekoA2aKyK0aAJqKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoornqANmuKrlq9GoA84rWr1GigDhKsV2dFAHndZNetUUAeP13ddBXKUAddTq8cr1ugCxRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFU6AMmuLqjXsFABUlFFABRRRQAUUUUAFFFFABRRRQBn15XXslZtAFqrFeQ169QAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFeWV6bXldAHo9adFFABRRTaAHUVylcrQB6rRXn9dxQBYooooAKKKKACiiigDgq3a1680oA9UooooAKKKKACiiigAooooAKKKKACiiigAooooA56supq0KAN+iiigArymu5rm6ANGpK6yuIoA5yqNfNFfUlAHqNWq8wr0+gAooooAKKya82oA9frxmvTa4ygD0ulplPoAKKKKACiiigAooooAKKKKACiiigAooooA5CtOqNMoA62iiigDiazq62vM6AL1RV4pXq1AHTVtV2VY9AHl1e015tXpNABRRRQB5lW7W/XBUAQ1drs6fQAVo15TXq1ABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAGdXD16RXj1AHsVFNp1ABXm9ekUlAHkdaVdTXK0AdLXn1dlXY0AR1ZoooAKKKKACiiigAooooA87rqK1K8ioA9lopKWgAooooAKKKKACiiigAooooAKKKKACufroKKAPKa9NqhXDUAeo0V4lSUAe3UV4jRQB7dRXiNPoA9rorzmvQqAJKKKKACiiigAoorhqAO5rgK5SpqAPTa16gqegAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKzKhoA2aKxqKANmisaloAqVhV6BXmFAHp9FFFABRRRQAV5tXpNebUAdzWhWdWjQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAHPVVrq6KAOUorq6KAOUpa6qigArymvVq8hoA9eorma6WgBaKKKACvNq9JrzCgDvq0aq1aoAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigDh6y69MooA8zor0yigDzOn16TRQAlNp9FAHE1ydexUlAHnldfUdcxQBu1wtdTXX0AS0UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQBkVBRVagCzRVaigCzS1VpaAOmooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA//2QD/4gKwSUNDX1BST0ZJTEUAAQEAAAKgbGNtcwQwAABtbnRyUkdCIFhZWiAH5QAKAA4ADQARAARhY3NwTVNGVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1kZXNjAAABIAAAAEBjcHJ0AAABYAAAADZ3dHB0AAABmAAAABRjaGFkAAABrAAAACxyWFlaAAAB2AAAABRiWFlaAAAB7AAAABRnWFlaAAACAAAAABRyVFJDAAACFAAAACBnVFJDAAACFAAAACBiVFJDAAACFAAAACBjaHJtAAACNAAAACRkbW5kAAACWAAAACRkbWRkAAACfAAAACRtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACQAAAAcAEcASQBNAFAAIABiAHUAaQBsAHQALQBpAG4AIABzAFIARwBCbWx1YwAAAAAAAAABAAAADGVuVVMAAAAaAAAAHABQAHUAYgBsAGkAYwAgAEQAbwBtAGEAaQBuAABYWVogAAAAAAAA9tYAAQAAAADTLXNmMzIAAAAAAAEMQgAABd7///MlAAAHkwAA/ZD///uh///9ogAAA9wAAMBuWFlaIAAAAAAAAG+gAAA49QAAA5BYWVogAAAAAAAAJJ8AAA+EAAC2xFhZWiAAAAAAAABilwAAt4cAABjZcGFyYQAAAAAAAwAAAAJmZgAA8qcAAA1ZAAAT0AAACltjaHJtAAAAAAADAAAAAKPXAABUfAAATM0AAJmaAAAmZwAAD1xtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAEcASQBNAFBtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEL/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wgARCAAgACADAREAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAABAUCAwYI/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEAMQAAAB6pAyQUCGcGA8IGfGhaGC4uCz/8QAGxAAAwEBAAMAAAAAAAAAAAAAAgMEAQAFFBX/2gAIAQEAAQUC4q1ia6QaXVHoT2+U+a2ykSlEsMWLxq6ZmMZlO+nIrUo50YuYyVLS7//EABQRAQAAAAAAAAAAAAAAAAAAAED/2gAIAQMBAT8BB//EABQRAQAAAAAAAAAAAAAAAAAAAED/2gAIAQIBAT8BB//EACQQAAEDAwMEAwAAAAAAAAAAAAECERIAAyEEEDEiQVGBMlLC/9oACAEBAAY/AqKRJahzBJLVEOFfVQY7LKSymwfFW9Lp7Qu3cNafqUO59ck1aWlCpqE7eOC1BQLg5BpSFfFQY0JwuRwFHTk/qrlzEkSfw4oJJkecBhtIhHu2DUlWwT3Pnb//xAAgEAEAAQQCAgMAAAAAAAAAAAABEQAhMVFBYRBxgZHB/9oACAEBAAE/IaxBAPQlLHzTRIcy4tw5O/GL1NhsNZhAyk2p4HIc2WmGbZvuifeHpeJoAQoGEq9siDTUpHEik0oB9RHVWDjkHJT8oJcjgEswEsBO/Chldz9tKFUiDDTs6fH/2gAMAwEAAgADAAAAEIJIIIBIJP/EABQRAQAAAAAAAAAAAAAAAAAAAED/2gAIAQMBAT8QB//EABQRAQAAAAAAAAAAAAAAAAAAAED/2gAIAQIBAT8QB//EAB4QAQEAAwADAAMAAAAAAAAAAAERACExEEFRYYGh/9oACAEBAAE/EMoU0OuDEViMQx5h56r/ABBAiChFK98FM2uCKpHsUf1gSIHe1cgooUsaCfTysmjnYBkVdGEHaWjUFEfYmGyhpRhGJx33Gm/hPNjq1sNnDqV62lWugtzoJv3m1/E4XDE0AVA1CBhCIC6iT6OCx9qEvj/YPx4//9k=")}));
end iconTest;

Adeel.

Please share a minimal test model.

If you think it is a bug then report it here https://github.com/OpenModelica/OpenMod … new/choose

Adeel.

Jul-28-21 09:54:43
Topic: Request
Graphic Interphase

Hello Santiago,

I just sent a reply to your question via email.
Where do you find information about simforge? Simforge is really really old and was replaced by OMEdit several years ago.
You should use OMEdit for graphical modelling.

Adeel.

Apr-13-21 15:15:28
Unable to export CSV from OpenModelica.

Are you trying to export CSV of plotted values from OMEdit?

There were some issues with the export of CSV that are recently fixed. I suggest updating to a latest nightly build. Version 1.14 is anyway very old.

Adeel.

Apr-06-21 09:39:03
​There is a process running in OpenModelica, and I am trying to control the parameters of this...

Ticket is a bug report about your issue on our trac system. Please go to the following link to report your bug.
https://trac.openmodelica.org/OpenModelica/newticket

Adeel.

It is hard to understand the problem without actual test model. Please create a ticket about this issue with example model here https://trac.openmodelica.org/OpenModelica/newticket

Adeel.

I remember an old bug with same issue but it was fixed a long time ago. Which version of OM are you using?

Adeel.

Dec-28-20 10:40:11
How to compile OpenModelica in QT?
Category: Developer

You need to install the debug binaries. Read the OMDev/INSTALL.txt section QT DEBUG DLLS (optional).

Adeel.

Nov-17-20 09:30:15
Compile OMedit in QT
Category: Developer

Yes you need to set an environment in Qt creator.

I personally use Qt creator for debugging purposes. My process is following,

- Compile everything form msys first time. So all dependencies are compiled as well.
- Set the environment in Qt Creator
- Set the tool chain in Qt Creator.
- Compile from Qt creator again. Note that Qt creator will only compile OMEdit and not the dependencies.

Adeel.

Nov-17-20 09:23:58
Compile OMedit in QT
Category: Developer

Recommended way is to compile in MSYS.
Which Qt creator you are using? The one that comes with OMDev?

Adeel.

Nov-02-20 10:53:43
Fluid library object icons partially blank with 1.16 (ok in 1.14) either in Linux or Windows

Hello Brunad,

I looked at the zip fle you uploaded here https://trac.openmodelica.org/OpenModelica/ticket/6166

If your bug is related to seeing M icon in the library view under Fluid->Valves then I can say that it is not a graphical bug. We intentionally defer the loading of connectors when expanding the libraries. If you double click on them to open then they are loaded automatically in the libraries view.

Adeel.

Oct-21-20 10:35:49
I could not find any detailed documentation of translational and algorithmic debugger for...

Perhaps you are trying to do it on a model. Its only allowed on top level package.

Adeel.

Jun-01-20 10:14:45
Error when trying to link OSG debug libraries even if installed
Category: Developer

In case you want to debug OSG then read the section OpenSceneGraph DEBUG DLLS (optional) in INSTALL.txt file in OMDev.

Adeel.

Jun-01-20 10:10:11
Asking if it is possible to speed up the compilation of OMEdit when only a file is modified
Category: Developer

Make sure you have this commit checked out https://github.com/OpenModelica/OpenMod … bee2d55b1b

Adeel.

May-19-20 08:20:03
goto reference tags for connectors

To update the canvas size, right click on the canvas and choose Properties and then update the extents accordingly.

I didn't understand what you mean by Goto reference tags.

Adeel.

May-12-20 10:25:19
Provide a tree view of the components in a model
Category: Developer

Yes!

Adeel.

May-11-20 18:11:37
Provide a tree view of the components in a model
Category: Developer

It was not implemented correctly and was buggy as well. A proper better implementation is planned for 2.0 release.

Adeel.

Time for a new ticket then https://trac.openmodelica.org/OpenModelica/newticket
Please provide us a test model as well.

Adeel.

You can see them in the Simulation Output Window.

https://www.openmodelica.org/images/agorapro/attachments/782/Simulation-Output-Window.png

Adeel.

How are you running the simulation?
You need to enable the LOG_STATS logging.

Adeel.

Apr-20-20 10:11:21
F1 or Help>OpenModelica Users Guide:

Can you see if the file (C:/Program Files/OpenModelica1.14.1-64bit//share/doc/omc/OpenModelicaUsersGuide/index.html) actually exists?

Adeel.

Apr-20-20 10:07:30
In windows 10, first installation

Can you try the following and see if it works.

- Go to %OPENMODELICAHOME%\tools\msys\mingw64\lib.
- Then rename libeay32.dll, libssl32.dll and ssleay32.dll to maybe something like libeay32-O.dll, libssl32-O.dll and ssleay32-O.dll.
- Try running OMEdit now.

Adeel.

Apr-20-20 10:03:18
How to use debug flags like bltdump in the openmodelica 1.14 version

You can set this in,

Code:

Simulation Setup->Translation Flags->Additional Translation Flags

In the additinal translation flags textbox write,

Code:

--simplifyLoops=1

Adeel.

If your model.mo is located in the same directory where the .mos file is then you can call,

Code:

loadFile("model.mo")

instead of

Code:

loadModel(grid)

Adeel.

Yes. You can use OpenModelica scripting.

Adeel.

Feb-21-20 21:46:05
Compilation of my model Ok, but simulation fails
Category: Programming

You can play with %OPENMODELICAHOME%share/omc/scripts/Compile.bat
However, we only set paths for compilation and not for simulation.

Adeel.

You can enable the new frontend by calling `setCommandLineOptions("-d=newInst")` from OMPython.

Adeel.

For you as an engineering lab administrator, you can run the installer in the silent mode to be installed for all users.

Start the installer from command line with /S switch.

Adeel.

The installation directory where you installed OpenModelica.

Adeel.

There is a file "InstallMode.txt" in the installation directory.
What are the contents of it? Is it "AllUsers" or "CurrentUser"?

Adeel.

As I understand now we can generalized the actions in 2 ways. The actions on the Diagram view and the actions on the Documentation view. Whenever the Diagram view changes we update the Documentation View to it but when the Documentation View changes we don't update the Diagram View.

@casella note that this will again open the issue that you originally had i.e., when the Documentation view is not in sync with Diagram view and you update the documentation of the class. That was the original issue for you that you don't know for which model you are updating the documentation since they both are not synced.

Another solution which is probably more effective but requires more time to implement is that we make the Documentation view completely independent (as it was previously) but also make it just a read-only view. For editing we add a new view inside the Diagram view, so now we have have icon, diagram and text and instead we should have icon, diagram, text and info. Clicking on info opens the documentation in the diagram view and there you can also edit it. Clicking on any link inside the documentation will switch to a new model.

Adeel.

As far as I remember the correct way to use the script is to pass it the classname instead of the filename. So in  your example it has to be,

Code:

python generate_icons.py Modelica.Fluid.Examples.HeatingSystem

It only generates the icon view not the diagram view.

Adeel.

There is no such API. However, there is a python script that you can use https://github.com/OpenModelica/OpenMod … e_icons.py

Adeel.

There is no GUI support available for this right now.

Adeel.

Nov-19-19 10:33:34
I receive erron in simulating with algorithmic Debugger

Hello Vivek,

Sorry for the late reply.
It might be that the line you are referring to is optimized out by the OpenModelica compiler.

Adeel.

Yeah that would be good.

Adeel.

The question is which one will take the preference?

Adeel.

Nov-13-19 10:46:45
Using OMPython ModelicaSystem to generate an outfile that avoids double entries at the same time...

__OpenModelica_simulationFlags is only read by OMEdit.

Adeel.

It has been removed to make the "prefferedView" annotation work properly. Also previously you can open the documentation of any model regardless of what you have opened in the modeling view. Now the two views are synced. If you navigate to some class in the documentation the modeling view will also open the same class. So it doesn't make sense to have documentation in the context menu.

Adeel.

Sep-30-19 08:36:05
I receive erron in simulating with algorithmic Debugger
Sep-30-19 07:26:16
I receive erron in simulating with algorithmic Debugger

This could also mean that it failed to find gdb. Check the gdb path in "Tools->Options->Debugger->Algorithmic Debugger->GDB Path" and see if its correct.

Adeel.

Sep-27-19 07:56:53
I receive erron in simulating with algorithmic Debugger

Did you check if the file exists or not "C:/Users/user/AppData/Local/Temp/OpenModelica/OMEdit/Debuggertest/Debuggertest.exe"?
Maybe the simulation has failed.

Adeel.

Yeah some of the functions are not documented yet.

getComponents takes a model name as input

It returns the list of components where each component is like this record,

Code:


record Component
  String className;
  String name;
  String comment;
  String access;
  Boolean isFinal;
  Boolean isFlow;
  Boolean isStream;
  Boolean isReplaceable;
  String variability "'constant', 'parameter', 'discrete', 'unspecified'";
  String innerOuter "'inner', 'outer', 'none'";
  String inputOutput "'input', 'output', 'unspecified'";
  String dimensions[:];
end Component;

Adeel.

Yes you can query them using the scripting API,

Code:


loadModel(Modelica);
getComponents(Modelica.Electrical.Analog.Interfaces.PositivePin);
getComponents(Modelica.Electrical.Analog.Interfaces.NegativePin);

Adeel.

Simulate first calls buildModel and then calls system using the simulation flags.

In your case you have to call system with the simulation flags e.g., `system("./model.exe -lv= \"LOG_NLS_RES,LOG_STATS\"")` otherwise the simulation flags are not used.

Adeel.

Jul-19-19 09:15:44
Error when I try to simulate the model wih the standard values.

If the problem remain even after the latest nightly then post the omeditcommunication.log file from your temp folder. That will help us to figure out what is wrong.

Adeel.

May-23-19 11:13:53
queries on visualization of multibody simulation result

sathishmswamy wrote:

1) Am trying to run Open Modelica from python. While doing so is it possible to generate the 3d visualization xml? if possible how?

Call setCommandLineOptions("-d=visxml") before simulating the model. It will generate the 3d visualization xml file.

sathishmswamy wrote:

2) can the xml and .mat result file used for Visualizing the result be opened in any other alternate open source software.

I don't know about any other software.

Adeel.

May-16-19 09:12:11
How to choose C optimisation level through OMEdit

Yes please make a ticket about it. I believe saving this inside a model doesn't make sense but we could have a global optimization option that all models use during the compilation.

Adeel.

May-16-19 06:58:13
How to choose C optimisation level through OMEdit

Unfortunately, there is no way to make this a default choice.

Adeel.

May-15-19 08:30:50
How to choose C optimisation level through OMEdit

https://openmodelica.org/doc/OpenModeli … eneral-tab

C/C++ Compiler Flags (Optional) – the optional C/C++ compiler flags

Adeel.

Apr-18-19 21:59:53
I want to change the e-mail I used when I created the account

Done.

Adeel.

Apr-18-19 20:05:51
I want to change the e-mail I used when I created the account

I can do that for you.
Which email you want to use?

Adeel.

I guess DynamicSelect is not what you want here since the Modelica specification says,

"DynamicSelect has the syntax of a function call with two arguments, where the first argument specifies the value of the editing state and the second argument the value of the non-editing state."

So in modeling view it will always use the first argument.

You could use a boolean parameter like this,

Code:


Rectangle(origin = {-2, -10}, fillColor = if isRed then {255,0,0} else {255,255,255}, pattern = LinePattern.Dash, fillPattern = FillPattern.Solid, lineThickness = 1.5, extent = {{-28, 32}, {36, -10}})

But note that it will always use the default value of the parameter. We don't support the parameter changes yet. See https://trac.openmodelica.org/OpenModelica/ticket/2081

Adeel.

I think we both are on different tracks. I am a bit lost actually.

Just to understand your problem again. You are having problems loading your models in OMEdit. So basically you just get the error and nothing is loaded, right? If yes then usually such error also points you to the exact file and line.

If you can't share your model then at least try to make a minimal model that depicts the problem. Unfortunately its very hard for us to solve the issue without the source code.

Adeel.

Right click and choose "Expand All".

Adeel.

It seems like somewhere in your code you have,

Code:


model A
end B;

In such cases you have the error The identifier at start and end are different.
Usually you end up with such errors when you manually try to edit the models.

Adeel.

Mar-01-19 08:47:34
OMSimulator Python help

This is not the right link. Where did you find it?
The correct link is https://openmodelica.org/doc/OMSimulato … ython.html or https://openmodelica.org/doc/OMSimulato … ython.html

Adeel.

Feb-28-19 09:29:42
Is it possible to open Dymola-encrypted models or commercial libraries with OpenModelica ?

Hello,

Well by decryption it doesn't mean that you can access the actual source code. However, you will be able to simulate the models.

Adeel.

Feb-26-19 14:49:50
mat file saved parameter after filtering, csv not.

The variable filter should be consistent regardless of the result format.
Create a ticket about it.

Adeel.

Feb-26-19 12:41:31
mat file saved parameter after filtering, csv not.

Its a default setting. The mat file contains the parameters.

Adeel.

It's a fixed toolbar you can't hide it.

Adeel.

This is a known issue and hopefully will be fixed soon.

Adeel.

Dec-14-18 13:41:38
DynamicSelect for connector lines?

Hello,

DynamicSelect annotation is only implemented for visible attribute. It is still work in progress.
Hopefully soon we will have full support of it.

Adeel.

> Unfortunately, a novice (like me) building a model using OMEdit is going to proceed by dragging a bunch of components into a new model and then create connections. Unless one actually checks the model each time after a connection is made, all connection errors are going to be unrecognized until such time that the model is manually checked or attempted to be simulated.  Prohibiting improper connections in the graphical editor in the first place  would make for a far better experience than the current behavior.

Yeah we use to have that functionality. But it was way too slow for real models. As I said earlier we can have that functionality possible with the new frontend.

> Further, if a model is created in OMEdit with improper connections, even double clicking its icon within a library will show it in the OMEdit canvas (is this not instantiation?) but any connection errors are not flagged by this operation.

No, that is not instantiation.

Adeel.

We don't check for types when making the connection. You will get the errors when you instantiate or translate the model.
Perhaps with the new faster frontend we can check for such connections.

Adeel.

Nov-13-18 12:44:22
How to set value the OpenModelica variable (Non Parameter type) using OMPython
Oct-01-18 15:48:24
Unable to buuild OMEdit without OMSimulator

Yes, it depends on OMSimulator now. You need to update the OpenModelica submodules.
I have updated the OMEdit readme.

Adeel.

Code completion is still work in progress.
However, once you have activated it you should see its effect on the Modelica Text View. Press ctrl+space or start typing something like Real, Integer, model etc.

Adeel.

Can you describe the problems?

Adeel.

Unfortunately OpenModelica compiler is crashing hard on command "getComponents(FCSys.Conditions.Environment)". I have made a minimal example for testing,

Code:


loadModel(FCSys);
getErrorString();
getComponents(FCSys.Conditions.Environment);
getErrorString();

Here is the gdb output,

Code:


(gdb) r
Starting program: C:\OpenModelica\build\bin\omc.exe script.mos
[New Thread 3492.0x1038]
[New Thread 3492.0x4024]
[New Thread 3492.0x1b30]
[New Thread 3492.0x28ec]
[New Thread 3492.0xe18]
[New Thread 3492.0x21c8]
[New Thread 3492.0x4748]
[New Thread 3492.0x2c50]
[New Thread 3492.0x2624]
[New Thread 3492.0xd64]
[New Thread 3492.0x3830]
[New Thread 3492.0x4068]
[New Thread 3492.0x9c0]
[New Thread 3492.0x43d4]
[New Thread 3492.0x3db4]
[New Thread 3492.0x20b0]
[New Thread 3492.0x47c]
[New Thread 3492.0x2474]
[Thread 3492.0x1b30 exited with code 0]
[Thread 3492.0x28ec exited with code 0]
[Thread 3492.0x4024 exited with code 0]

Thread 1 received signal SIGSEGV, Segmentation fault.
0x000000006d0bbe41 in omc_InstUtil_splitInnerAndOtherTplLstElementMod ()
   from C:\OpenModelica\build\bin\libOpenModelicaCompiler.dll
(gdb)

I suggest to make a bug report (https://trac.openmodelica.org/OpenModelica/newticket) so it can be assigned to the appropriate developer.

Adeel.

Use recursive parameter of getClassNames.
See here https://build.openmodelica.org/Document … Names.html

Adeel.

Jun-14-18 08:48:35
Set timeout from the GUI

Yes. Tools->Options->Simulation->OMC Flags

Adeel.

Jun-05-18 16:32:40
Topic: OM shell
How to load a package

I can load your model without any problem,

Code:

>> setCommandLineOptions("-g=Optimica")

true

>> loadFile("C:/Users/adeas31/Desktop/BangBangPkg.mo")
true

>> getClassNames()
{BangBangPkg}

>> getClassNames(BangBangPkg)
{BangBang,optBangBang}

Adeel.

Jun-05-18 09:42:43
Topic: OM shell
How to load a package

Yeah you can combine both files into one file under a package and loadFile should work fine to load it. What is the error?

Yes optimize command accepts the qualified path.

Adeel.

You can choose File->Open Model/Library File(s) and then select the package.mo file.
OR
Choose File->Load Library and then select the folder Buildings latest.

Adeel.

Open a new plot window before clicking on the variable to plot.
https://openmodelica.org/doc/OpenModeli … #time-plot

Adeel.

Jan-15-18 12:57:22
Category: Developer

I don't know about it.

Adeel.

Jan-15-18 12:24:06
Category: Developer

Well there isn't any command to get this information straight away. You need to run several commands e.g.,

getComponents(dcmotor)
Gives you list of componets including resistor1 and its type i.e., Modelica.Electrical.Analog.Basic.Resistor. Now ask for its components Modelica.Electrical.Analog.Basic.Resistor

getComponents(Modelica.Electrical.Analog.Basic.Resistor)
In most cases the interface is a class component but you notice that n is not listed as class direct component so you need to read the inherited classes.

getInheritedClasses(Modelica.Electrical.Analog.Basic.Resistor)
{Modelica.Electrical.Analog.Interfaces.OnePort,Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort}

Now read the components of inherited classes,

getComponents(Modelica.Electrical.Analog.Interfaces.OnePort)
{{Modelica.SIunits.Voltage,v,"Voltage drop between the two pins (= p.v - n.v)", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.SIunits.Current,i,"Current flowing from pin p to pin n", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Interfaces.PositivePin,p,"Positive pin (potential p.v > n.v for positive voltage drop v)", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Modelica.Electrical.Analog.Interfaces.NegativePin,n,"Negative pin", "public", false, false, false, false, "unspecified", "none", "unspecified",{}}}

n is listed in the above output (I have made it bold) and its type is Modelica.Electrical.Analog.Interfaces.NegativePin.

What do you mean by connection type?

Adeel.




Jan-15-18 11:28:53
Category: Developer

There isn't any command that returns connection or connector type. You could use getNthConnection(model, index) and then read the connector and check the type of the connector manually using is* like commands e.g., https://build.openmodelica.org/Document … Model.html

We don't have any command that returns image in any format.

What are you trying to achieve?

Adeel.

Dec-21-17 08:32:36
Category: Developer

Use getComponentModifierNames(model, "component") https://build.openmodelica.org/Document … Names.html and then getComponentModifierValue(model, modifier) https://build.openmodelica.org/Document … Value.html

Adeel.

Dec-20-17 23:31:22
Category: Developer

Code:

getComponents(model)

gives the list of elements.

Code:

getConnectionCount(model)

and

Code:

getNthConnection(model, index)

gives the connections.

Adeel.

Tools|Option|Simulation|OMC Flags are the compiler flags. You want to add a simulation flag so go to Simulation Setup|Simulation Flags|Logging and check LOG_INIT or write -lv=LOG_INIT in Additional Simulation Flags (Optional):.

Adeel.

You have to manually add the annotations to the existing model.

Adeel.

1) You can use a windows program called "depends.exe" to find out the list of dependencies. Compiling a version without dependencies requires that we link against the static versions.
2) Executable reads a file called model_init.xml and I don't think we have any formal description about it.

Adeel.

Aug-22-17 12:52:07
Issues while reopening .mo file

Siv wrote:

If you open my .mo file you will be able to see a 2m thick wall with fixed boundary conditions at both ends. I would like to change it in one of the end. How may I do it?

I am not a modeler so can't help you with that. In the original question you said "does not let me modify" so I though its something wrong with the tool but if you want to know "how to do it" then perhaps some other modeler can help you.

Siv wrote:


And moreover when I open Omedit I am getting this following error in the Messages browser:
[1] 15:44:00 Scripting Error
sh: 1: impact: not found


What does it mean?

You can ignore this error message.

Adeel.

Aug-22-17 08:51:46
Issues while reopening .mo file

Can you explain more? How are you opening the file? Which boundary condition and how are you trying to change them?

Adeel.

We don't support that feature.

Adeel.

Jun-13-17 21:20:40
Cannot get models with output displays to animate.

No that's not possible.

Adeel.

Jun-13-17 18:00:22
Cannot get models with output displays to animate.

Sorry didn't fully understand your question.
RealNetwork1 doesn't have any MultiBody component so no visualization.

Adeel.

Use the following,

Code:

cd();

loadModel(Modelica);
getErrorString();
loadFile("RCmodel.mo");
getErrorString();
buildModel(RCmodel, outputFormat="csv");
getErrorString();

for i in 1:3 loop
  c := 0.1 + i;
  system("RCmodel -override=C.C=" +String(c)+" -r=RCmodel" +String(i) + "_res.csv");
  getErrorString();
end for;

Adeel.

I know. This is just for testing purpose.
However, if you use the new updated script then everything should work fine.

Adeel.

There is also a problem in the script. I have fixed it.
Use the following one,

Code:

cd(); 

loadModel(Modelica);
getErrorString();
loadFile("RCmodel.mo");
getErrorString();
buildModel(RCmodel);
getErrorString();

for i in 1:3 loop
    c := 0.1 + i;
    system("RCmodel -override=C.C=" +String(c)+" -r=RCmodel" +String(i) + "_res.csv");
    getErrorString();
end for;

Basically there is no need to call the executable with "./".

Adeel.

1. Use %OPENMODELICAHOME% instead of typing the OpenModelica path.
2. Move the system command out of for loop. Because the commands in the for loop are executed but not printed to the console. You can also just comment out the for and end for lines.

Post the output again.

Adeel.

I need to see the output of the following commands otherwise I can't help much.

Code:

echo %OPENMODELICAHOME%

set PATH=%OPENMODELICAHOME%\bin;%PATH%
echo %PATH%
omc.exe script.mos

Run the above commands one by one. Replace the script.mos with your script.

Adeel.

Its the environment PATH variable. You need to run the command exactly as I posted.

Adeel.

You need to set the path in your terminal so it can find the libsundials_idas.dll.
Run the following command,

Code:

set PATH=%OPENMODELICAHOME%\bin;%PATH%

and then run your script.

Adeel.

I am interested in seeing the output of the mos script.

Your model is named RCmodel so you should get and executable with name RCmodel. I wonder then why you are calling RCserie with system command.

Also it has to be "_res.csv" instead of "_res.mat" if you want csv file.

Adeel.

No I mean the output of the mos script.

Adeel.

Usually the result files are generated in the working directory. In your case it is the one where your mos script is located.
Can you share the output of your mos script?

Adeel.

You need to fix your model. To see where exactly you need to fix use "-d=initialization".
So basically call your mos script like this,

Code:

omc.exe -d=initialization script.mos

And you will get more information about which initial condition are missing.

Adeel.

In the example change .mat to .csv

Adeel.

I think you need to update your OpenModelica to 1.12 https://build.openmodelica.org/omc/buil … ly-builds/
I have looked into the crash report and I have found references of code that is no longer used.
So please update OpenModelica and if you still have issues then report the bug at https://trac.openmodelica.org/OpenModelica/newticket

Adeel.

You can't run the animation via the mos script.
We could however help with fixing the crash. Can you provide more information about the model and the OM version you are using?

Adeel.

Apr-18-17 16:43:04
OMEdit doesn't load

Probably you have saved the file in some path with spaces.

Adeel.

It is possible now https://github.com/OpenModelica/OMEdit/ … 2b5d4a6698
You need to download the new nightly build tomorrow which will have this feature.

Note that you need model_init.xml file for "display units", "value" and "description".
In case of OMShell this file is present so if you load the result file with new OMEdit you should be able to see "display units", "value" and "description".

Adeel.

Apr-02-17 21:35:45
how to utilize the exe file that is compiled when i simulate a model?

It is exactly the same for Ubuntu.

Adeel.

Feb-23-17 16:25:13
Questions about using the scripting API via OMPython

You get different output because OMShell always call getErrorString() with every command.

The output of translateModelFMU(x, fileNamePrefix="model") is,

"SimCode: The model x has been translated to FMU"

The output of getErrorString() (in this case) is,

"Warning: The initial conditions are not fully specified. For more information set -d=initialization. In OMEdit Tools->Options->Simulation->OMCFlags, in OMNotebook call setCommandLineOptions("-d=initialization"). "

If you call following commands from OMPython you should get the same output,

Code:


omc.sendExpression('translateModelFMU(x, fileNamePrefix="model")')
omc.sendExpression('getErrorString()')

Adeel.

Feb-23-17 15:02:38
Questions about using the scripting API via OMPython

That's strange because I can run the commands without any issue,

Code:


>>> omc = OMCSession()
2017-02-23 15:58:58,647 - OMCSession - INFO - OMC Server is up and running at file:///c:/users/adeas31/appdata/local/temp/openmodelica.objid.2b4416f5aed74c6a8b907ae7b35b3aab
>>> omc.sendExpression("getVersion()")
'v1.12.0-dev-230-g40f70ce (64-bit)'

However, I am using the 64-bit version but I don't think that is the problem.

Can you post the output of setup.py and the commands above?

Adeel.

Feb-23-17 14:28:20
Questions about using the scripting API via OMPython

Have you installed OMPython after updating?

Code:


cd C:/OpenModelica1.11.0-32bit/share/omc/scripts/PythonInterface
python setup.py install

Adeel.

OMEdit can handle locale aware decimal separator. But using 1,5 fails with OpenModelica API since it is not locale aware.
I will change OMEdit to always send dot as decimal separator to omc.

Adeel.

Is because you might be using different locale. Change your language to English in "Tools->Options->General->Language".
I am guessing your decimal separator is comma instead of dot. However, I found out that OM fails to simulate the class if comma separator is used.

Adeel.

I have no idea about it.
Maybe someone else can help on this.

Adeel.

You need to create classes in Modelica.

Create a file called Sine.mo with the following contents,

Code:

model Sine "Generate sine signal"

  parameter Real amplitude=1 "Amplitude of sine wave";
  parameter Real freqHz(start=1) "Frequency of sine wave";
  parameter Real phase=0 "Phase of sine wave";
  parameter Real offset=0 "Offset of output signal";
  parameter Real startTime=0 "Output = offset for time < startTime";
  Real y;
protected
  constant Real pi=Modelica.Constants.pi;

equation
  y = offset + (if time < startTime then 0 else amplitude*
    Modelica.Math.sin(2*pi*freqHz*(time - startTime) + phase));
end Sine;

Call the following command in OMShell,

Code:

loadModel(Modelica)

loadFile("Sine.mo")
simulate(Sine)
plot(y)

You can read more about Modelica here https://openmodelica.org/useresresource … ca-courses

Adeel.

You could create your model in any text editor, save the file as .mo and then load it in OMShell.

Code:

loadFile("Sine.mo")

simulate(Sine)
plot(x)

Adeel.

You need to call plot function after simulating the model.
https://build.openmodelica.org/Document … .plot.html

Adeel.

Jan-27-17 22:28:37
Cant manage to get document browser to work.

See https://trac.openmodelica.org/OpenModelica/ticket/4217
So far we don't know what is the reason.
Zoom level is very low for some reason.

Adeel.

Dec-24-16 13:15:16
check and instantiation succesfully but simulation has no results

Update your GDB path in "Tools->Options->Debugger->GDB Path".

Adeel.

Nov-25-16 15:53:00
Category: Developer

I meant the log of your make command.

Revision 192 only gives instructions about how to install "OpenSceneGraph DEBUG DLLS" but you have to install them yourself. However, since you are not compiling debug version so it should work without any issue because we already have release dlls of OSG in OMDEV e.g., check the dlls in "C:/OMDEV/tools/msys/mingw64/bin".

Adeel.

Nov-25-16 11:14:12
Category: Developer

If its updated then you should have these dlls in "C:/OMDEV/tools/msys/mingw64/bin".
Are you sure OMDEV environment variable is set?
Can you send me the full log? I want to see the linking command.

Adeel.

Nov-24-16 13:48:39
Category: Developer

When was the last time you updated your OMDEV?
Seems like time to call svn update.

Adeel.

Nov-24-16 11:28:07
Category: Developer

You don't need to copy the files.

The problem is you have set OPENMODELICAHOME to your installed version i.e., C:/OpenModelica1.9.6.
If you want to compile you should set OPENMODELICAHOME to your repository folder e.g., C:/OpenModelicaGit/build
(Note that OPENMODELICAHOME should point to a path where bin directory is located.)

Adeel.

Nov-23-16 23:40:59
Category: Developer

Have you setup OPENMODELICAHOME environment variable?
OMEdit includes fmilib.h from "OPENMODELICAHOME/../OMCompiler/3rdParty/FMIL/install/include" so if OPENMODELICAHOME is set then make should find it.

Adeel.

Nov-23-16 17:28:27
Category: Developer

Which ming64 are you using? The one from OMDEV ($OMDEV\tools\msys\mingw64_shell.bat)? Have you setup OMDEV for Qt?

Adeel.

Nov-16-16 10:21:11
Trying to obtained a linearized state space model of my model created in OMEdit

See here how to use the linearize function https://build.openmodelica.org/Document … arize.html

You need to first load the file using the loadFile API https://build.openmodelica.org/Document … dFile.html
Then call the linearize on your model.

For example if your model is named "M" then,
loadFile("model.mo")
linearize(M)

Adeel.

We don't support this right now.

Adeel.

Unfortunately the framework code is in a private repository. We haven't decided to make it public yet. But hopefully it will soon be able with OSMC public license then you could contribute to the work.

Adeel.

This work is still in progress. You need TLM co-simulation framework in order to run the simulation. The framework is still not part of the OpenModelica codebase. We will soon release a OpenModelica version with complete TLM co-simulation framework.

Adeel.

Oct-20-16 19:02:04
Runtime Error

Create a ticket here https://trac.openmodelica.org/OpenModelica/newticket
Provide as much information as you can with a sample test model to reproduce the bug.

Adeel.

Oct-10-16 20:55:13
I need to run my model with a variety of input sets to get a variety of input cases
Jun-28-16 13:02:47
Seeing Diagram/Icon View using annotations in Eclipse using ModelicaML

Basically you need a lot more than getIconAnnotation.

You need to check the inherited classes recursively. You need to get the components of the class and then icon annotation of each component class.

For example if you want to draw the icon for a Resistor component you need the following commands.

Code:

getInheritedClasses(Modelica.Electrical.Analog.Basic.Resistor)

{Modelica.Electrical.Analog.Interfaces.OnePort,Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort}

getInheritedClasses(Modelica.Electrical.Analog.Interfaces.OnePort)
{}

getIconAnnotation(Modelica.Electrical.Analog.Interfaces.OnePort)
{}

getComponents(Modelica.Electrical.Analog.Interfaces.OnePort, useQuotes = true)
{{"Modelica.SIunits.Voltage","v","Voltage drop between the two pins (= p.v - n.v)", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.Current","i","Current flowing from pin p to pin n", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.Electrical.Analog.Interfaces.PositivePin","p","Positive pin (potential p.v > n.v for positive voltage drop v)", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.Electrical.Analog.Interfaces.NegativePin","n","Negative pin", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Electrical.Analog.Interfaces.OnePort)
{{},{},{Placement(true,-,-,-110.0,-10.0,-90.0,10.0,-,-,-,-,-,-,-,)},{Placement(true,-,-,110.0,-10.0,90.0,10.0,-,-,-,-,-,-,-,)}}

getInheritedClasses(Modelica.Electrical.Analog.Interfaces.PositivePin)
{}

getIconAnnotation(Modelica.Electrical.Analog.Interfaces.PositivePin)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 255}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-100, 100}, {100, -100}}, 0)}}

getComponents(Modelica.Electrical.Analog.Interfaces.PositivePin, useQuotes = true)
{{"Modelica.SIunits.Voltage","v","Potential at the pin", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.Current","i","Current flowing into the pin", "public", "false", "true", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Electrical.Analog.Interfaces.PositivePin)
{{unassignedMessage="An electrical potential cannot be uniquely calculated.
The reason could be that
- a ground object is missing (Modelica.Electrical.Analog.Basic.Ground)
  to define the zero potential of the electrical circuit, or
- a connector of an electrical component is not connected."},{unassignedMessage="An electrical current cannot be uniquely calculated.
The reason could be that
- a ground object is missing (Modelica.Electrical.Analog.Basic.Ground)
  to define the zero potential of the electrical circuit, or
- a connector of an electrical component is not connected."}}

getDiagramAnnotation(Modelica.Electrical.Analog.Interfaces.PositivePin)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 255}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-40, 40}, {40, -40}}, 0), Text(true, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-160, 110}, {40, 50}}, "%name", 0, TextAlignment.Center)}}

getInheritedClasses(Modelica.Electrical.Analog.Interfaces.NegativePin)
{}

getIconAnnotation(Modelica.Electrical.Analog.Interfaces.NegativePin)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {0, 0, 255}, {255, 255, 255}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-100, 100}, {100, -100}}, 0)}}

getComponents(Modelica.Electrical.Analog.Interfaces.NegativePin, useQuotes = true)
{{"Modelica.SIunits.Voltage","v","Potential at the pin", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.Current","i","Current flowing into the pin", "public", "false", "true", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Electrical.Analog.Interfaces.NegativePin)
{{unassignedMessage="An electrical potential cannot be uniquely calculated.
The reason could be that
- a ground object is missing (Modelica.Electrical.Analog.Basic.Ground)
  to define the zero potential of the electrical circuit, or
- a connector of an electrical component is not connected."},{unassignedMessage="An electrical current cannot be uniquely calculated.
The reason could be that
- a ground object is missing (Modelica.Electrical.Analog.Basic.Ground)
  to define the zero potential of the electrical circuit, or
- a connector of an electrical component is not connected."}}

getDiagramAnnotation(Modelica.Electrical.Analog.Interfaces.NegativePin)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {0, 0, 255}, {255, 255, 255}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-40, 40}, {40, -40}}, 0), Text(true, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-40, 110}, {160, 50}}, "%name", 0, TextAlignment.Center)}}

getInheritedClasses(Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort)
{}

getIconAnnotation(Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort)
{}

getComponents(Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort, useQuotes = true)
{{"Boolean","useHeatPort","=true, if heatPort is enabled", "public", "false", "false", "false", "false", "parameter", "none", "unspecified","{}"},{"Modelica.SIunits.Temperature","T","Fixed device temperature if useHeatPort = false", "public", "false", "false", "false", "false", "parameter", "none", "unspecified","{}"},{"Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a","heatPort","Conditional heat port", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.Power","LossPower","Loss power leaving component via heatPort", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.Temperature","T_heatPort","Temperature of heatPort", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort)
{{Evaluate=true, HideResult=true, choices(error)},{Dialog("General","",true,-,false,"","","","","",false)},{Placement(true,-,-,-10.0,-110.0,10.0,-90.0,-,-,-,-10.0,-110.0,10.0,-90.0,)},{},{}}

getInheritedClasses(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a)
{Modelica.Thermal.HeatTransfer.Interfaces.HeatPort}

getInheritedClasses(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort)
{}

getIconAnnotation(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort)
{}

getComponents(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort, useQuotes = true)
{{"Modelica.SIunits.Temperature","T","Port temperature", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"},{"Modelica.SIunits.HeatFlowRate","Q_flow","Heat flow rate (positive if flowing from outside into the component)", "public", "false", "true", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort)
{{},{}}

getIconAnnotation(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {191, 0, 0}, {191, 0, 0}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-100, 100}, {100, -100}}, 0)}}

getComponents(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a, useQuotes = true)
{}

getDiagramAnnotation(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort)
{}

getInheritedClasses(Modelica.SIunits.Temperature)
{Modelica.SIunits.ThermodynamicTemperature}

getInheritedClasses(Modelica.SIunits.ThermodynamicTemperature)
{Real}

errors:=getMessagesStringInternal()
{}

size(errors,1)
0

getIconAnnotation(Modelica.SIunits.ThermodynamicTemperature)
{}

getComponents(Modelica.SIunits.ThermodynamicTemperature, useQuotes = true)
{}

getIconAnnotation(Modelica.SIunits.Temperature)
{}

getComponents(Modelica.SIunits.Temperature, useQuotes = true)
{}

getDiagramAnnotation(Modelica.SIunits.ThermodynamicTemperature)
{}

getDiagramAnnotation(Modelica.SIunits.Temperature)
{}

getInheritedClasses(Modelica.SIunits.HeatFlowRate)
{Real}

getIconAnnotation(Modelica.SIunits.HeatFlowRate)
{}

getComponents(Modelica.SIunits.HeatFlowRate, useQuotes = true)
{}

getDiagramAnnotation(Modelica.SIunits.HeatFlowRate)
{}

getDiagramAnnotation(Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {191, 0, 0}, {191, 0, 0}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-50, 50}, {50, -50}}, 0), Text(true, {0.0, 0.0}, 0, {191, 0, 0}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-120, 120}, {100, 60}}, "%name", 0, TextAlignment.Center)}}

getIconAnnotation(Modelica.Electrical.Analog.Basic.Resistor)
{-100.0,-100.0,100.0,100.0,true,0.1,2.0,2.0,{Rectangle(true, {0.0, 0.0}, 0, {0, 0, 255}, {255, 255, 255}, LinePattern.Solid, FillPattern.Solid, 0.25, BorderPattern.None, {{-70, 30}, {70, -30}}, 0), Line(true, {0.0, 0.0}, 0, {{-90, 0}, {-70, 0}}, {0, 0, 255}, LinePattern.Solid, 0.25, {Arrow.None, Arrow.None}, 3, Smooth.None), Line(true, {0.0, 0.0}, 0, {{70, 0}, {90, 0}}, {0, 0, 255}, LinePattern.Solid, 0.25, {Arrow.None, Arrow.None}, 3, Smooth.None), Text(true, {0.0, 0.0}, 0, {0, 0, 0}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-144, -40}, {142, -72}}, "R=%R", 0, TextAlignment.Center), Line(false, {0.0, 0.0}, 0, {{0, -100}, {0, -30}}, {127, 0, 0}, LinePattern.Dot, 0.25, {Arrow.None, Arrow.None}, 3, Smooth.None), Text(true, {0.0, 0.0}, 0, {0, 0, 255}, {0, 0, 0}, LinePattern.Solid, FillPattern.None, 0.25, {{-152, 87}, {148, 47}}, "%name", 0, TextAlignment.Center)}}

getComponents(Modelica.Electrical.Analog.Basic.Resistor, useQuotes = true)
{{"Modelica.SIunits.Resistance","R","Resistance at temperature T_ref", "public", "false", "false", "false", "false", "parameter", "none", "unspecified","{}"},{"Modelica.SIunits.Temperature","T_ref","Reference temperature", "public", "false", "false", "false", "false", "parameter", "none", "unspecified","{}"},{"Modelica.SIunits.LinearTemperatureCoefficient","alpha","Temperature coefficient of resistance (R_actual = R*(1 + alpha*(T_heatPort - T_ref))", "public", "false", "false", "false", "false", "parameter", "none", "unspecified","{}"},{"Modelica.SIunits.Resistance","R_actual","Actual resistance = R*(1 + alpha*(T_heatPort - T_ref))", "public", "false", "false", "false", "false", "unspecified", "none", "unspecified","{}"}}

getComponentAnnotations(Modelica.Electrical.Analog.Basic.Resistor)
{{},{},{},{}}

Add the following line to script,

Code:

setCommandLineOptions("--preOptModules+=unitChecking");

Adeel.

The type of exported FMU depends on what settings you have in Tools->Options->FMI.

Adeel.

It will not save all of the simulation settings. It will only save "StartTime, StopTime, Tolerance and Interval" because these are the only options supported by Modelica language through experiment annotation.

Adeel.

Feb-02-16 09:49:00
OMEdit multiply tree times graphic data (Diagram View) when changing code (Text view) and append...
Category: Developer

I tried it with "OpenModelica v1.9.4-dev-747-g47db7d2". Everything seems to work fine.

Adeel.

This problem is already solved. Try the latest nightly build https://build.openmodelica.org/omc/buil … ly-builds/

Adeel.

Oct-19-15 22:52:58
Is there an example of this function

No there is no example. Normally you choose "Tools->Import ngspice netlist" and select ngspice netlist file. This will automatically create a Modelica file where your ngspice netlist file is located. OMEdit automatically opens the created Modelica file.

Adeel.

Sep-21-15 20:07:33
Saving OMEdit models

You are getting the message that class is already loaded so you can't open/load it again.
If you want to load it then first Unload/Delete the class.

Btw, if you have created the model and is already opened then why you want to open it again?

Adeel.

Unfortunately, it is not possible via GUI interface.
You can add an enhancement ticket about it.

Adeel.

Jul-19-15 15:02:13
development OMEdit
Category: Developer

There is some information about classes in my Thesis http://liu.diva-portal.org/smash/record … swid=6339. However, some of the information might be obsolete.

Adeel.

The error means that there is something wrong with your FMU dll/so.
I can't tell more without a FMU.
You could enable debug logging of the FMU. You can do this when importing the FMU or by double clicking on the FMU object. When you double click the FMU object it will open the parameters window. In the parameters window switch to FMI tab and set the "logLevel" to 6 and "debugLogging" to true. Also change the simulation output to "Formatted Text" in Tools->Options->Simulation->Output. Simulate the model again and post the output.

Adeel.

This is currently not possible via OMEdit.
Use OMShell or command line script.

Adeel.

Jul-06-15 15:25:47
FMU Co-simulation : Inputs/Outputs of FMU Block

By latest version you mean what? I need to know the revision.
I would also like to see the generated code from the latest version.

Adeel.

Did you check "Generate input connector pins" & "Generate output connector pins" (they are checked by default) when importing the FMU? If your FMU has input/output and you checked to generate pins for them then you should be able to connect them.
Note that we don't fully support the FMI co-simulation.

Yes you can create icon for your newly create class. Read more about it here https://openmodelica.org/doc/OpenModeli … apes-icons

Jul-06-15 15:12:13
FMU Co-simulation : Inputs/Outputs of FMU Block

Which version of OpenModelica are you using?
The suggestion i proposed in (https://www.openmodelica.org/forum/defa … les#p4313) was implemented a long back.
I can see that your generated code is still old.

Adeel.

Jun-07-15 11:23:49
Help on OMEdit

OpenModelica users guide chapter 2. You can open the guide from the editor via menu Help->OpenModelica Users Guide.

Adeel.

Seems like you didn't noticed Simulation Setup->Output->File Name (Optional):.

Adeel.

May-03-15 00:34:51
Parametric plots having the same horizontal variable

Sorry my bad. I thought you asked how to do parametric plot in OMEdit.
What you want is not possible. You need a new plot parametric window.

Adeel.

May-02-15 22:37:12
Parametric plots having the same horizontal variable

Ofcourse you can. Switch to Plotting Perspective and in the toolbar click on "New Parametric Plot Window". See also section 2.6.1.2 of users guide.

Adeel.

Starting from r25689 it is now possible to call plot and see the plots inside OMEdit.

Adeel.

adrpo wrote:

2. OMEdit should support some sort of scripting for ploting so you can plot using OMC API.

We can do this the same way we do for OMNotebook. Set plot to silent via `setPlotSlilent(true)`, plot API then output data, read the output and plot inside OMEdit.
The problem is i need some parsing on OMCLogger to know what command user has sent.

OMEdit handles the simulation and result file a bit differently. If you want to use plot API you should use it like this,

Code:

plot(x, fileName="model_res.mat")

Note that it will launch OMPlot and will show the plot there instead of integrated OMEdit plotting.

Adeel.

Apr-02-15 14:35:40
Category: Developer

Add a ticket about it with test example so that I remember to fix it.

Adeel.

Apr-02-15 14:34:49
Examples in the VehicleInterface library are not working properly.

For the graphical problem you can follow this ticket https://trac.openmodelica.org/OpenModelica/ticket/3255
For the simulation errors contact the library developer.

Adeel.

Apr-02-15 11:46:53
Category: Developer

I will try to have the Save as feature available but as a workaround you can use the copy feature which is almost same.

Adeel.

Mar-31-15 17:03:48
Category: Developer
Mar-24-15 10:33:43
OMEdit crashes: When set record parameter in Function
Category: Developer

No. I said use slashes in the path not to escape quotes. Use this code below,

Code:

OMPython.execute('loadFile("C:/OpenModelica1.9.1/share/doc/omc/testmodels/BouncingBall.mo")') 

Adeel.

You can always call

Code:

OMPython.execute('getErrorString()')

to check the error message.

I think your problem is the back slashes in the path. Either use double back slash (\\) or use forward slash (/).

Adeel.

The message will show up in the simulation output window and not in Messages Browser.

Adeel.

Jan-26-15 12:37:57
OpenModelica interactive simulation example

You are using rather old OpenModelica. Interactive simulation has been removed now.

Download the latest version https://build.openmodelica.org/omc/buil … ly-builds/
OR
Download the old version perhaps 1.8.0 where interactive simulation was funtional.

Adeel.

Jan-16-15 12:37:23
AttributeError: 'module' object has not attribute 'run'

No. 64 bit is only available on Linux. Windows versions only support 32 bit.

Adeel.

Jan-14-15 13:13:48
Category: Programming

Yes it is the wrong MSL code. Notice the width. The width for RealInpout text is 0.
Note that the text size is calculated based on the width and height. If the font size attribute of text annotation is present then that fixed font size is used.

Adeel.

Jan-05-15 19:00:43
discharge current

You can download the latest nightly build from here (recommended) https://build.openmodelica.org/omc/buil … ly-builds/
OR
Download the older nightly builds from https://build.openmodelica.org/omc/buil … lds/older/

Adeel.

Jan-05-15 15:21:59
Cannot instantiate model from SystemDynamics Library

Because you are trying to simulate a PACKAGE not a MODEL.
To simulate a model simply right click your model in the Libraries Browser and select Simulate.

Adeel.

Jan-05-15 15:20:06
discharge current

You need r23234.

Adeel.

Jan-04-15 20:06:36
Current status of OpenModelica Interactive Simulation?

Why are you using something from January 2012 when we are in January 2015? Alot of things have changed since then. Uninstall 1.8.1 and install new nightly build https://build.openmodelica.org/omc/buil … y-builds/.
Note that interactive simulation is no longer supported.

Adeel.

Jan-04-15 20:03:21
the OME edit do not enable me a copy of Library Window component
Jan-04-15 20:02:22
discharge current

Depends on your version of OMEdit. The new version from nightly builds have the copy command but I strongly recommend to not use it for nested classes unless this ticket is fixed https://trac.openmodelica.org/OpenModelica/ticket/2190

Adeel.

Dec-20-14 23:00:18
Resimulation and number of intervals using OMEdit

There is a ticket related to it https://trac.openmodelica.org/OpenModelica/ticket/3043

Adeel.

Again the error message says it all,

"Only single nonstructured entity is allowed to be stored in the file. The file /home/joaquim/estagio_oe/ESTAGIO_OE_1.mo contains following classes teste,Buildings,ModelicaServices,Modelica,teste_total."

Your file ESTAGIO_OE_1.mo contains 5 top-level classes i.e teste,Buildings,ModelicaServices,Modelica,teste_total. According to the specification you are only allowed to have one top-level class.

Adeel.

As I said in my previous post "Open your package.order file and remove Test_Cell1D_2 since it is not defined in the package. "
Did you remove Test_Cell1D_2 from C:/OpenModelica1.9.1/lib/omlibrary/ThermoCycle/Examples/TestComponents/package.order?

Btw I noticed that this bug is only present in ThermoCycle Library v1.0. Why don't you use ThermoCycle Library v2.0? OR more better use the version from github (https://github.com/thermocycle/Thermocycle-library)

Adeel.

No. It should work in any order. It is a bug (https://trac.openmodelica.org/OpenModelica/ticket/2393) which I have to fix current/smile.

Adeel.

Are the error messages not useful?

> [C:/OpenModelica1.9.1/lib/omlibrary/ThermoCycle/Examples/TestComponent
> s/package.mo:2:1-18:19]
> Error: Test_Cell1D_2 was referenced in the package.order file, but was
> not found in package.mo, Test_Cell1D_2/package.mo or Test_Cell1D_2.mo.

Open your package.order file and remove Test_Cell1D_2 since it is not defined in the package.

> [C:/OpenModelica1.9.1/lib/omlibrary/ThermoCycle/Examples/TestComponent
> s/package.mo:6:32-6:104]
> Warning: The file was not encoded in UTF-8:
>
>    "<HTML> <p><big><dl><dt><b>Main Authors:</b> <br/></dt> <dd>Sylvain
> Quoil...".
>
>    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.

Create a file package.encoding and write your library encoding format in it and put the file at top-level where your package.mo is located.

If you don't know your library encoding format then,
- Use OMEdit menu File->Open/Convert Modelica File(s) With Encoding.
- Select the root package.mo file.
- Check Convert all files within the selected directory and sub-directories.
- Click Open and convert to UTF-8.
This is will convert your whole library to UTF-8 encoding.

Adeel.

When you reopen then you should first load the dependent models and then open the diagram view.
Its a known bug in OMEdit that it fails to update the component if dependent models are loaded later on.

Adeel.

Have you noticed the Welcome, Modeling & Plotting buttons on the right bottom?

Adeel.

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