MATLAB: Am I unable to create a model reference from a model that contains blocks from the SimPowerSystems blockset in SimPowerSystems 5.2 (R2009b)

inline()sfunctionSimscape Electricalspstlc

I have a model that contains blocks from the SimPowerSystems blockset. I would like to use that model as a model reference in another model. However, this is not possible since the S-functions in SimPowerSystems are not inlined. Consequently, I obtain an error when I attempt to build code for model reference:
Error using ==> rtwgen
Cannot generate reusable model reference target for model spstest. The S-Function block 'spstest/powergui/EquivalentModel1/State-Space' does not support code reuse. The block (a) should have a TLC implementation (b) should set the option ''SS_OPTION_USE_TLC_WITH_ACCELERATOR' and (c) should set the option 'SS_OPTION_WORKS_WITH_CODE_REUSE'.
Alternatively, you can update the "Total number of instances allowed per top model" parameter, in the 'Model Referencing' page of the Configuration Parameters dialog, to "One".

Best Answer

The ability to simulate a referenced model in "Accelerator" or "Rapid Accelerator" mode is not available with SimPowerSystems.
To work around this issue, always simulate referenced models in "Normal" mode.