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

Mar-06-12 17:20:48
Syntax error in HelloWorld class

Hi Lorenzo,

If you want to use the commands then use OMShell. In OMShell first type in your model or load a model file,

Code:

class HelloWorld

   Real x(start=1);
parameter Real a = 1;
equation
   der(x)=-a*x;
end HelloWorld;

Then send the simulate command,

Code:

simulate(HelloWorld)

and then plot,

Code:

plot(x)

OMEdit allows users to use the GUI to performs these commands. You can create you model and then you can click on simulate button to simulate the model rather than typing the simulate command.

Adeel.

Mar-01-12 16:51:54
Couldn't find an option to change the size of the white page

Hi,

Its not possible to increase or decrease the size of the canvas. Modelica does support it using the coordinate annotation,

Code:

annotation (Diagram(coordinateSystem(extent={{-100,-100}, {100,100}}));

but currently this is not implemented in OMEdit.

However, you can zoom-out a bit to get more space (but thats ofcourse not a very good solution).

Adeel.

Feb-15-12 15:47:07
Category: Developer

Hi,

We use mingw for compilation. If you want to use visual studio 2010 you should compile everything from scratch which i suppose you are doing. You must build OMPlot.lib before building OMEdit and link it with OMEdit.

You can also try to remove the --enable-auto-import flag. I guess its just a gcc flag.

Adeel.

Feb-15-12 06:18:12
Regarding adding Thermopower library

Hi,

No Its not needed. Just put your library in some appropriate path as mentioned by Martin. For example, if you put your library in,

Code:

/opt/local/lib/omlibrary/ThermoPower/package.mo

then in OMEdit you add a new library in libraries list under Tools->options with name ThermoPower and value default.

Adeel.

Feb-14-12 22:52:59
Regarding adding Thermopower library

Hi,

Add your library to the libraries list of OMEdit. Tools->Options->libraries. Restart OMEdit. Now OMEdit always load your library automatically.

Adeel.

Feb-01-12 17:35:23
bug,OMEdit, properties window,missing scrollbar
Category: Developer

Hi lepokorp,

I have now fixed it in r(10996). Scrollbars are added.

Adeel.

Jan-23-12 17:58:22
Category: Developer

This is now fixed in r10942.

Jan-22-12 14:51:05
Category: Developer

Hi Lewis,

Is this happening with all the models? I have recently changed few things about OMEdit simulation functionality which seems to work fine on my windows machine perhaps that functionality is not working on Linux.

Can you share your model?

Adeel.

Jan-10-12 14:26:09
Is it possible to use Modelica.Mechanics.MultiBody in OMNotebook?

Removing the last semicolon will print the output for sure but there are some more problems with your script. Like,

- You should add loadModel(Modelica) as the first command in your script file. Since you are using Modelica Standard Library models.
- Change loadModel(pendulum.mo) to loadFile("pendulum.mo").

Adeel.

Jan-09-12 13:35:10
Advanced Dymola user, first steps with OpenModelica

The simulation of Modelica.Electrical.Analog.Examples.Rectifier is crashing and OMEdit doesn't check whether the executable was crashed or not. I have now fixed it in OMEdit so that it will show the error message if the simulation executable fails. You have to wait for the new nightly build now.

Adeel.

Jan-06-12 16:53:58
Advanced Dymola user, first steps with OpenModelica

OK. Then i will also need the log file. Please attach your omeditcommands.log file. You can find it in <your_temp_dir/OpenModelica/OMEdit>

Adeel.

Jan-06-12 16:28:58
Advanced Dymola user, first steps with OpenModelica

Hi,

It seems like you are using OMEdit. Can you check the messages window at the bottom and see if any error recorded there?
You can send an email with attachment to openmodelicadevelopers@ida.liu.se

Adeel.

Dec-15-11 04:59:51
Storing custom annotations on Components
Category: Developer

What kind of modifications do you have in your custom annotations?

For non flattened annotations you can use,

-    getAnnotationCount(M1)                             // returns the annotation count e.g 2
-    getNthAnnotationString(M1, 1)                  // returns the Nth annotation as a string.

But it only works for classes, it doesn't give you components annotations.

Adeel.

Dec-05-11 20:42:22
does not converge

Ok. I have found the bug. I will try to fix it ASAP.

Adeel.

Dec-05-11 19:39:01
does not converge

I have tried to create your model again in OMEdit from scratch and everything works fine for me. I am also using Windows 7 with OpenModelica 1.8.0 (r10637).

I don't get any wrong indexing. I suppose it is a bug but i am unable to created it on my end.
Deleting a component deletes all the connections associated with it. But if your connection is wrong like the one with wrong indexing that will not be deleted.

I unable to simualte your model it throws compilation errors.

here is the code that is generated using OMEdit,

model ipfc
  Modelica.Electrical.Analog.Sources.SineVoltage Source(V = 230, freqHz = 50) annotation(Placement(visible = true, transformation(origin = {-84.8263,-2.55944}, extent = {{-12,12},{12,-12}}, rotation = -90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D2(Ron = 0.001, Goff = 0.001, Vknee = 2) annotation(Placement(visible = true, transformation(origin = {-36.1975,-56.3071}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D1(Ron = 0.001, Goff = 0.001, Vknee = 2) annotation(Placement(visible = true, transformation(origin = {-39.4882,20.8409}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D4(Ron = 0.001, Goff = 0.001, Vknee = 2) annotation(Placement(visible = true, transformation(origin = {6.58132,-55.5759}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Electrical.Analog.Basic.Capacitor Cbus(C = 0.01) annotation(Placement(visible = true, transformation(origin = {36.5631,-13.894}, extent = {{-12,12},{12,-12}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor Rload(R = 5) annotation(Placement(visible = true, transformation(origin = {81.17,-13.1627}, extent = {{-12,12},{12,-12}}, rotation = -90)));
  Modelica.Electrical.Analog.Ideal.IdealDiode D3(Ron = 0.001, Goff = 0.001, Vknee = 2) annotation(Placement(visible = true, transformation(origin = {3.65631,21.2066}, extent = {{12,-12},{-12,12}}, rotation = -270)));
  Modelica.Electrical.Analog.Basic.Inductor inductor1 annotation(Placement(visible = true, transformation(origin = {-71.298,58.5009}, extent = {{-12,-12},{12,12}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground2 annotation(Placement(visible = true, transformation(origin = {-81.9013,-62.1572}, extent = {{-12,-12},{12,12}}, rotation = 0)));
equation
  connect(Source.n,ground2.p) annotation(Line(points = {{-84.8263,-14.5594},{-81.9013,-14.5594},{-81.9013,-50.1572},{-81.9013,-50.1572}}));
  connect(D3.n,Cbus.p) annotation(Line(points = {{3.65631,33.2066},{36.5631,33.2066},{36.5631,-1.894},{36.5631,-1.894}}));
  connect(Cbus.p,Rload.p) annotation(Line(points = {{36.5631,-1.894},{81.17,-1.894},{81.17,-1.16273},{81.17,-1.16273}}));
  connect(Cbus.n,Rload.n) annotation(Line(points = {{36.5631,-25.894},{81.5356,-25.894},{81.5356,-25.1627},{81.17,-25.1627}}));
  connect(Source.n,D4.n) annotation(Line(points = {{-84.8263,-14.5594},{-12.0658,-14.5594},{-12.0658,-43.5101},{6.58132,-43.5101},{6.58132,-43.5759}}));
  connect(D2.p,D4.p) annotation(Line(points = {{-36.1975,-68.3071},{6.58135,-68.3071},{6.58135,-67.5759},{6.58132,-67.5759}}));
  connect(D4.p,Cbus.n) annotation(Line(points = {{6.58132,-67.5759},{36.1974,-67.5759},{36.1974,-25.894},{36.5631,-25.894}}));
  connect(Source.p,D1.p) annotation(Line(points = {{-84.8263,9.44056},{-39.1225,9.44056},{-39.1225,8.84094},{-39.4882,8.84094}}));
  connect(D3.p,D4.n) annotation(Line(points = {{3.65631,9.20663},{6.94698,9.20663},{6.94698,-43.5759},{6.58132,-43.5759}}));
  connect(D1.n,D3.n) annotation(Line(points = {{-39.4882,32.8409},{4.02194,32.8409},{4.02194,33.2066},{3.65631,33.2066}}));
  connect(D1.p,D2.n) annotation(Line(points = {{-39.4882,8.84094},{-36.1974,8.84094},{-36.1974,-44.3071},{-36.1975,-44.3071}}));
end ipfc;

Adeel.

Dec-05-11 17:18:14
does not converge

Hi Peter,

Your model is pretty strange because if you have created it in OMEdit why it is missing all the annotations that are heart of OMEdit. Also your connection equation shows wrong indexing as well e.g connect(D3.n[-1],Cbus.p[-1]) , since D3.n is not an array Cbus.p is also not an array so it should be connect(D3.n,Cbus.p).

Can you explain how you build your model? Which platform you are using. Wrong indexing problem is known bug on linux.

Adeel.

Dec-01-11 00:53:17
Compare these two programs

Hi,

The file is created in the working folder of OMC. The easiest way to find out that folder is,

Go to Tools->OMC Logger and then send command cd(). It will print the current working directory.

Adeel.

Nov-23-11 19:24:05
Libraries FLUID and FLUIDDISSIPATION does not work in OpenModelica

OK then OMEdit will always delete it because it is defined as Modelica.Fluid.............
open the package.mo file and remove the first line that says

within Modelica;

but this change makes this library almost unusable beacuse everything is linked from  Modelica pacakge.

Adeel.

Nov-23-11 19:00:57
Libraries FLUID and FLUIDDISSIPATION does not work in OpenModelica

Hi,

Your Fluid folder should contain a file package.mo that defines your library structure. Otherwise OMC can't read it. And makesure you restart OMEdit after adding the library in options page.

Adeel.

Hi,

Not sure what is causing the segmentation fault. I will look into this problem soon. Also it looks like you are using interactive simulation. Try to use static simulation.

Adeel.

Hi,

Can you explain more about the problem? Does the simulation fails? Or you are not able to plot variables? Or you get an empty Plot window? We need more information.

Adeel.

Nov-14-11 18:22:33
Problems with building OMEdit pro under the windows
Category: Developer

Compile OMPlot. OMPlot is located at /OpenModelica/OMPlot/OMPlotGUI. You need to compile a lib so use the OMPlotLib.pro. Put the generated libOMPlot in the bin directory of OMPlot.

Adeel.

Nov-14-11 12:41:06
Problems with building OMEdit pro under the windows
Category: Developer

You need Mingw based Qt since the OmniORB you find out in OMDEV is build using Mingw.
OR
Build your own OmniORB using MSVC (if you really want to use it).

Adeel.

Nov-14-11 12:20:45
Problems with building OMEdit pro under the windows
Category: Developer

Hi,

Can you make sure your OMDEV environment variable is set up properly? Also i would like to know how you are compiling the project. Mingw is provided by QT so you should not get error for any Mingw header files.

Adeel.

Nov-13-11 06:18:44
Problems with building OMEdit pro under the windows
Category: Developer

Your generated file omc_communication.h line 6 should be,

#include <omniORB4/CORBA.h>

your error indicates that it is,

#include <CORBA.h>

Try this command it will create correct files with appropriate extensions,

omniidl.exe -bcxx -Wbh=.h -Wbs=.cc omc_communication.idl

Adeel.

Nov-12-11 04:48:28
Problems with building OMEdit pro under the windows
Category: Developer

Hi,

You need to built omc_communication.cc again using the omniidl.exe. I guess the one located in /OpenModelica/Compiler/runtime is build using mico. The omniidl.exe is located at '\OMDev\lib\omniORB-4.1.4-mingw\bin\x86_win32\omniidl.exe'. You need to give idl file to omniidl.exe and the idl file is located here, '\OpenModelica\Compiler\runtime\omc_communication.idl'

Adeel.

Nov-08-11 23:28:02
Proposal to add simulation time displaduring the simulation in OmEdit.

The type "transalation" was already fixed current/smile

Adeel.

Oct-27-11 17:03:38
Problem using the OMOptim application

Hi,

"MyModel.exe -f MyModel_init.txt" is wrong. AFAIK this file not generated any more, instead an xml file is generated but with the same name. Create a bug report for it.
Using WaitFor() is not recommended because it normally hangs the interface (but thats just an implementation issue).

Adeel.

Oct-14-11 18:19:19
Bug related to spring damper components?

Its fixed in r10125.

Adeel.

Oct-14-11 12:41:52
I want to redeclare and extend a replaceable partial function.

Fritz,

I guess you are Windows user. That problem was fixed but you have to wait for the new release/nightly build.

Adeel.

Oct-02-11 23:16:14
Provide a tree view of the components in a model
Category: Developer

This feature is available in both MDT and OMEdit, in MDT its called component browser and in OMEdit its called Model Browser.

Adeel.

Sep-23-11 02:25:17
Running OMedit on multiuser linux machine, single folder for temporary
Category: Developer

Hi

This is fixed in revision 9896. Update your OMEdit.

If you still get the same problem then try to change the tmp path. Go to Tools->OMCLogger and then send this command,

cd("your_temp_path")

Adeel.

Sep-04-11 13:21:24
The text of components is only shown, if they are rotated.
Category: Developer

Yes, do it please.

Adeel.

Sep-03-11 16:05:07
The text of components is only shown, if they are rotated.
Category: Developer

This bug was already reported but i haven't get time to fix it.

You can look into the TextAnnotation.cpp file which is responsible for drawing the text.

Adeel.

Aug-09-11 12:20:33
backslashes before and after variable comments

Check revision 9619.

Aug-09-11 11:25:41
backslashes before and after variable comments

Fixed in revision 9616.

Adeel.

Jul-19-11 16:25:23
Category: Developer

Fixed in Revision 9507.

Adeel.

Jul-06-11 13:14:15
Category: Developer

Can you post some more details? Which platform you are using and how you are trying to build from sources?

Adeel.

Hi,

The Motorcycle dynamic library is built using Modelica annotations 2.2.1 and OMEdit supports Modelica annotations 3.x. You can add the library and its components but you can't see them graphically.

Adeel.

May-29-11 13:27:52
runge-kutta method not available because of typo?

The solver name is changed from runge-kutta to rungekutta but its not updated in OMEdit. This will be fixed in next nightly build.

Adeel.

May-17-11 16:36:17
No display or connection to RealInput, PositivePin, Flange_a etc.
Category: Developer

Hi james,

I tried it and it looks like its not possible to start or end the connection on connector type components. I will try to fix it ASAP. Can you report this bug in the bug tracker?

Adeel.

May-07-11 16:33:49
Communication with OMEdt server lost

Hi,

It looks like your model crashes the omc. Can you send your model?

Adeel.

Hi Alex,

OpenModelica does not support code indentation and comments structuring.
But this feature will be available soon. So that you can preserve your comments.

Adeel.

Mar-25-11 13:22:11
When using Initialize- Button -> error in setfilter - command
Category: Developer

Hi Lisa,

There are some problems with OMI in OMEdit. We are working on them to fix it.
OMEdit does not send parameters change to OMI which is a bug. It will be soon fixed.

Adeel.

Mar-17-11 21:28:04
Error when starting OMNotebook

But try running directly OMNotebook.exe instead of opening some file with it.

Adeel.

Mar-17-11 21:26:49
Error when starting OMNotebook

This error is fixed. Hopefully a new release of OpenModelica is available tomorrow.

Adeel.

Mar-17-11 01:13:11
OMEdit: Missing menu entries on right click

Hi Christian,

The missing menu entries are enabled back. Try the new revision 8259.

Regards,
Adeel.

Mar-16-11 14:05:09
OMEdit: Missing menu entries on right click

Hi Christian,

That is my mistake. I have disabled that feature by mistake.

I will let you know once its enabled again.

Adeel.

Mar-02-11 12:09:52
Save function does still not work

Try the new nighly build http://build.openmodelica.org/omc/build … y-builds/. This problem is solved now,

I tried your code and it works fine,
- Run OMEdit create a package Package0
- Then go to Modelica Text view select All and replace it with your text.
- Save the package.
- Clode OMEdit.
- Start OMEdit again.
- Open your package.

These are the steps i followed.

Regards,
Adeel.

Feb-27-11 19:27:27
World3 Model in OM and first steps

Hi,

You can load your model in OMEdit and plot some graphs.

- Start OMEdit.
- Open the SystemDynamics.mo file from OMEdit
- Go to SImulation->Simulate and then simulate your model.
- You will get the plot variables list on the RHS after the simulation is finished.
- Select/check the variable that you want to plot.

Adeel.

It won't be too hard to implement it. Hopefully i will implement this stuff ASAP. But for now adding the library to Modelica is the only solution.

Adeel.

You can create your own blocks. But in order to use them in the rest of the system. Right now OMEdit doesn't have the interface to include customs models/blocks to the system. So you need to include them through the code by your own.

Adeel.

Feb-09-11 01:39:35
encountered with multibody model

Can you post your model? It seems as your model crashes the OMC which in turn forces OMEdit to close. That is why you get the message that the connection to the server is lost.

Adeel.

Feb-09-11 01:36:22
Save function does still not work

I will check this thing real quick and try to respond to you before this weekend.

Adeel.

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