-
Notifications
You must be signed in to change notification settings - Fork 69
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
Deal with models without Overwrite blocks #115
Comments
If models have no Overwrite blocks, the following error occur when parsing the model
A quick solution is to change line 157-160 of the parse
into
Not sure if other components have to be updated as well? @dhblum |
@SenHuang19 What do you think about just exporting the original model fmu, instead of writing what is essentially an empty wrapped.mo? I've implemented suggested code in #118. |
@dhblum The wrapped.mo may not be empty as there may be the "Modelica.Blocks.Interfaces.RealOutput"s for "out read". If we just export the original model fmu , the generated fmu is not capable with the BOPTEST APIs, right? |
When loaded into BOPTEST, any Modelica.Blocks.Interfaces.RealOutput or Modelica.Blocks.Interfaces.RealInput in the generated FMU will still be recognized by BOPTEST, and actually available for reading/writing. However, the default value of inputs will be 0 (unless otherwise specified with a start value in the model), they will not be associated with an activate/deactivate signal, and the outputs will not be linked to any KPI calculations unless the kpis.json is generated a different way. |
@dhblum thanks for clarifying this. It is my view that it is necessary to make sure the generated FMU can be supported by all the APIs including KPIs. |
The only issue I see here with the BOPTEST API is that using the Granted, if the |
Closed by #118. |
This issue is to deal with models without Overwrite blocks by modifying the parse function.
The text was updated successfully, but these errors were encountered: