OpenModelica


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » adeas
  • » Profile

Posts

Posts

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.

Dec-14-14 03:56:36
error when linking objects

Hi, I think r23774 (https://trac.openmodelica.org/OpenModel … et/23774/) should fix everything. Note that now the connection will start through click and drag.

Adeel.

Dec-12-14 23:23:59
error when linking objects

Wait a second. There is something wrong. I need to test whats going on. There is something wrong with events.
When you double click you should get the error "You cannot connect a component to itself" because a single click will start making the connection.

Adeel.

Dec-12-14 22:50:17
error when linking objects

I can't even reproduce it on my virtual box Linux (ubtunu 12.04).

Are you clicking twice to start the connection?

Adeel.

Dec-12-14 22:17:32
error when linking objects

I can't reproduce it on my Windows machine.

Adeel.

Dec-12-14 21:55:10
error when linking objects

I don't understand your problem.
Is your question "You cannot connect a component to itself" if yes then it is not allowed.
Or your question is "You cannot connect two objects" if yes then post a use case to reproduce the issue.

Adeel.

Dec-04-14 14:10:22
Problem loading modelica file
Category: Developer

Call omc.getErrorString() when result is false so that compiler can giev you error that occurred while loading the file.

Code:

boolean result = omc.loadFile(file.getPath());   //loadFile returns zero for second file 

   if(result) {
      String[] packages = omc.getPackages();
   }  else {
      print(omc.getErrorString());
   }

Adeel.

This is working fine with r23646.

For example try this script

Adeel.

Nov-25-14 11:03:57
Difficulties in managing arrayd of components in OMEDIT

This should be trac ticket instead of forum post.

Adeel.

Set the flag -noEquidistantTimeGrid to use dassl in a single step mode.

If you are using a simulate command then you need to set this in simflags argument https://build.openmodelica.org/Document … ulate.html
If you are using OMEdit then in the Simulation Setup->Output uncheck Equidistant Time Grid.

Adeel.

Nov-05-14 00:20:58
Creating a Modelica distributable and Window's dll's

Because OMC automatically sets the environment i.e provides the required dlls in PATH.
If you want to provide your Model.exe to some other users you should provide the required dlls alongwith.

Adeel.

Nov-04-14 01:13:14
Errors while creating models in OMEdit - Variables/Components not defined?

That's the right way to check the revision. So you are in revision 23121 and the bug was fixed in revision 23123.
Time to update again.

Adeel.

Nov-04-14 01:05:08
Errors while creating models in OMEdit - Variables/Components not defined?

Seems related to this bug https://trac.openmodelica.org/OpenModelica/ticket/2943.
Which revision are you using?

Adeel.

Ah you are talking about co-simulation FMU. We don't support import of co-simulation FMU even the users guide mention this "The support for FMI Co-Simulation 1.0 tool coupling is still under development."

Adeel.

Send me the FMU and I will see what is wrong. The bouncingBall FMU from FMU SDK should work. It is very simple example.

Adeel.

There is a bug saving protected classes. In your code find text "package fmi1Functions" and above this line add "public" keyword then try to save the file.
I will try to fix the bug.

You should not change the generated FMU code. When you are creating the FMU at that time specify the I/Os. If your FMU has the I/Os then the generated code will automatically have the I/Os. Even if you manage to put I/O manually in the FMU block still maybe your model will not work correctly.

Adeel.

Oct-18-14 17:55:19
unable to download the user's guide

Its not UserGuide its UsersGuide,

https://openmodelica.org/svn/OpenModeli … sGuide.pdf

Adeel.

The users guide is showing the old picture. I will update the users guide with the new picture.

You insert inputs/outputs to FMU block before adding it to new model. Normally you don't need to create inputs/outputs by hand, they will be generated automatically based on the inputs/outputs of your FMU.

Adeel.

Oct-12-14 18:02:22
Please suggest proper method of building from SVN version.
Category: Developer

Code:

make -j4 > out.log 2>&1

Adeel.

Yes, it should work.
If you are just specifying the fileName then remember that compiler will try to look for the file in its working directory which is normally at %TEMP%/OpenModelica/OMEdit. A more better approach is to use modelica:// uri format.

Adeel.

Sep-12-14 13:04:01
When I create an FMU StopTime is different from the original
Category: Developer

Can you create a trac ticket about it?

Adeel.

By interactive I mean when you select true for "tableOnFile" the fields "tableName" and "fileName" should become active. Similarly when you select false they should become inactive. This is not supported yet.

Of course you will see your changes done in text view but again as I should you can't make fields active/inactive.

Adeel.

You can't do this. The interactive data manipulation is not possible in OMEdit's parameters window yet. You have to set these values in the code manually. Hopefully we will have this feature soon.

Adeel.

Sep-03-14 19:52:45
AttributeError: 'module' object has not attribute 'run'

I suggest you should install the latest nightly build https://build.openmodelica.org/omc/buil … y-builds/.
Then try to run this on your python console,

Code:

from OMPython import OMCSession

omc = OMCSession()
omc.execute('getVersion()')

Note that OMPython.run() is removed from the new version. I will update the users guide soon.

Adeel.

Sep-03-14 14:50:19
AttributeError: 'module' object has not attribute 'run'

Which version of OpenModelica are you using? The same as of the user manual? I your OpenModelica is 1.9.0 Beta3 then it should work.

Adeel.

Yes this is a known problem but I don't know when I get time to fix this. Right now there are more things in priority. I will try my best to fix this ASAP.

Adeel.

I think you need to compile OMPython before installing it.

Code:

make -f 'Makefile.unix' install-python

Normally we do this when we install OpenModelica from source.
I don't know how you can achieve the same using apt-get install. Martin knows how the linux stuff works but he is on vacations right now.

Adeel.

When you say you have installed the latest build does it mean you have installed the latest nightly build from here https://build.openmodelica.org/omc/buil … y-builds/?

Adeel.

omc.exe +help

Adeel.

Jul-07-14 17:20:14
Category: Developer

Send an email to Adrian.pop at liu.se. He will create an account for you.

Adeel.

You must save the class so that you can uncheck "Store image in model". Otherwise when you uncheck a dialog box appear which tells you to save the class. I believe in your case the dialog box is not appearing because you might have unchecked "Show save model for bitmap insertion message" in Options->Notifications.

Adeel.

Jul-02-14 15:43:30
Compilation error due a dot
Category: Programming

Here is the actual error,

Code:

assert        | debug     | division by zero at time 0, (a=0) / (b=0), where divisor b expression is: heatPump_ConstantCOPheat1.W Debug more

Clicking on Debug more should take you to the equation causing the error. Fix division by zero error in your model.

Adeel.

I really have no idea whats wrong here.
Have you tried running with administrator access? Becasue it seems like it was not able to find Modelica.Electrical.Machines.Examples.AsynchronousInductionMa
chines.AIMC_DOL_functions.o. However, the command should create this file.
Remove all *.o files and try the makefile again.
Is this a valid path in your system C:/OpenModelica1.9.1Nightly//include/omc/c?

Adeel.

Eeeeehhh. Thats weird. I really  don't know why make is failing here.
Are there any *.o files generated in C:\Users\esser\AppData\Local\Temp\OpenModelica\OMEdit?
Do you have write access to C:\Users\esser\AppData\Local\Temp\OpenModelica\OMEdit?
Is this happening for all modelica models?


  1. Run the cmd.exe with administrator (right click cmd.exe and click on "Run as administrator")

  2. Execute the same commands I mentioned above.


    • set the path

    • Run "echo %PATH%"

    • switch to the working directory

    • run the makefile




Post the output of all four commands.

Adeel.

This is wrong. Why are you running it from C:\OpenModelica1.9.1Nightly\bin?
You should run it from OMEdit/OMC working directory which should be %TEMP% if you have not changed it.
Now the error says makefile is not found which is true because you are in a wrong directory.

From the commands I have posted above you forgot to execute,

Code:

cd C:\Users\<user_name>\AppData\Local\Temp\OpenModelica\OMEdit

replace <user_name> with your windows username.

Adeel.

Can you run the following commands from cmd.exe?

Code:

set PATH=C:\OpenModelica1.9.1Nightly\MinGW\bin;C:\OpenModelica1.9.1Nightly\MinGW\libexec\gcc\mingw32\4.4.0

Change the location according to your setup in the following command,

Code:

cd Users\adeas31\AppData\Local\Temp\OpenModelica\OMEdit

Code:

"C:\OpenModelica1.9.1Nightly\\MinGW\bin\mingw32-make.exe" -f Modelica.Electrical.Machines.Examples.AsynchronousInductionMachines.AIMC_DOL.makefile

Adeel.

It seems like it is still a parallel make. Can you run it from OMEdit by setting "Number of Processes" to 1 in simulation setup and post the output generated in compilation tab.

Martin - OMEdit compiles the stuff with a clean PATH.

Adeel.

I don't think that its a problem with gcc not found. Because I can see successful compilation of AIMC_DOL.c, AIMC_DOL_functions.c & AIMC_DOL_records.c.
Its a problem with the parallel make since the error is "Waiting for unfinished jobs". Running it with -j1 might solve the problem and OMEdit does have that option available in Simulation setup.

Adeel.

Have you tried with  Number of Processors = 1?

Adeel.

Do you have some other MinGW installation in your PATH?
Before simulating set the "Number of Processors" to 1 in the Simulation setup.

Adeel.

I have already fixed this error a while ago.
Download & install a new nightly build https://build.openmodelica.org/omc/buil … ly-builds/

Adeel.

Have you noticed,

Code:

extent=[-10, -34; 10, -14]

in the RL model?

This is old Modelica syntax. OMEdit only supports 3.x annotation syntax.
Btw, Dymola does show the model fine but you can't really use it e.g try moving the inductor component.

Adeel.

1) Yes, as long as your models are standard Modelica code.
2) Update the version and post some use case. I can't say what is wrong. Note that its a variable filter. No-where does it say it filters parameters current/wink

