Hello 敦,
The error you're encountering when running a Simulink model with an FMU in Ubuntu suggests a disruption in the connection to a process associated with the FMU. Here are the potential causes for this error and the steps to address them:
The error may indicate that a MATLAB session is not available for co-simulation. To resolve this:
- Open a new instance of MATLAB.
- Run the command "shareMATLABForFMUCoSim" in the MATLAB command window.
- Return to the original MATLAB instance and import the FMU model again.
The FMU model may depend on a dynamic library that is not found in the expected location. To resolve this:
- Ensure that the required dynamic library (e.g., AMELic170) is present in the system's library path or the model's working directory.
Incorrect FMU Export: An improperly exported FMU can result in simulation errors. To resolve this:
- Verify that the FMU model is exported correctly with all necessary files included.
- Re-export the FMU if necessary, ensuring that the export process completes without errors.
By following these steps, you should be able to address the error and successfully run your Simulink model with the FMU on your Ubuntu virtual environment.
Reference: https://www.mathworks.com/help/simulink/slref/sharematlabforfmucosim.html.