-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change parameter values using replaceSubModel in OMSimulator Python #1262
Comments
@njsaisashank the API is working as expected, you cannot see the new replaced values because of the
And this is the reason the new values are not updated, I hope you set this values using I made a minimal example where you can see the new start values gets updated in the replaced fmus, I just extracted your ssp and made this example
Output
Example for priority values in
Output
|
@njsaisashank the meaning for dry is
But i also found that there is a bug if we directly replace the submodel from memory without exporting to the ssp. The priority set by user is not taken into account see below
|
@arun3688 I have actually created the ssp using the OMEdit. Does it mean that OMEdit uses the set_real API by default? If so, are there any settings I could change so that it doesn't do it? |
@njsaisashank no OMEdit internally calls
So this is how it works, and by default if nothing is set by the user or value is not modified, then the default values does not come in |
@njsaisashank I tested the example with OMEdit and i found that if you just opened the parameter dialogue of an fmu and even if you don't change any values it gets updated in the ssd file which should not be the case and that is why there is a difference from the command line and OMEdit, this need to be fixed in OMEdit |
Yes, I think that is the case. I think it would work only if the fmus are added and connections are given and saved without modifying anything else. |
Anyway, thanks a lot for the help. |
@njsaisashank this commit #1264 will fix the However still the OMEdit issue exists and we will try to fix it |
@arun3688 I have opened an issue in the OMSimulator repository like you mentioned and also I am sharing the ssp file, the python script and also the fmu file that needs to be replaced for your reference. Please look into it.
replaceSubModel.zip
The text was updated successfully, but these errors were encountered: