How can I continue a Simscape simulation after altering some blockparameters?
Hi,
I am using fast restart to run Simscape model. I have the initial states of the blocks as block parameters defined in the matlab workspace. I would like to change certain parameters (say change the pressure at one point to a higher value) to simulate an external event and continue the simulation without altering rest of the system state. Preferably using fast restart. What is the cleanest way to achieve this? Is is possible to reinitialize just a single block using setBlockParameter() function and contine the simulation?
I have tried:
Run simulation -> save state -> change blockparameters (structs defined in workspace) -> load state ->run.
This doesnt work as I get the following error:
‘Simulink cannot load the initial operating point because the model, ‘model..’, was changed after the operating point was saved. Run the simulation again and resave the operating point.’
I already verified that the struct that is being changed is of the same dimensions and datatype after, just their numerical values are changed.Hi,
I am using fast restart to run Simscape model. I have the initial states of the blocks as block parameters defined in the matlab workspace. I would like to change certain parameters (say change the pressure at one point to a higher value) to simulate an external event and continue the simulation without altering rest of the system state. Preferably using fast restart. What is the cleanest way to achieve this? Is is possible to reinitialize just a single block using setBlockParameter() function and contine the simulation?
I have tried:
Run simulation -> save state -> change blockparameters (structs defined in workspace) -> load state ->run.
This doesnt work as I get the following error:
‘Simulink cannot load the initial operating point because the model, ‘model..’, was changed after the operating point was saved. Run the simulation again and resave the operating point.’
I already verified that the struct that is being changed is of the same dimensions and datatype after, just their numerical values are changed. Hi,
I am using fast restart to run Simscape model. I have the initial states of the blocks as block parameters defined in the matlab workspace. I would like to change certain parameters (say change the pressure at one point to a higher value) to simulate an external event and continue the simulation without altering rest of the system state. Preferably using fast restart. What is the cleanest way to achieve this? Is is possible to reinitialize just a single block using setBlockParameter() function and contine the simulation?
I have tried:
Run simulation -> save state -> change blockparameters (structs defined in workspace) -> load state ->run.
This doesnt work as I get the following error:
‘Simulink cannot load the initial operating point because the model, ‘model..’, was changed after the operating point was saved. Run the simulation again and resave the operating point.’
I already verified that the struct that is being changed is of the same dimensions and datatype after, just their numerical values are changed. simscape, fastrestart, simulink MATLAB Answers — New Questions