Simulink.op.ModelOperatingPoint
Complete information that represents model operating point in simulation
Description
A Simulink.op.ModelOperatingPoint
object contains a complete
representation of a model operating point that you can use to specify the initial state for a
simulation. For example, when you run a set of simulations for a model of a system that has a
startup phase or initialization behavior, you can simulate the model through the end of the
startup or initialization phase once, save the model operating point, then run a set of
simulations that use the operating point as the initial state. If you do not modify the model,
simulating a model using a Simulink.op.ModelOperatingPoint
object as the
initial state produces the same results as a simulation with no initial state
specified.
The operating point for a model represents the model state in simulation, including logged block states, hidden block states, the state of the solver and execution engine, and output values for some blocks. For more information, see Use Model Operating Point for Faster Simulation Workflow.
Creation
A model configured to save the final operating point creates a
Simulink.op.ModelOperatingPoint
object when the simulation completes or
when you pause or stop the simulation. To configure a model to save the final operating point:
On the Modeling tab, click Model Settings.
In the Configuration Parameters dialog box, select Data Import/Export.
Select Final states and Save final operating point.
By default, the Simulink.op.ModelOperatingPoint
object is saved using a
variable called xFinal
. To save the operating point using a different
variable name, specify the variable name you want to use in the Final
states text box.
When you return simulation results using a single simulation output, the
Simulink.op.ModelOperatingPoint
object is returned as part of the Simulink.SimulationOutput
object that contains all the simulation data.
Properties
Object Functions
Examples
Tips
When you load an operating point as the initial state for a simulation, the software disables the Block reduction parameter for the model. For best results, clear the Block reduction parameter before running a simulation in which you save a model operating point. If the Block reduction parameter was enabled when the operating point object was saved, you might not be able to load the operating point.
When you use a model operating point as the initial state for a simulation that uses a fixed-step solver with the Fixed-step size (fundamental sample time) parameter set to
auto
, the software uses the fixed step size saved in the model operating point object.When you use a model operating point as the initial state for a simulation that uses a variable-step solver with the Max step size parameter set to
auto
, the software uses the maximum step size saved in the model operating point object.