OpenModelica


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

Posts

Posts

When you drag & drop the Ground model into DCMotor it should become,

Code:

inner Ground ground;

The top model Adrian is referring to is DCMotor.

Adeel.

May-02-14 14:26:57
Cannot simulate FMU as the integer parameter contains a /*ENUM:StateS

This error was not really fixed in revision https://trac.openmodelica.org/OpenModel … eset/17882 there was one more location where it should be fixed and i did that in revision https://trac.openmodelica.org/OpenModel … set/19911. If your revision is higher than 19911 then I might need to look into it again.

Adeel.

Apr-11-14 14:57:34
Trying to simulate a discrete controller FMU in openmodelica

Note that fmi_input_* are just dummy variables to make the modelica models valid. They are not supposed to follow the actual input values. You must see the values of cmd & windowState and make sure they are set properly.

Apr-11-14 12:18:58
Trying to simulate a discrete controller FMU in openmodelica

Can you send me your actual modelica model? adeel.asghar at liu.se

Adeel.

Apr-03-14 22:23:28
Using OMEdit or other

Use Modelica3D. There is a chapter about it in OpenModelica Users Guide.
OMEdit doesn't support animations.

Adeel.

Just call plot with variable names,

Code:

plot({x,y,z})

If you want to plot variables in new window then,

Code:

plot(x, externalWindow=true)

Adeel.

Mar-25-14 16:52:00
Help for beginners in command usage

Because you haven't simulated the model long enough. Its,

Code:

simulate (VanderPol, stopTime=25)

not

Code:

simulate (VanderPol, stoptime=25)

Notice the capital T in stopTime.
After simulate command send plotParametric,

Code:

plotParametric(x,y)

Adeel.

Mar-25-14 16:29:07
Help for beginners in command usage

plotParametric doesn't have any stoptime argument. This should work,

Code:

plotParametric(x,y);

Adeel.

Mar-24-14 17:20:35
Category: Developer

As a work around don't use the swedish locale for now.
Add a bug report about this issue here https://trac.openmodelica.org/OpenModelica/newticket

Adeel.

No the GUI feature is not available yet.

Adeel.

Mar-24-14 00:34:10
Category: Developer

Can you provide a sample model or the csv file?

Adeel.

Mar-18-14 19:03:53
Unable to set the input parameters of my FMU

Ahh you are trying to import a co-simulation FMU. This is not fully done yet.
Try adding the following line,

Code:

{theInput} = fmi1Functions.fmi1SetReal(fmi1cs, {0.0}, {theInput});

before doStep. Add a trac ticket about it. We don't fully support co-simulation import.

Adeel.

Mar-18-14 18:34:44
Unable to set the input parameters of my FMU

There should be a call to

Code:

fmi1Functions.fmi1Set*

in the equation section for your input variables right after

Code:

flowTime = fmi1Functions.fmi1SetTime(fmi1me, time);

I can't tell more without seeing the code.

Adeel.

Mar-13-14 14:56:53
Category: Programming

You can send it to my email address.
adeel.asghar [at] liu.se

Adeel.

Go to Tools->Options->Simulation->OMC Flags and type +d=initialization and then press OK.

You can specify the initial conditions like this

Code:

(start = 0, fixed = true)

Adeel.

Mar-12-14 19:39:54
Category: Programming

Yes bitmap is not supported to be displayed on Libraries Browser. https://trac.openmodelica.org/OpenModel … t.cpp#L330
I don't know why I had done that. Might be there were issues displaying it or might be it was not allowed according to Modelica specifications.
Can you send me your model? I will try it and then enable this feature.

For documentation just look at any of the MSL example.

Adeel.

Mar-12-14 16:11:36
Category: Programming

There is no another way to add icons. Everything you draw on icon layer is used as icon for the model in Libraries Browser and component instance.
You need to write the documentation inside the model code. There is currently no way to write the documentation via GUI.

Adeel.

1. answer:
Simulate & buildModel are same except that buildModel only compiles the model and generates the simulation executable whereas simulate compiles the model, generates the simulation executable and runs it.

2. answer:
You should use buildModel but note that buildModel doesn't set the default result filename for the environment so you need to specify a resutl filename to plot. Use the following code,

Code:

loadFile("reaction2.mo");

buildModel(reaction2);
system("reaction2.exe -f reaction2_init.xml -overrideFile=reaction2_param.txt");
plot({xA,xB}, fileName="reaction2_res.mat");

Adeel.

Are you referring to World3 included in SystemDynamics library? If yes then,
Yes all the system libraries are read-only.

You should load it as normal modelica file if you want to update it not from system libraries sub-menu.
OR
You can create a new model extend it from World3 and play with some of its parameters.

Adeel.

Mar-09-14 14:10:14
Enter a brief description of your topic

You mean it works in OM and not in FMU SDK?

Adeel.

Saving the code with errors is not allowed.
Check your options and see if you have auto save setting enabled. Try disabling it or set a bug interval. It will give you time to write the code.

We are currently working on the debugger. It will be available soon.

Adeel.

Interactive simulation is currently not available. It will be available in future but i can't say when.

Adeel.

From OMEdit simply drag & drop the components into your model.
Read OpenModelicaUsersGuide.pdf chapter 2 for more information.

Adeel.

Feb-22-14 18:52:18
Model exchange

I suppose you are using OMEdit.

Create your model and then export it as an FMU. From the menu FMI->export FMU.

Adeel.

Feb-18-14 18:58:52
The graph does not display in OMShell

If you get a message from plot command it means your plot command is silent. You need to enable it,

Code:

setPlotSilent(false)

Adeel.

Feb-15-14 19:47:31
Icon does not show in OMEdit
Category: Developer

The code is correct. But OMC fails to parse it,

Code:

getIconAnnotation(justIcon)

{-100.0,-100.0,100.0,100.0,false,0.1,2.0,2.0}

The reason is

Code:

visible = useHeatPort

Although we do instantiation but in your case useHeatPort is not defined. So that particular case should handled. Add a bug report about it https://trac.openmodelica.org/OpenModelica/newticket

As a workaround for now either change useHeatPort with true/false or define useHeatPort. In the following code useHeatPort is defined and it works fine,

Code:

model justIcon

 
parameter Boolean useHeatPort = false;

  annotation(Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics), Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100,-100},{100,100}}), graphics={  Text(extent = {{-154,-47},{146,-87}}, textString = "%name", lineColor = {0,0,255}),Polygon(points = {{26,0},{-34,40},{-34,-40},{26,0}}, lineColor = {0,0,0}, fillColor = {255,255,255},
            fillPattern =  FillPattern.Solid),Line(points = {{-94,0},{96,0}}, color = {0,0,255}),Line(points = {{26,40},{26,-40}}, color = {0,0,255}),Line(points = {{26,20},{54,50},{54,76}}, color = {0,0,255}),Line(points = {{36,50},{56,30}}, color = {0,0,255}),Line(visible = useHeatPort, points = {{-4,-100},{-4,-20}}, color = {127,0,0}, smooth = Smooth.None, pattern = LinePattern.Dot),Rectangle(extent = {{-66,84},{68,62}}, lineColor = {0,0,255}, fillColor = {255,255,255},
            fillPattern =  FillPattern.Solid),Line(points = {{0,84},{0,106}}, color = {0,0,255}, smooth = Smooth.None)}),
    uses(Modelica(version="3.2")));
end justIcon;

Adeel.

Feb-10-14 19:13:10
Problems saving the models in OpenModelica on Linux

Thats too old. The current revision is 19035. Update to latest.
If you still encounter the same issue then report it on https://trac.openmodelica.org/OpenModelica/.

Adeel.

Feb-10-14 18:24:50
Problems saving the models in OpenModelica on Linux

Which revision are you using?

Adeel.

Jan-17-14 16:13:06
Need Help on how to create mechanical systems

Then the name you give to it, is the path since you don't put it inside any package.
Lets say you name it "SampleModel" then your visualization script will be something like this,

Code:

loadFile("D:\Temp\sample.mo");getErrorString();

loadModelica3D();getErrorString();
loadString("model SampleModelVis
  extends SampleModel;
  inner ModelicaServices.Modelica3D.Controller m3d_control;
end SampleModelVis;");getErrorString();
simulate(SampleModelVis);

Note that you need to load your model so that the compiler can find it.

Adeel.

Jan-17-14 15:53:44
Need Help on how to create mechanical systems

What do you mean how do you find this path? You know this path since you have created it.

For example if I create the following package,

Code:

package p1

  package p2
    package p3
      model m1
      end m1;
    end p3;
  end p2;
end p1;

Now i know the path of model m1 i.e p1.p2.p3.m1

There are API calls to find the class names e.g,

Code:

loadString("package p1

  package p2
    package p3
      model m1
      end m1;
    end p3;
  end p2;
end p1;");
getClassNames();
getClassNames(p1);
getClassNames(p1.p2);
getClassNames(p1.p2.p3);

Adeel.

Jan-17-14 15:43:18
Need Help on how to create mechanical systems

The path of your models e.g MyPackage.MyNestedPackage.MyModel

Adeel.

Jan-17-14 15:00:43
Need Help on how to create mechanical systems

Great. I have also updated the users guide.

Adeel.

Jan-17-14 14:51:49
Need Help on how to create mechanical systems

I think we should update the users guide as it is still the old example code in it.
I will fix it.

Adeel.

Jan-17-14 14:24:55
Need Help on how to create mechanical systems

Yes, that is right. I don't know why then python says,

File "C:\Python27\lib\os.py", line 423, in __getitem__
    return self.data[key.upper()]
KeyError: 'OPENMODELICAHOME'

As I said try with 32 bit version of python and pygtk.

Adeel.

Jan-17-14 14:18:05
Need Help on how to create mechanical systems

Check your OPENMODELICAHOME environment variable.

Adeel.

Jan-17-14 14:13:40
Need Help on how to create mechanical systems

I don't think reinstalling OpenModelica will help.

You should probably try with 32 bit Python and pygtk-all-in-one-2.24.2.win32-py2.7.msi

Adeel.

Jan-17-14 13:57:41
Need Help on how to create mechanical systems

You should do,

Code:

cd "D:\\OpenModelica1.9.1Nightly\\lib\\omlibrary-modelica3d\\osg-gtk"

python dbus-server.py

In this way your working directory is "osg-gtk" and then python can find the dll.

Adeel.

Jan-17-14 13:08:01
Need Help on how to create mechanical systems

How do you start dbus-server.py? The libm3d-osg-gtk.dll is located in the same directory where dbus-server.py is.
I need to know how you run your python script?
If you just cd to the directory and run,

Code:

python dbus-server.py

it should work.

Adeel.

Jan-16-14 23:35:09
Need Help on how to create mechanical systems

The dbus-server.py should be available now. Adrian has fixed it in r18663.

Adeel.

Jan-16-14 13:02:22
Need Help on how to create mechanical systems

Read OpenModelica users guide. It is part of OpenModelica installation and is located at C:\OpenModelica1.9.1Nightly\share\doc\omc\OpenModelicaUsersGuide.pdf (assuming that you installed OpenModelica at the default location).

In particular read chapter 1 for general understanding and read chapter 11 for Modelica3D.

I checked the dbus-server.py and yes it is missing. It seems like something is wrong in the build. I will look into it.

Adeel.

No, there is no debug option to see the interaction when OMEdit is making a conneciton with OMC.
There are debug options once you are connected to OMC as mentioned in the above post.

Adeel.

You can configure it in Eclipse but you need to install CDT with mingw tool chain. MDT doesn't provide such features.

Why don't you use Qt Creator for debugging?

Do a make clean and use GDB to find out the exact location of the bug.

Adeel.

Dec-24-13 19:45:20
Open Modelica Notebook step by step execution and debugging features
Category: Programming

No, but algorithmic code debugging is available.
See chapter 10 of OpenModelicaUsersGuide.pdf for more details.

Adeel.

The crash is because of MainWindow.cpp line 1441,

Code:

GraphicsView *pGraphicsView = mpModelWidgetContainer->getCurrentModelWidget()->getDiagramGraphicsView();

OMEdit preserves the user customizations & you have connect mode enabled so when OMEdit starts it triggers the toggleShapesButton SLOT.
Since there is no ModelWidget available so,

Code:

mpModelWidgetContainer->getCurrentModelWidget();

returns 0. You should check it before asking for the DiagramGraphicsView instance.

BTW, why do you want to make show/hide annotations part of toggle Shapes? It should be an option in the Options Dialog not in the toolbar.

Adeel.

Dec-18-13 17:10:22
Problems are found in Modelica Text

I guess you have auto save enabled with a very short time interval. Disable it or set the interval to some reasonable duration.
Tools->Options->General->Enable Auto Save
OR
It could be that your OpenModelica is older than revision 17652.
This bug was fixed in revision 17652 https://trac.openmodelica.org/OpenModelica/ticket/2416.

Adeel.

Dec-07-13 20:25:46
BEginners Help.

Check the OpenModelicaUsersGuide.pdf which should be included in the package you have downloaded.
OpenModelicaInstallationFolder/share/doc/omc/OpenModelicaUsersGuide.pdf

Adeel.

Dec-02-13 16:33:14
Is there a snap to grid function on the connection editor?
Category: Programming

No, currently there is no snap to grid function.
But perhaps we will have it in the future. There is already a ticket about it. https://trac.openmodelica.org/OpenModelica/ticket/2477

Adeel.

Code:

model A

  Integer aValue1(start=1);
  Integer aValue2(start=2);
equation
  aValue1 = B(2);
  aValue2 = aValue1 + 10;
end A;

function B
  input Integer bValue1;
  output Integer bValue2;
algorithm
  bValue2 := bValue1 + 1;
end B;

Adeel.

Simulate the model and switch to modeling view.
One the right side you will see the "variables browser". It has the value column which allows you to modify the variables/parameters which are changeable.
Change the value and then right click the parent item of the list and choose re-simulate.

BTW why don't you use a function?

Adeel.

you can't run it in OMEdit.
In OMEdit once you have simulated the model then you can change the values in the variables browser and re-simulate it.
Note that you need atleast revision 18123.

Adeel.

Nov-15-13 15:21:33
Category: Programming

I haven't tried it but i think you must specify three outputs,

Code:

(,sub,);=add(3,4);

you are missing the third output.

Adeel.

The options are only read once when you create the model. If you want to change the behavior of the existing models then you must change its local settings. Right click inside the icon/diagram view and choose properties. Note that changing the values will not update the existing components.

Adeel.

Nov-14-13 13:16:12
I get this error: Parse error: The identifier at start end ...

This is still work in progress but the workaround for it was already done in r17652.
OR
You can disable the auto save feature. Tools->Options->Genaral->Auto Save.

Adeel.

What do you mean by you change the icon size? There is not icon size in options.

Yes, snap to grid can be implemented. Please add a new enhancement ticket here https://trac.openmodelica.org/OpenModelica/

Adeel.

Tools->Options->Simulation. Type +d=initialization in OMC Flags.

Adeel.

No, there is no other way to hide the individual variables. You can only delete the complete result.
However, you can apply the variable filter during the simulation. On the simulation->output->Variable Filter. You can right a regular expression here to filter the variables. https://build.openmodelica.org/Document … ulate.html

Adeel.

Oct-27-13 00:34:29
Category: Developer

Hi,

We are already working on this. It will be available soon in future versions but I can't say exactly when.
For reference you can follow this ticket https://trac.openmodelica.org/OpenModelica/ticket/2439

Adeel.

Oct-19-13 23:06:10
Adding a Modelica Library to my model
Category: Programming

For your other question, the best is to read the Modelica specificaiton section 4.6 Specialized Classes,
https://modelica.org/documents/ModelicaSpec33.pdf

Adeel.

The error says it all. Change your HelloWorld class to function.

Adeel.

Sep-10-13 23:12:04
visualising a multi-body system after it has been simulated

OK. Thats my mistake. Thanks for finding this error. I will try to fix it ASAP.
You can use the one night earlier build https://build.openmodelica.org/omc/buil … -17148.exe until I fix the issue.

Adeel.

Sep-10-13 22:23:05
visualising a multi-body system after it has been simulated

You should enable the initialization flag via Tools->Options->Simulation and then in the OMC Flags text box enter,

Code:

+d=initialization

It will remove the initialization warning message but it will output other initialization warnings that you should fix. The rules for initialization are more up to the specification now which were not even checked in the previous versions. Post the warnings. I will ask Lennart to help you with initialization issues.

Adeel.

Sep-10-13 18:44:54
visualising a multi-body system after it has been simulated

The interesting error message is,

Code:

\"[C:/Users/Ilma/Dropbox/zavrsni/robotic/script1.mos:4:1-4:74:writable] Error: Class getInstallationDirectoryPath not found in scope <global scope> (looking for a function or record).

I am not sure why getInstallationDirectoryPath() is failing. I recommend installing a new OpenModelica nightly build since the one you are using is almost 4000 revisions old version.
https://build.openmodelica.org/omc/buil … ly-builds/

Things are getting closer don't give up current/smile

Adeel.

Sep-10-13 18:16:43
visualising a multi-body system after it has been simulated

Which version of OpenModelica are you using?

Try running the script from command line.
Go to your script file location and then run, C:/OpenModelica/bin/omc.exe script.mos (change the path according to your environment).

The reason you are getting this error is because OMNotebook current working directory is %TEMP%. So when you say loadFile("strukturav2.mo") it will fail because the file is located somewhere else. Either use the full path to load file OR change the working directory before calling loadFile.

Assuming your script and model files are loacated at "C:/Users/Ilma/Dropbox/zavrsni/robotic" the following script should work for you,

Code:


loadModel(Modelica, {"3.1"}); getErrorString();
loadModel(ModelicaServices, {"1.0 modelica3d"}); getErrorString();
// get the path to modelica3d patches
m3d_path := getInstallationDirectoryPath() + "/lib/omlibrary-modelica3d/";
// load the changed Modelica.Utilities.Internal
loadFile(m3d_path + "Internal.mo"); getErrorString();
cd("C:/Users/Ilma/Dropbox/zavrsni/robotic"); getErrorString();
loadFile("strukturav2.mo"); getErrorString();
loadString("
model Visualize_strukturav2
inner ModelicaServices.Modelica3D.Controller m3d_control;
extends strukturav2;
end Visualize_strukturav2;
");
simulate(Visualize_strukturav2, stopTime=30); getErrorString();

Adeel.

Sep-10-13 17:09:17
visualising a multi-body system after it has been simulated

No. loadModelica3D() doesn't work.

I think ModelicaServices.Modelica3D.Controller is defined as outer in the default implementation which should be inner. Ask Adrian for details.

Adeel.

Sep-10-13 16:52:10
visualising a multi-body system after it has been simulated

It works fine for me.

- I just saved your model into a file "strukturav2.mo".
- Started the dbus-server.py
- Ran the following script.

Code:


loadModel(Modelica, {"3.1"}); getErrorString();
loadModel(ModelicaServices, {"1.0 modelica3d"}); getErrorString();
// get the path to modelica3d patches
m3d_path := getInstallationDirectoryPath() + "/lib/omlibrary-modelica3d/";
// load the changed Modelica.Utilities.Internal
loadFile(m3d_path + "Internal.mo"); getErrorString();
loadFile("strukturav2.mo"); getErrorString();
loadString("
model Visualize_strukturav2
inner ModelicaServices.Modelica3D.Controller m3d_control;
extends strukturav2;
end Visualize_strukturav2;
");
cd("C:/Users/adeas31/AppData/Local/Temp/OpenModelica"); getErrorString();
simulate(Visualize_strukturav2, stopTime=30); getErrorString();

Note that you must save the script file and the strukturav2.mo file at the same level.

Adeel.

Sep-10-13 04:08:36
visualising a multi-body system after it has been simulated

Are you able to simulate your model without modelica3D?
Can you post your model?

The error message doesn't seem to be related with visualization.

Adeel.

Aug-02-13 18:50:37
Interactive Simulation missing in 1.9.0?

Interactive simulation is currently not available. It will be back again soon but I can't tell you exactly when.

Adeel.

Jul-30-13 15:40:37
Variables of FMU are not defined

This is what i get with the latets version,

http://www.ida.liu.se/~adeas31/result.png

Adeel.

Jul-30-13 15:10:53
Variables of FMU are not defined

Its a rather old revision. Try the latest the revision 16690.

What is TestFMU.EinfachesModell in your FMU import model?

Which values are you interested in?

Adeel.

Jul-30-13 14:55:59
Variables of FMU are not defined

I need more info. Which revision you are using? The sample model etc...

Adeel.

Jul-30-13 13:23:16
Variables of FMU are not defined

Hi,

No, it is not a bug and you are not doing anything wrong here.

Your parameter value 2 for gain that you set in your original model will be picked up when you run the simulation. The value is stored in the fmu binary and is only read when you simulate the model. If it is a start value then you should be able to see it right after import.

flowInstantiate, flowParamsStart are used internally so you you don't need to fill a value for them.

Adeel.

Jul-30-13 13:11:03
Real variables are not correctly shown in diagramm view

Hi,

It seems like you are using the release version of openmodelica.
The red boxes indicates your variables which doesn't have any placement annotation defined.

The latest source doesn't draw red boxes for real variabels. You can download and install the latest nightly build https://build.openmodelica.org/omc/buil … ly-builds/

Adeel.

Hi Christoph,

Don't worry about the "404 Component not found" error. Just follow the instructions from this document https://trac.openmodelica.org/documents … ingMDT.pdf and it will work.

Adeel.

Jul-04-13 19:25:59
Cannot activate FMI communication from Dymola to OM

I cannot run the generated code. I need the FMU for reproducing the crash and testing.

Adeel.

Jun-21-13 13:44:31
qwt.dll not found
Category: Programming

The required dll was missing in the installer. I have added it now. The next nightly build will work fine.

Adeel.

Check email.

Adeel.

Jun-10-13 14:26:39
Category: Programming

Hi,

What version of OpenModelica are you using? Can you send me the omeditcommands.log file? You can find it in your users Temp folder under OpenModelica/OMEdit.

Adeel.

Hi,

Create a new connector via File->New Modelica Class, give it some name and choose the connector from the restriction drop down.
Draw icon for the connector in the icon view and type in the required equations in the Modelica text view.

Adeel.

Jun-03-13 19:07:28
I am having a few different beginner problems

Hi,

I tried it and got the same result. It looks like a bug. Can you report it https://trac.openmodelica.org/OpenModelica/?

Adeel.

Jun-03-13 18:47:05
Use model as external input/output

No, OpenModelica can't export slave FMU for co-simulation. Only the model exchange FMU export is supported right now.
You can check the status here https://www.fmi-standard.org/tools.

Adeel.

May-21-13 18:27:29
Want to change the axis from time to other variables?

Anonymous users are not allowed to attach files while creating the ticket. But you can create the ticket and then go on the ticket to attach the file.

Adeel.

May-21-13 18:25:00
Want to change the axis from time to other variables?

you can send the screenshots to adeel.asghar at liu.se

Adeel.

May-21-13 18:22:44
Want to change the axis from time to other variables?

You mean the trac site doesn't allow you to upload the images? You can send the screenshots to me and i will add the ticket to the tracker. You can later edit it.

Btw which OpenModelica revisions are you using?

Adeel.

May-20-13 22:53:23
Want to change the axis from time to other variables?

If you think the results shown are wrong then file a bug report here https://trac.openmodelica.org/OpenModelica/

However, I plotted pipe length over time and it always shows a constant value of 20.

Adeel.

May-20-13 20:32:04
Want to change the axis from time to other variables?

Hi,

1. Yes, in the toolbar click on the plot parameteric tool button, it will open the new plot window then you can select two variables for plotting.

2. This can be done via interactive simulation but unfortunately interactive simulation is broken right now and I can't tell you when it will be available again. However, you can install some old OpenModelica like 1.7 or 1.8 and can run interactive simulation.

Adeel.

Where is libmylib.a located? You can put it either in C:/Programfiles/OpenModelica//lib/omc OR add the library path like this,

Code:

setEnvironmentVar("MODELICAUSERLFLAGS","-Lpath-to-library");

put the above line into your mos file.

Also, I think you must change

Code:

external "C" annotation(Library="libmylib.a",Include="#include \"ExternalFunc2.h\""); 

to

Code:

external "C" annotation(Library="mylib",Include="#include \"ExternalFunc2.h\""); 

Adeel.

Its a known bug, https://trac.openmodelica.org/OpenModelica/ticket/2122
The problem is with the OpenModelica interactive scripting environment.

Adeel.

Mar-14-13 23:21:40
Category: Programming

you can print the string value by using Modelica.Utilities.Streams.print during the runtime.

Adeel.

Modelica.pltpkg is not part of the current OpenModelica. The users guide is not updated.
You have to download old OpenModelica if you want to use it. Perhaps version 1.6 or 1.7.

Adeel.

Move the SimpleVisual object declaration in the end,

Code:


model BouncingBall3D
import SimpleVisual.*;
parameter Real e=0.7 "coefficient of restitution";
parameter Real g=9.81 "gravity acceleration";
Real h(start=10) "height of ball";
Real v "velocity of ball";
Boolean flying(start=true) "true, if ball is flying";
Boolean impact;
Real v_new;
SimpleVisual.PositionSize ball "color=red;shape=sphere;";
equation
impact=h <= 0.0;
der(v)=if flying then -g else 0;
der(h)=v;
ball.size[1]=5;
ball.size[2]=5;
ball.size[3]=5;
ball.frame_a[1]=0;
ball.frame_a[2]=h+ball.size[2]/2;
ball.frame_a[3]=0;
when {h <= 0.0 and v <= 0.0,impact} then
v_new=if edge(impact) then -e*pre(v) else 0;
flying=v_new > 0;
reinit(v, v_new);
end when;
end BouncingBall3D;

I have fixed the bug in r14814. But for now use the above model.

Adeel.

Can you post you visualization model?

I tried BouncingBall3D model with the latest OpenModelica nightly build and it worked fine. You can find the BouncingBall3D model in $OPENMODELICAHOME/share/doc/omc/testmodels/visualize_3D_BouncingBall.mo

Adeel.

We don't have anything like loadLibrary, you must call,

Code:

loadModel(SimpleVisual)

Adeel.

This API is used by OMNotebook. The idea is to automatically call this API when OMNotebook starts. By doing this we don't have to update all the .onb files. The problem is OMShell and OMNotebook uses the same instance of omc.

The other solution is to get rid of this API and add an extra argument to plot API but then we need to update all the .onb files.

Adeel.

Call,

Code:

setPlotSilent(false)

before plot.

Adeel.

Dec-29-12 16:27:32
ModelicaAdditions.PetriNets not shown under library section
Category: Programming

OpenModelica r14546 can't load this library. I got this,

Code:


loadModel(ModelicaAdditions)
false
[C:/OpenModelica/trunk/build/lib/omlibrary/ModelicaAdditions/Blocks/package.mo:1:1-55:11:writable] Error: Expected the package to have within ModelicaAdditions; but got within ;
Error: Failed to load package ModelicaAdditions (default) using MODELICAPATH C:/OpenModelica/trunk/build/lib/omlibrary.

Adeel.

Dec-28-12 22:44:49
ModelicaAdditions.PetriNets not shown under library section
Category: Programming

You need to load the ModelicaAdditions library. In OMEdit you can do it like this,

Tools->Options->Libraries then click on Add. Write ModelicaAdditions in the Name field and default in the Value field, click OK and then restart OMEdit.

Adeel.

Dec-14-12 01:24:30
Converting the BouncingBall demo to use array variables fails...

This is already reported here https://trac.openmodelica.org/OpenModelica/ticket/1853
I am not sure when this will be fixed current/smile

Adeel.

Dec-12-12 01:06:07
There's some magic to this but I can't figure it out...

You will obviously won't get BouncingBall.exe on OSX current/smile. It will be BouncingBall. Remove .exe from the commands.

Adeel.

Dec-12-12 00:39:30
There's some magic to this but I can't figure it out...

Run the following commands one by one in OMShell,

Code:


loadFile("BouncingBall.mo")
simulate(BouncingBall, startTime=0.0, stopTime=10.0)
plot(h)
setInitXmlStartValue("BouncingBall_init.xml", "h", "5", "BouncingBall_init.xml")
system("BouncingBall.exe")
plot(h, externalWindow=true)

When we simulate the model the init xml file is created which contains the start values. The setInitXmlStartValue command updates the file with new values and then we just simply run the simulation executable. If we run the simulate command after setInitXmlStartValue command then it will override the values back to the original values.
If you want to use the Adrian's suggestion,

Code:


loadFile("BouncingBall.mo")
buildModel(BouncingBall, startTime=0.0, stopTime=10.0)
system("BouncingBall.exe")
plot(h)
system("BouncingBall.exe -override h=5")
plot(h, externalWindow=true)

Adeel.

Dec-11-12 21:50:22
There's some magic to this but I can't figure it out...

Simulate the model to get the init xml file then call setInitXmlStartValue to update the start value of h then use the system command to run the simulation executable again.

Code:


setInitXmlStartValue("BouncingBall_init.xml", "h", "5", "BouncingBall_init.xml")
system("BouncingBall.exe")

Adeel.

Dec-08-12 03:23:53
There's some magic to this but I can't figure it out...
Dec-07-12 06:37:47
can't find command to export FMU from OM Shell
Category: Developer

the command is,

Code:

translateModelFMU(<model_name>)

Adeel.

These are known bugs and we are trying to fix them ASAP. You can look at the status of these bugs here,

https://trac.openmodelica.org/OpenModelica/ticket/1861
https://trac.openmodelica.org/OpenModelica/ticket/1713

Adeel.

Yes, I will do that.

Adeel.

Currently, there is no way to avoid red boxes.
I think we should respect annotation(visible=false). I will add this feature soon. Thanks.

Adeel.

No, on windows it is c:/OpenModelica1.9.0/lib/omlibrary
You can find documentation in C:\OpenModelica1.9.0\share\doc\omc. A good start is OpenModelicaUsersGuide.pdf

Adeel.

Hi Arnaud,

When you install without admin rights, you won't get any option from installer to choose "install for me or install for all users".
If you are not admin you are always installing for yourself only.

You should get an OpenModelica folder in your start menu.

Can you check if the environment variables are set for you or not? Run set command in cmd and see the results. The result list should have OPENMODELICAHOME and OPENMODELICALIBRARY.

Adeel.

Oct-17-12 23:45:52
Loading in a library that is not UTF-8 encoded

You can use any file encoding convert utility like iconv to make your libraries UTF-8.
To convert them to Modelica 3.x you can use Dymola or either do it manually.

Adeel.

Hi Joe,

You can safely download and install it.
The Symantec is complaining possibly because the build executables are unauthorized and are not digitally signed via SSL certificates.

Adeel.

Just open the library file (normally package.mo) in OMEdit.

Adeel.

Sep-26-12 22:30:01
can't compile trunk
Category: Developer

You need to update rml-mmc.

Adeel.

Sep-26-12 18:43:29
Simple pendulum case crashes in v1.9

Hi,

Install the new nightly build https://build.openmodelica.org/omc/buil … y-builds/.
In the simulation dialog you see two new drop down boxes where you can select these options before simulation.

Adeel.

Sep-18-12 17:08:23
Simple pendulum case crashes in v1.9

OMEdit now handles this.

Adeel.

Sep-11-12 17:10:53
Looking for simple tabular output of a variable rather than a plot.

Hello,

If you move your cursor on the plotted curve it will show you all the values.
OR
Use the val API command https://build.openmodelica.org/Document … .val.html. (not available from the graphical tool).

Adeel.

Aug-31-12 18:29:45
How to create or use additional libraries in OMEdit?

Hi David,

The library is same as package. So you should be able to load it via File->Open. But yes it will appear in Modelica Files. Anything that is loaded in Modelica Library tab is considered readonly. We have planned to merge these tabs into one in future release.

If you want to load it in Modelica Library tab, you must copy your library to C:/OpenModelica1.8.1/lib/omlibrary and then tell OMEdit to load it by setting it in Tools->Options then in Libraries add new library. Lets say your library is named X then you add a new library with name X and value default. Restart OMEdit.

Adeel.

Hi,

Can you tell more about your installation? Also please post the result of checkSettings() command.

Adeel.

You need to check the inheritance of master class and then get modifiers of the inherited class. I posted the sequence of commands,

Code:

>> getInheritanceCount(master)

<< 1
>> getNthInheritedClass(master, 1)
<< base
>> getExtendsModifierNames(master, base)
<< {p1}
>> getExtendsModifierValue(master, base, p1)
<< = 10

Adeel.

You can do that with OMPlot. OMEdit is using OMPlot for plotting but with some added features current/smile

Adeel.

Jul-25-12 17:53:39
OpenMo 1.8.1 error: Communication with the OMEdit server has been lost

Hi,

This message is shown when OpenModelica compiler is closed. Can you tell which model is causing this behavior?

You can also try installing the latest build,
https://build.openmodelica.org/omc/buil … ly-builds/

Adeel.

Jul-23-12 17:05:59
Interactive Simulation not working

The interactive simulation is currently not supported.

May be the example TwoTanks.TanksConnectedPI.exe is old executable generated via old OpenModelica. And the one you are creating now doesn't have support for interactive simulation since the current OpenModelica is not supporting it now.

I am not sure when interactive simulation is available again, perhaps next release.

Adeel.

The result file is generated in the temp folder depending on how you have generated it.

If its generated via OMShel then it will be in %TEMP%/OpenModelica/<your-resut-file>.csv
If its generated via OMEdit then it will be in %TEMP%/OpenModelica/OMEdit/<your-resut-file>.csv

Adeel.

In the Simulation Dialog select csv as outputFormat. You will get the result file as csv which you can use with Excel.

Adeel.

Hi,

Can you please provide more information. I tried the steps you said and I didn't get any error.
Download and check this test OMNotebook file http://www.ida.liu.se/~adeas31/NotebookTest.onb

Adeel.

Jul-13-12 00:29:38
Cannot properly change the annotations of a parameter within a class.
Category: Developer

Hi,

Solution 1 - You are not specifying the annotate string properly. It should be,
>> updateComponent(testReal, Real, test, annotate=Placement(transformation=transformation(extent = {{1,2},{3,4}})))
instead of,
>> updateComponent(testReal, Real, test, annotate=Placement(transformation(extent = {{1,2},{3,4}})))

Solution 2 - A component can only have a placement annotation AFAIK. Read Modelica Specification 3.2 section 17.5.2 Component Instance
The Dialog annotation is for the class and you have to use addClassAnnotation API for it. However, multiple annotations are not supported through addClassAnnotation. You have to set them individually through addClassAnnotation.

Answers:
- No updateComponent is the only way.
- Yes you are using annotate= in a wrong way. Read solution 1. For further reading check this document https://openmodelica.org/svn/OpenModeli … -HowTo.pdf and study updateComponent API usage.
Anonymous read access is allowed with user: anonymous and pass: none.

Adeel.

Jul-10-12 03:55:48
Is MDT supported on the MAC
Category: Developer

Update your MDT to 0.7.28.
From eclipse Help->Check for updates

Adeel.

Jul-10-12 02:57:02
Is MDT supported on the MAC
Category: Developer

OMEdit uses Qt's default functions to get the temp directory for any platform. I was expecting that something similar was done in MDT as well, but surprisingly the /tmp/ value was hard coded there current/smile
I have fixed it now.

Adeel.

Jul-09-12 21:52:10
Is MDT supported on the MAC
Category: Developer

Hi,

Can you check if this file really exists /tmp/openmodelica.dbarends.objid.mdt ?
Also make sure that eclipse has rights to read this file.

Adeel.

Jul-09-12 20:22:47
Is MDT supported on the MAC
Category: Developer

Hi,

Inside eclipse goto Windows->Preferences then select Modelica and then inside "OpenModelica Compiler (OMC) Binary" section choose "use custom binary" and specify the path where your omc is located.

Adeel.

Hi,


Interactive Simulation is not supported now. Perhaps it will be part of next release again.
If you want to use it then you have to use older version of OpenModelica.

Adeel.

Jun-27-12 14:46:57
Increasing the size of the drawing area (or decrease the block sizes)

This is not possible with the current version of OMEdit. We are planning to release a new version in this winter where we are addressing such issues.
Perhaps zoom out one level can be work around for now.

Adeel.

May-27-12 18:27:21
how to utilize the exe file that is compiled when i simulate a model?

Write full absolute path of the file or put the file where OMPlot is located.

Adeel.

May-14-12 18:23:19
information request on how i can move the block diagramm

Hi,

Can you explain your problem a bit more.
Normally, you do ctrl+a and then move all selected components. If you just want to move one select and drag it.

Adeel.

May-08-12 17:09:32
OMEdit: preserving plot variable selection in between simulation runs?

Hello Paul,

No, its not possible. OMEdit use the result file to read the plot varibales and when you do re-simulation the result file is created again which means OMEdit has to read it again. However, you can generate a new result file. In the Simulation box got to output tab and set File Name. This will tell OpenModelica compiler to create a result file with this name which means you get a new file. Then OMEdit plot is not cleared out.

Adeel.

Apr-28-12 13:34:37
message from the OMEdit
Apr-28-12 13:33:26
message from the OMEdit

A new version is available now http://build.openmodelica.org/omc/build … ses/1.8.1/
We normally recommend installing the latest nightly build so that the user get the most recent updates http://build.openmodelica.org/omc/build … ses/1.8.1/

Adeel.

Apr-25-12 09:02:17
message from the OMEdit

This is because your simulation has failed and no result file is generated. However, you should get a better error message, perhaps you are using an older version. Which revision you are using?

Adeel.

Apr-13-12 21:52:50
Looking for instructions to compile all OpenModelica files on Windonws
Category: Developer

There is a README.txt inside each OMTool directory. e.g https://openmodelica.org/svn/OpenModeli … README.txt

Adeel.

Apr-13-12 16:40:06
MDT Eclipse URL broken?
Category: Developer

Uncheck "group items by category" option on the eclipse install page.
Read Page of this document. http://openmodelica.ida.liu.se:8080/cb/ … oc_id=1389

Adeel.

Apr-07-12 13:06:14
static variables couldn't be translated
Category: Developer

Hi,

I have updated the source code. Now you can define translations for static variables as well.
Can you update your Russian translations file? Thanks.

Adeel.

Apr-03-12 18:14:13
Category: Developer

Yes. You will have that feature in this Fall (by the end of this year).

Adeel.

Apr-03-12 17:43:47
Category: Developer

Yes the 2nd variant is not supported now. OMEdit can read packages with directory structures but can't save them. Only save option available right now is to save in a single file.

Adeel.

Apr-02-12 12:03:31
static variables couldn't be translated
Category: Developer

You can also take a look at QT_TR_NOOP() http://qt-project.org/doc/qt-4.8/qtglob … QT_TR_NOOP
But I guess what Sjoelund recommended is rather easy to implement.

Adeel.

Mar-22-12 16:11:13
Need instruction to easy compile OMEdit for Linux
Category: Developer

On Linux, Use the makefiles inside OMEdit/OMEditGUI directory.

On Windows, follow the INSTALL.txt instructions + you have to generate omc_communication.cc and omc_communication.h files using the omc_communication.idl file located at trunk/Compiler/runtime through the OmniORB (or anyother CORBA idl that you prefer to use).

Adeel.

Mar-13-12 17:57:09
Cannot import FMUs generated from OM, Dymola or FMU-SDK

Hi Patrik,

Thanks for pointing out the problem. I have fixed it now in r11411.

If you don't specify the extract folder then the files are extracted in the current working directory of OpenModelica.

Adeel.

Mar-08-12 13:24:49
Simulation doesn't work on loaded models

Hi,

This was fixed in r11053. If you are using an older version I suggest installing the new nightly build,
http://build.openmodelica.org/omc/build … ly-builds/

Adeel.

Mar-06-12 18:25:52
Syntax error in HelloWorld class

OpenModelica 1.8.1 (r11291)
http://build.openmodelica.org/omc/build … ly-builds/

Adeel.

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.

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