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

Posts

Posts

Jun-22-17 09:09:07
Providing inputs during a simulation

Hi Koldo
That would be of great interest to me. I would like to see the example.

Many thanks

Peter

Jun-14-17 09:41:07
Providing inputs during a simulation

OK. Many thanks I will explore this. I appreciate your prompt help.

Thanks

Peter

Jun-14-17 08:49:41
Providing inputs during a simulation

Hi yes it could well be the way to go. Could you please let me have more information.

Thanks

Peter

Jun-14-17 08:02:34
Providing inputs during a simulation

Hi

I have created a simulation of an industrial process which varies according to the characteristics of the input. Is there any way I can pause the simulation and change some of the process parameters and then resume? Basically I want to create a training simulator that involves user input. So the workflow would be something like:

Start simulation with assumed parameters
Visualize results at say 25% of run time
Modify parameters
Visualize results at 50% of run time
Modify Parameters, etc

Any help or links would be gratefully appreciated.

Peter

Jun-13-17 19:16:10
Cannot get models with output displays to animate.

Hi Adeel

Many thanks for your response. So if I understand correctly animation is only possible with 3D visualisations? There is no way I can get something like RealNetwork1 to display (with the digital outputs changing) as an animation?

regards

Peter

Jun-13-17 17:39:31
Cannot get models with output displays to animate.

I can get 3D visualisation to work in OME 1.11.0 but not something like the RealNetwork1 example under blocks. Works OK in Dymola but not OMEdit. Is there a workflow I am missing?

grateful for any assistance.

Dec-23-16 20:19:32
How to assign a list of variables or attributes to an entity

  I have a list of 500 quality parameters that i want to assign to each new entity sequentially that passes through my discrete model. Anyone know how this can be done using the ARENAlib module. can I import them from a one column csv file? Then how do I access the values.

Any help appreciated.

Jun-15-16 16:39:00
DESlib packages

Hi

Does anyone have experience of running the DESlib libraries? I have tried all of the example models and cannot get any to run without errors. Even the simplest book examples in ARENALib come up with 36 errors and 118 warnings.

I have tried both Dymola and OMEdit.

Thankful for any suggestions

May-31-16 09:31:19
Random noise block recalculates in Dymola but not in OMEdit

I have created a model that is fed by a random noise block from the standard systems dynamics library which creates a new set of values when i re-simulate in Dymola fine. Different random values for every simulation. The same does not happen when running the same model in OMEdit and I cannot work out why. I would be really grateful if anyone had any ideas. Probably something simple as ticking a box somewhere.

i get the following warnings:

[1] 10:18:50 Translation Warning
Assuming fixed start value for the following 2 variables:
         Mine_Grade.y:DISCRETE(fixed = false ) .test_System_Dynamics.test_Flowsheet2016, .SystemDynamics.Functions.NoiseNormal$Mine_Grade, .Modelica.Blocks.Interfaces.RealOutput type: Real
         Mine_output.y:DISCRETE(fixed = false ) .test_System_Dynamics.test_Flowsheet2016, .SystemDynamics.Functions.NoiseNormal$Mine_output, .Modelica.Blocks.Interfaces.RealOutput type: Real


Code involved is below.

Any help greatly appreciated.

block NoiseNormal "Normally distributed random noise"
  parameter Real mean = 0 "Mean value of random noise";
  parameter Real stdev = 100 "Standard deviation of random noise";
  parameter Real tSample = 1 "Noise sample time";
  Modelica.Blocks.Interfaces.RealOutput y annotation(Placement(visible = true, transformation(origin = {90.0,0.0}, extent = {{-10.0,-10.0},{10.0,10.0}}, rotation = 0), iconTransformation(origin = {90.0,0.0}, extent = {{-10.0,-10.0},{10.0,10.0}}, rotation = 0)));
