3

I want to run parameter studies in different modelica building libraries (buildings, IDEAS) with python: For example: change the infiltration rate.

I tried: simulateModel and simulateExtendedModel(..."zone.n50", [value]) My questions:Why is it not possible to translate the model and then change the parameter: Warning: Setting zone.n50 has no effect in model. After translation you can only set literal start-values and non-evaluated parameters.

It is also not possible to run: simulateExtendedModel. When i go to command line in dymola and write for zone.n50, then i get the actual value (that i have defined in python), but in the result file (and the plotted variable) it is always the standard n50 value.So my question: How can I change values ( befor running (and translating?) the simulation? The value for the parameter is also not visible in the variable browser.

Kind regards

Math_reald
  • 305
  • 3
  • 4
  • 13

2 Answers2

2

It might be a strcutrual parameter, these are evaluated also. It should work if you explicitly set Evaluate=False for the parameter that you want to study. Is it not visible in the variable browser or is it just greyed out and constant? If it is not visible at all you should check if it is protected.

matth
  • 2,568
  • 2
  • 21
  • 41
  • Hey,thank you very much, it works! Could you explain in a few words what a structural parameter is and what evalute mean (i did not understand the short explanation in the dymola manual)? The parameter was visible in the variable browser but i couldnt change the value (there was no field where i could add a value). Once again thank you very much – Math_reald Sep 23 '15 at 18:21
  • If I understood correctly, a structural parameter is a parameter that influences the structure of the equation system. The Modelica tool can then decide to evaluate the parameter in order to simplify the equation system and thus increase simulation speed. – matth Sep 23 '15 at 18:28
  • also read: http://stackoverflow.com/questions/21957303/change-annotationevaluate-true-false-for-parameters-in-models-from-modelica-s – matth Sep 23 '15 at 18:28
  • also read: https://stackoverflow.com/questions/35907544/current-version-of-the-modelica-translator-can-only-handle-array-of-components-w/35909692#35909692 – matth Dec 06 '17 at 14:23
1

Some parameters cannot be changed after compilation, even with Evaluate=False. This is the case for parameters that influence the structure of the model, for example parameters that influence a discretization scheme and therefore influence the number of equations.

Changing such parameters requires to recompile the model. You can still do this in a parametric study though, I think you can use Modelicares to achieve this (http://kdavies4.github.io/ModelicaRes/modelicares.exps.html)

saroele
  • 9,481
  • 10
  • 29
  • 39