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

hardcoded FMU parameters

hardcoded FMU parameters

[Tested on OM1.11 - 32bit]

Please look at the following attached model.

parameter-test---Hardcoded.mo

When i run the simulation of this model for 10 seconds in OM environment, and try to change "parameter a" after compilation (give new value in Plotting/Variable Browser), i could see that changing the value affects the output of the model, y.

However when i export the model as an FMU ver 1.0, model exchange, and C code generation, And import it back to the OM environment, i see that after running, changing the value of parameter a does not affect the dynamics of the output y. It seems that either the parameter is not correctly set for the FMU or the value of the parameter is hardcoded to the default given value in the OM code.

In contrast, I have another model (shown in the link below) which uses the same parameter declarations, however when the FMU is created and simulated in OM environment, one could see that changing parameter a, directly affects the corresponding output, i.e. ya.

parameter-test---not-hardcoded.mo

How is it possible to have such a different behavior for setting parameters of the FMUs?

Thanks,
Arvin

Edited by: arvin_ttl - Sep-11-17 13:47:52
There are 0 guests and 0 other users also viewing this topic