equation
  when initial() then
          SystemDynamics.Functions.Utilities.InitRandomNormal();
 
  end when;
  when sample(0, tSample) then
          y = mean + stdev * SystemDynamics.Functions.Utilities.RandomNormal(time);
 
  end when;
  annotation(Diagram(coordinateSystem(extent = {{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10,10})), Icon(coordinateSystem(extent = {{-100.0,-100.0},{100.0,100.0}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10,10}), graphics = {Rectangle(visible = true, lineColor = {0,0,255}, extent = {{-80.0,-80.0},{80.0,80.0}}),Text(visible = true, lineColor = {0,0,255}, extent = {{-0.0,-124.0},{0.0,-80.0}}, textString = "%name", fontName = "Arial"),Text(visible = true, lineColor = {0,0,255}, extent = {{-6.0,36.0},{-6.0,68.0}}, textString = "mean=%mean", fontName = "Arial"),Text(visible = true, lineColor = {0,0,255}, extent = {{-4.0,-6.0},{-4.0,24.0}}, textString = "stdev=%stdev", fontName = "Arial"),Text(visible = true, lineColor = {0,0,255}, extent = {{-2.0,-54.0},{-2.0,-24.0}}, textString = "tSample=%tSample", fontName = "Arial")}));
end NoiseNormal;

Sep-10-15 14:23:39
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

Hi.

I think we have a winner. All works fine. Many thanks.BTW I am using OE 1.9.1 (r22929) (RML version) and Dymola Version 2015 64bit.

You have been very helpful - I have learnt a lot and appreciate it.

Thanks

Sep-10-15 09:53:40
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

Hi,

I think we are getting close but I get the following error both in OMEdit and Dymola:

Check of IntegrateTest:

It is not allowed to use pre for a continuous time variable outside a when clause:
pre(sumChange1.u)

The when-condition must be a discrete expression:
when not (sumChange1.u == pre(sumChange1.u)) then
sumChange1.y = pre(sumChange1.y)+sumChange1.u;
end when;

Error detected in
when not (sumChange1.u == pre(sumChange1.u)) then
sumChange1.y = pre(sumChange1.y)+sumChange1.u;
end when;

Errors detected in model.

Check aborted.

ERROR: 2 errors were found

Any suggestions?

Sep-09-15 15:35:11
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

Hi yes. I hear what you are saying. Basically I have a series on monthly production figures which are definitive for that month. Naturally there has to be a transition at say month 3.5 between month 3 and 4. The problem is that the cumulative value at end of month 1 is less than the value for the month itself. The attached plot illustrates the monthly values in blue and the total in red. Doesnt make sense over the early part of the timescale but probably don to the integration itself. Moving the origin is not going to help as we have to start from 0 in month 0. Any ideas?


https://www.openmodelica.org/images/agorapro/attachments/4611/mini_Sample-plots.jpg

Sep-09-15 14:32:44
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

Hi.Thanks again and sorry to be a pain. I understand how y_start works with a fixed value but can I use the first time dependent variable value? It will vary so I cannot give it a value but I cannot work out the syntax to specify the input value at time =1.

For example if I have 10 samples u(time=1), u(time=2),.......u(time=10) I want to end up with u(time=1 + u(time=2)+........u(time=10)

Hope that makes sense. Again - any help appreciated.

thanks

Sep-09-15 11:45:07
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

Many thanks for this - the only issue I am now facing is that the integral always plots from 0. Is there any way I can get it to start from the first value in the table. Otherwise it is not truly cumulative.

I appreciate your help.

Sep-08-15 18:12:40
How can I create a cumulative plot of values with time derived from a time table?
Category: Programming

I am new to modelica so apologies if this is a simple request. I am manipulating a series of y values derived from a time table and need to plot the value of their total as well as the values themselves. How can I create this cumulative value that corresponds to the time interval?

For example if I have a series of values 1,3,5,2,7 how can I generate their cumulative values 1,4,9,11,18?

Many thanks

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