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

Issue exporting FMU from Open Modelica OMEdit to Unreal 5.3.2 #28

Open
sebzuddas opened this issue Mar 15, 2024 · 2 comments
Open

Issue exporting FMU from Open Modelica OMEdit to Unreal 5.3.2 #28

sebzuddas opened this issue Mar 15, 2024 · 2 comments

Comments

@sebzuddas
Copy link

I managed to install and use the plugin in UE 5.3.2, but currently the FMU's I'm exporting from OMEdit are throwing errors.
I came to understand that there were two types of FMU's, co-simulation and model exchange. Co-simulation exports the solver alongside the model, whereas model exchange relies on the destination software to have its own solver. I'm suspecting this is the issue, however I cannot say for sure.

difference between co-simulation and model exchange

KERNELBASE
VCRUNTIME140
UnrealEditor_UEFMI!fmikit::FMU::error() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\ThirdParty\fmikit\src\FMU.cpp:203]
UnrealEditor_UEFMI!fmikit::FMU::FMU() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\ThirdParty\fmikit\src\FMU.cpp:168]
UnrealEditor_UEFMI!fmikit::FMU2::FMU2() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\ThirdParty\fmikit\src\FMU2.cpp:25]
UnrealEditor_UEFMI!fmikit::FMU2Slave::FMU2Slave() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\ThirdParty\fmikit\src\FMU2.cpp:197]
UnrealEditor_UEFMI!std::make_unique<fmikit::FMU2Slave,char *,char *,char *,char *,0>() [C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\INCLUDE\memory:3434]
UnrealEditor_UEFMI!AA_FMU::Initialize() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\Private\A_FMU.cpp:113]
UnrealEditor_UEFMI!AA_FMU::BeginPlay() [C:\dev\digital_twins\latest_engine_test\Plugins\UEFMI\Source\UEFMI\Private\A_FMU.cpp:100]
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_Engine
UnrealEditor_Engine
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll
@greenwoodms06
Copy link
Collaborator

I can't speak to OMEdits FMUs. The UE plugin is for co-simulation only. If the FMU doesn't work then openmodelica may not be creating a completely FMI compliant FMU ( I have seen that from various FMI tools before). To check, if it works in FMpy (e.g., the gui reference on their github) then it should work using the UE plugin.

@sebzuddas
Copy link
Author

Yes seems like an OMEdit problem. When I run using FMpy I get the following error:

Failed to load shared library C:\Users\szuddas\AppData\Local\Temp\tmpwcbim2gy\binaries\win64\unreal_test.dll. Could not find module 'C:\Users\szuddas\AppData\Local\Temp\tmpwcbim2gy\binaries\win64\unreal_test.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Then if I import the FMU that OMEdit exported, I get this problem:

[unreal_fmu: 62:7-62:37]: [Operator reinit may not be used in an algorithm section (use translation flag --allowNonStandardModelica=reinitInAlgorithms to ignore).](omeditmessagesbrowser:///unreal_fmu?lineNumber=62)

Will keep the thread updated if I find a solution.

@sebzuddas sebzuddas changed the title Can we get an explanation on how to export our FMU's to be compatible with Unreal? Issue exporting FMU from Open Modelica OMEdit to Unreal 5.3.2 Mar 15, 2024
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

2 participants