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

Posts

Posts

Mar-24-14 19:29:24
Category: Developer

My locale is Italian.
I'm going to add a new ticket.

Before the latest update it worked without errors

Davide

Mar-24-14 15:52:17
Category: Developer

Another clue:
If I run 

Code:

OMPlot --filename=fileName variableName

the system returns many rows with this error:
Found non-double data in csv result-file

Mar-24-14 11:42:38
Category: Developer

This is a sample model: 2 resistors and a voltage source.

Code:


model prova2
  Modelica.Electrical.Analog.Sources.ConstantVoltage constantvoltage1 annotation(Placement(visible = true, transformation(origin = {-40, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground1 annotation(Placement(visible = true, transformation(origin = {-40, -40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Resistor resistor1(R = 1000) annotation(Placement(visible = true, transformation(origin = {-20, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Resistor resistor2(R = 1000) annotation(Placement(visible = true, transformation(origin = {20, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
equation
  connect(resistor2.n, ground1.p) annotation(Line(points = {{30, 40}, {41.6422, 40}, {41.6422, -28.739}, {-40.4692, -28.739}, {-40.4692, -28.739}}));
  connect(resistor1.n, resistor2.p) annotation(Line(points = {{-10, 40}, {9.97067, 40}, {9.97067, 40.4692}, {9.97067, 40.4692}}));
  connect(constantvoltage1.p, resistor1.p) annotation(Line(points = {{-50, 0}, {-69.20820000000001, 0}, {-69.20820000000001, 39.2962}, {-29.912, 39.2962}, {-29.912, 39.2962}}));
  connect(constantvoltage1.n, ground1.p) annotation(Line(points = {{-30, 0}, {-20.5279, 0}, {-20.5279, -18.1818}, {-39.8827, -18.1818}, {-39.8827, -29.3255}, {-39.8827, -29.3255}}));
  annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {0.1, 0.1})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), experiment(StartTime = 0, StopTime = 1, Tolerance = 1e-06, Interval = 0.002));
end prova2;

at this url you can find the sample cvs file: https://app.box.com/s/hxcms5u7uig8s2g3wtjz

Mar-24-14 00:27:18
Category: Developer

Since the previous update (2 or 3 days ago) OMEdit doesn't plot the csv results of any model.
I've updated OMEdit today too but the problem still remains.

The error is: "Failed to open simulation result file"
With .mat results there are not problems.
I'm working with Ubuntu 13.10.

Regards

Davide

Thank you Adrian!
Your solution is effective and easier than mine.
I'll try it!

regards

thank you Adrian for the quick reply.
Is there a workaround in order to change a parameter value using the init file values?
My idea is to place a capacitor without discharge and set the initial voltage.
The model reads the voltage. If it is under a threshold the state is "false", if it is over the threshold the state is "true"
I need "only" to change a state from 0 to 1 in order to switch on/off part of my model

regards

Davide

Hi,
I need to recall the simulation several times so I use the runnable generated file with the option -overrideFile initfile.txt.
With this solution I'm able to change the init values of all status variables but I'm not able to change the value of a boolean constant.
Is there a way in order to change a boolean variable (or close/open a switch) without recompile the model?

Thank you

Davide

I'm writing a python script in order to:
- read the variables at a specific timestep (at last timestep for me)
- compile a .mat file in order to use the "-iif" option when I'll restart the simulation and use the lest variables values.

The question is: I need the structure of the .mat file for the initial values. Where can I find this structure? Can I use a .txt file instead .mat?

thank you

Hi,
thank you Adrian and sjoelund.se for the quick reply!

I think Adrian's solution is better but I've 2 problems:
1) I'm working in python and OMPython.execute("buildModel(\"myModel\")") doesn't initialize the model. The simulate command works.
2) I need to compile the "mat_file_with_initial_values.mat" from the result.mat from the previous simulation in order to write in the "mat_file_with_initial_values.mat " the variables values of the last timestep in the previous simulation and modify only 2 or 3 values.

thank you

Hi,

Is there a method in order to set as initial conditions the last values of the variables of the previous simulation.
Stupid Example:
there is a resistor, a capacitor and a voltage source. The initial voltage of the capacitor is 3V. At the end of the simulation the voltage is 6.7V because the capacitor is charging.
In the second simulation I'd like to start with the initial voltage of the capacitor at 6.7V.

I'm able to use the setInitXmlStartValue function but this can't help me.
I need this feature because I'm trying to couple a modelica model and a 3D cfd model.

thank you
Regards

Aug-20-11 21:59:37
How to increase the editing area dimension in OMEdit

Hi all, I'm a newbie in OMEdit,

I'm creating a quite big electric circuit and I need a bigger editing area. How can I increase this area?
This because the scrolling vertical and horizontal bars don't work outside the editing area.

My OS is Ubuntu and the release is:
OMEdit - OpenModelica Connection Editor Version: 1.7.0
Connected to OpenModelica "1.7.0 (r9665)"

thank you

Davide

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