ghorwin / FMICodeGenerator

A Code Generator that creates native C/C++ code to build Functional Mock-Up Units (FMU) with support for FMI version 2.0 (rollback)
BSD 3-Clause "New" or "Revised" License
51 stars 25 forks source link

Dependency List Seems Wrong #49

Closed JiMa98 closed 5 months ago

JiMa98 commented 9 months ago

Hello, your project includes the ability to automatically generate Dependencies tags under the ModelStructure directory. However, I found that the project only associates all input variables with all output variables (because the dependList does not change during iteration to generate Dependencies), which seems to lead to incorrect dependency generation. Not all output variables depend on all input variables. I wonder if my understanding is correct. Can you answer my question?

ghorwin commented 5 months ago

Yes, you are correct. As the code generator does not know anything about the internal functionality of the FMU, the dependency list serves as template to be manually adjusted by the author of the FMI. Currently, the dependency list is very conservative and assumes, as you said, that ALL outputs depend on ALL inputs.

ghorwin commented 5 months ago

see added example P_Control_2inputs.input