open-simulation-platform / libcosim

OSP C++ co-simulation library
https://open-simulation-platform.github.io/libcosim
Mozilla Public License 2.0
55 stars 10 forks source link

Models with OspModelDescription files and equal model description names cannot be used with fmu-proxy #685

Closed msteinsto closed 2 years ago

msteinsto commented 2 years ago

It is currently not possible to use multiple models with equal model description names while using proxy-fmu. OspModelDescription files are required to be located in the same directory as the OspSystemStructure file. Names of the OspModelDescription files are currently set to use the model description name in the file name. Equal file names in the same folder will cause an overwrite and potential description mismatch.

URI with scheme of "file" allows the OspModelDescription file to be located in the same directory as the fmu file. If the OspModelDescription file does not exists in the same folder as the fmu, the OspSystemStructure parent path is checked for any OspModelDescription file.

msteinsto commented 2 years ago

PR #688 closes the issue by allowing the OspModelDescription file to be located in the same folder as the fmu file. Similar to for file URI scheme, the path of the fmu is first checked for any OspModelDescription files before checking the parent folder of OspSystemStructure.