Skip to content
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

Cosim Unable to Locate .res File in FMU Resources Folder #774

Open
vegetableno1 opened this issue Sep 16, 2024 · 2 comments
Open

Cosim Unable to Locate .res File in FMU Resources Folder #774

vegetableno1 opened this issue Sep 16, 2024 · 2 comments

Comments

@vegetableno1
Copy link

Hello,

Cosim has been very helpful and has solved many of my problems. However, I encountered an issue during my usage and would appreciate some assistance in resolving it.

When I load an FMU that contains a .res file in the resources folder, I found that Cosim is unable to correctly locate this file. I would like to know if I need to make any modifications to the fmu.cpp file in libcosim. If so, could you please guide me on how to make the necessary changes?
image

Thank you!

@davidhjp01
Copy link
Contributor

Can you elaborate a bit when you are trying to load the .res file? libcosim should pass the path to the resource directory during initialization phase where you can store this in memory and use the path to the .res file as needed.

@restenb
Copy link
Member

restenb commented Oct 2, 2024

When instantiating with fmuResourceLocation=nullptr, FMI2 at least should revert to the standard /resources folder. But libcosim does not do anything to load resource files, so I don't quite understand what you mean by 'Cosim is unable to correctly locate this file'.

Note that I believe this changed in FMI1, FMI2, and possibly FMI3, so you want to check against the spec of the FMI version you're using what the expected behavior for nullptr argument is. See discussion on modelica/fmi-standard#1030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants