Specific capability flags such as 'canGetAndSetFMUstate' and 'canSerializeFMUstate', are not directly accessible through a graphical user interface or a checkbox in Simulink. However there is an alternative way to achieve this. Firstly, you will need to export the FMU from Simulink.
- Open the model to export.
- Under Solver > Type, select "Fixed-step" for a Co-Simulation FMU or "Variable-step" for a Model Exchange FMU.
- From the Simulation tab, click the drop-down button for "Save".
- In the "Export Model To" section, click "Standalone FMU".
- Click "Create" to export to FMU.
After exporting the FMU, you can modify the capability flags by editing the "modelDescription.xml" file within the FMU.
- Rename the FMU file extension from .fmu to .zip.
- Open the "modelDescription.xml" file in a text editor and locate the <CoSimulation ...> element.
- There you will find the above-mentioned flags and you can modify them as per your usecase.
- After saving the changes, rename the file extension back to ".fmu".
Note that, modifying the FMU in this way is not recommended and may lead to some unexpected results in the workflow.