simulinksolver

Unable to build a standalone executable to simulate the model '...' in rapid accelerator mode


I am trying to export a Simulink model (called "variableStepByHand") as a co-simulation standalone FMU. After typing the corresponding command:

exportToFMU2CS('variableStepByHand', 'CreateModelAfterGeneratingFMU', 'on');

I get the following error:

Unable to build a standalone executable to simulate the model 'variableStepByHand' in rapid accelerator mode.
Caused by:
    Error using simscape.engine.sli.dae.DaeCgSupport.support
    ['variableStepByHand/Subsystem/Solver Configuration']: Error opening
    'C:\Users\...\44425e75_dcdb_4be9_89d8_63fb166f08d0\slprj\raccel_deploy\variableStepByHand\variableStepByHand_ec9fa5b3_1_ds_dxm_p.h~'
    for writing: No such file or directory

I am pretty sure that this has something to do with the usage of the variable step solver. The mode is set to normal and not rapid accelerator, which isn't consistent with the error message.

It works fine if I export the model with using a fixed-step solver, but I need it to work with a variable step solver.


Solution

  • I found a solution myself: After observing that the procedure works in matlab online, I updated my own matlab (version is still 2023b). Now the export works.