Adeel.

2) Download and try the latest nightly build. https://build.openmodelica.org/omc/buil … ly-builds/
3) Variable Filter is a regular expression. There are several discussions about it on the forum e.g https://www.openmodelica.org/index.php/ … ic?id=1227

Adeel.

  1. The CSV results file is generated in %TEMP%/OpenModelica/OMEdit/model_name_res.csv

  2. This could be a bug in csv writer/reader. Which version of OpenModelica are you using? Can you share a sample model?

  3. OMEdit->Simulation Setup->Output->Variable Filter, specify which variables you want to output to the result file. By default all variables are written to the file. AFAIK parameters are only available in mat result file.


Adeel.

Jun-16-14 03:05:23
Category: Developer

I think its not. Our build servers are showing the compilation is fine https://test.openmodelica.org/hudson/. Try

Code:

make -f Makefile.omdev.mingw clean-qtclients

and then,

Code:

make -f Makefile.omdev.mingw qtclients

Adeel.

Jun-14-14 22:04:53
multi-file model library using within keyword not working with OMEdit

There are already tickets about it,
https://trac.openmodelica.org/OpenModelica/ticket/2677
https://trac.openmodelica.org/OpenModelica/ticket/2676

You can add you use case there.

Adeel.

May-28-14 17:29:49
OpenModelica error using Ignite

Martin means that you need to add getErrorString(); in your .mos file.
Just insert getErrorString(); before the simulate command.

Adeel.

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