Main Content

Simscape Pane: General

Simscape Pane Overview

The Editing Mode parameter controls the Simscape™ Editing Mode functionality, which allows you to open, simulate, and save models that contain blocks from add-on products in Restricted mode, without checking out add-on product licenses, as long as the products are installed on your machine. Simscape add-on products include Simscape Driveline™, Simscape Electrical™, Simscape Fluids™, and Simscape Multibody™. Use this functionality to perform multidomain physical modeling and simulation while minimizing the number of required licenses.

Note

Unless your organization uses concurrent licenses, see the Simscape product page on the MathWorks Web site for specific information on how to install add-on products on your machine, to be able to work in Restricted mode.

The parameters in the Physical Networks Model-Wide Simulation Diagnostics section let you configure your preferences for solver-related warnings when you simulate models containing blocks from Simscape libraries.

The parameters in the System Scaling section let you apply scaling to model variables individually, based on their expected magnitude, and specify model-wide nominal values.

The parameters in the Data Logging section let you log simulation data to workspace.

The parameters in the Operating Point section let you initialize model from a previously saved operating point.

Configuration

This pane appears only if your model contains a block from the Simscape libraries (including Simscape add-on products).

See Also

Editing Mode

Set the editing mode of the model to either Full or Restricted.

Settings

Default: Full

Full

Sets the editing mode of the model to Full. In this mode, you can make any modifications to the model.

When you open a model in Full mode, the license manager checks out all the add-on product licenses for the blocks present in the model.

When you switch from Restricted to Full mode, the license manager checks whether the required add-on product licenses are available and checks them out. If some of the add-on product licenses are not available, the license manager issues an error and the model stays in Restricted mode.

Restricted

Sets the editing mode of the model to Restricted. In this mode, you can simulate the model, generate code, and make limited modifications.

When you open a model in Restricted mode, the license manager does not check out the add-on product licenses.

When you switch from Full to Restricted mode, all the add-on product licenses for the blocks present in the model remain checked out until the end of the MATLAB® session.

Command-Line Information

Parameter: EditingMode
Type: character vector
Value: 'Full' | 'Restricted'
Default: 'Full'

See Also

Explicit solver used in model containing Physical Networks blocks

Specify whether or not the system will issue a warning or error upon simulation if the model uses an explicit solver.

Settings

Default: warning

warning

Makes the system issue a warning upon simulation if the model uses an explicit solver.

It is possible to choose any variable-step or fixed-step solver for models containing Simscape blocks. When you first create a model, the default Simulink® solver is ode45. However, implicit solvers, such as ode14x, ode23t, and ode15s, are a better choice for a typical model. In particular, for stiff systems, implicit solvers typically take many fewer timesteps than explicit solvers, such as ode45, ode113, and ode1. To alert you to a potential issue, the system issues a warning when you use an explicit solver in a model containing Simscape blocks.

error

Makes the system issue an error upon simulation if the model uses an explicit solver.

If your model is stiff, and the use of explicit solvers undesirable, you may choose to select this option to avoid troubleshooting errors in the future.

none

Turns off issuing a warning or error upon simulation with explicit solver.

For models that are not stiff, explicit solvers can be effective, often taking fewer timesteps than implicit solvers. If you work with such models and use explicit solvers, select this option to turn off the warning upon simulation.

Command-Line Information

Parameter: ExplicitSolverDiagnosticOptions
Type: character vector
Value: 'warning' | 'error' | 'none'
Default: 'warning'

See Also

Switching from the Default Explicit Solver to Other Simulink Solvers

Zero-crossing control is globally disabled in Simulink

Specify whether or not the system will issue a warning or error upon simulation if the Zero-crossing control parameter in the Solver pane is set to Disable all, which means that zero-crossing control is globally disabled.

Settings

Default: warning

warning

Makes the system issue a warning upon simulation if zero-crossing control is globally disabled.

error

Makes the system issue an error upon simulation if zero-crossing control is globally disabled.

Command-Line Information

Parameter: GlobalZcOffDiagnosticOptions
Type: character vector
Value: 'warning' | 'error'
Default: 'warning'

See Also

Enabling or Disabling Simulink Zero-Crossing Detection

Normalize using nominal values

Specify whether or not to scale the system based on nominal values.

Settings

Default: off

On

Applies scaling by nominal values. To view, add, and edit the value-unit pairs for the model, click the Specify nominal values button.

Off

Does not apply scaling by nominal values.

Command-Line Information

Parameter: SimscapeNormalizeSystem
Type: character vector
Value: 'on' | 'off'
Default: 'on'
Parameter: SimscapeNominalValues
Type: array of character vectors
Value: array of value-unit pairs
Default: '[{"value":"1","unit":"A"},{"value":"1","unit":"bar"},{"value":"1","unit":"cm^2"},{"value":"1","unit":"cm^3/s"},{"value":"1","unit":"kJ/kg"},{"value":"1","unit":"kW"},{"value":"1","unit":"l"},{"value":"1","unit":"N"},{"value":"1","unit":"N*m"},{"value":"1","unit":"V"}]'

See Also

System Scaling by Nominal Values

Log simulation data

Specify whether or not the system logs simulation data to workspace.

Settings

Default: None

None

Performs no data logging upon simulation.

All

Upon simulating the model, logs simulation data from all the Simscape blocks in the model to a workspace variable specified by the Workspace variable name parameter.

Use local settings

Upon simulating the model, logs simulation data from selected Simscape blocks only to a workspace variable specified by the Workspace variable name parameter. If using this setting, you have to select blocks for data logging prior to simulating the model, otherwise no data will be logged.

Command-Line Information

Parameter: SimscapeLogType
Type: character vector
Value: 'none' | 'all' | 'local'
Default: 'none'

See Also

Data Logging

Log simulation statistics

Specify whether to log simulation statistics as part of simulation data.

Settings

Default: off

On

Logs simulation statistics.

Off

Does not log simulation statistics.

Command-Line Information

Parameter: SimscapeLogSimulationStatistics
Type: character vector
Value: 'on' | 'off'
Default: 'off'

See Also

Data Logging

Record data in Simulation Data Inspector

Specify whether to stream the data to Simulation Data Inspector, which allows you to view the data during and after simulation.

Settings

Default: off

On

Streams the data to Simulation Data Inspector. When you simulate the model, as soon as the streamed data becomes available, the Simulation Data Inspector button in the model toolbar highlights. Open the Simulation Data Inspector to view the data during simulation and to compare data for different simulation runs.

Off

Does not stream the data to Simulation Data Inspector.

Tip

This option lets you view the data both during and after the simulation. The Record logged workspace data in Simulation Data Inspector option on the Data Import/Export pane of the Configuration Parameters dialog box lets you view the logged Simscape data in the Simulation Data Inspector only after the simulation is over.

Command-Line Information

Parameter: SimscapeLogToSDI
Type: character vector
Value: 'on' | 'off'
Default: 'off'

See Also

About Simscape Data Logging

Open viewer after simulation

Specify whether to open Simscape Results Explorer at the end of simulation run.

Settings

Default: off

On

Automatically opens Simscape Results Explorer at the end of simulation run. If there is an open Simscape Results Explorer window linked to the session, reloads the simulation data into this window at the end of simulation run.

Off

Does not open Simscape Results Explorer automatically.

Tip

If the Record data in Simulation Data Inspector check box is also selected, then the Simulation Data Inspector opens instead of the Simscape Results Explorer.

Command-Line Information

Parameter: SimscapeLogOpenViewer
Type: character vector
Value: 'on' | 'off'
Default: 'off'

See Also

Data Logging

Workspace variable name

Specify the name of the workspace variable for simulation data logging.

Settings

Default: simlog

  • The default value logs all the simulation data to a workspace variable named simlog.

  • You can specify any other valid character vector as the workspace variable name.

Command-Line Information

Parameter: SimscapeLogName
Type: character vector
Value: any valid value
Default: 'simlog'

See Also

Data Logging

Decimation

Lets you limit data points being logged, by skipping time steps. Logs data points for the first time step and every nth time step thereafter, where n is the decimation factor.

Settings

Default: 1

  • The default value logs simulation data for each step.

  • You can specify any other positive integer number. For example, specifying 2 logs data points for every other time step, while specifying 10 logs data points for just one in ten steps.

Tips

  • Saving data to workspace can slow down the simulation and consume memory. Use this parameter to limit the number of data points saved.

  • Another way to limit the number of data points saved is using the Limit data points check box in conjunction with the Data history (last N steps) parameter. The two methods work independently from each other and can be used separately or together.

Command-Line Information

Parameter: SimscapeLogDecimation
Type: numeric
Value: any positive integer value
Default: 1

See Also

Data Logging

Limit data points

Specify that the number of data points logged to workspace is limited to the value corresponding to the number of simulation steps specified by the Data history (last N steps) parameter.

Settings

Default: on

On

Limits the number of data points exported to workspace to those for the number of steps specified by the Data history (last N steps) parameter.

Off

Does not limit the number of data points.

Tips

  • Saving data to workspace can slow down the simulation and consume memory. Use this parameter to limit the number of data points saved.

  • Another way to limit the number of data points saved is using the Decimation parameter. The two methods work independently from each other and can be used separately or together.

  • You must select the Limit data points check box before specifying the number of steps in the Data history (last N steps) parameter.

Command-Line Information

Parameter: SimscapeLogLimitData
Type: character vector
Value: 'on' | 'off'
Default: 'on'

See Also

Data Logging

Data history (last N steps)

Specify the number of simulation steps to limit the number of data points output to workspace. The workspace variable defined by the Workspace variable name parameter contains the data points corresponding to the last N steps of the simulation, where N is the value you specify for the Data history (last N steps) parameter. If the simulation contains fewer steps than the number specified, the workspace variable contains the data points for the whole simulation.

Settings

Default: 5000

  • The default value logs simulation data for the last 5000 steps.

  • You can specify any other positive integer number.

Tips

  • Saving data to workspace can slow down the simulation and consume memory. Use this parameter to limit the number of data points saved.

  • You must select the Limit data points check box before specifying the number of steps in the Data history (last N steps) parameter.

Command-Line Information

Parameter: SimscapeLogDataHistory
Type: numeric
Value: any positive integer value
Default: 5000

See Also

Data Logging

Enable operating point initialization

Specify whether to use operating point data to initialize the model.

Settings

Default: off

On

Initialize model from previously saved operating points.

Off

Do not use operating points to initialize the model.

Command-Line Information

Parameter: SimscapeUseOperatingPoints
Type: character vector
Value: 'on' | 'off'
Default: 'off'

See Also

Using Operating Point Data for Model Initialization

Model operating point

Specify the name of the operating point to use for model initialization.

Settings

Default: none

  • There is no default value.

  • Specify name of a workspace variable that contains operating point data.

Command-Line Information

Parameter: SimscapeOperatingPoint
Type: character vector
Value: any valid value
Default: none

See Also

Using Operating Point Data for Model Initialization

Reuse components during compilation

Specify whether to enable scalable and incremental compilation for the model. Scalable compilation helps reduce compilation time for models that consist of a pattern of repeated components, such as transmission lines or battery packs, by compiling a repeated component once and then reusing these compilation artifacts for other instances of the same component. Incremental compilation reduces compilation time for subsequent simulations within the same MATLAB session by recompiling only those reusable components that have changed. This optimization applies to all the reusable blocks and subsystems in the model, independent of whether there are multiple instances or just a single instance.

Settings

Default: off

On

Use scalable and incremental compilation. Compile each reusable component once and then reuse these compilation artifacts for other instances of the same component in the model. For subsequent compilations, do not recompile reusable components if they are unchanged.

Off

Do not use scalable or incremental compilation. Use the regular model compilation algorithms.

Command-Line Information

Parameter: SimscapeCompileComponentReuse
Type: character vector
Value: 'on' | 'off'
Default: 'off'

See Also

Enable Component Reuse During Compilation

Enable multithreaded compilation

Specify whether to enable multithreaded compilation for the model. This parameter is enabled by default. However, if you require single-thread compilation, such as when you are profiling the compilation performance of a model over multiple runs and want to get comparable results, you can disable multithreaded compilation for the model.

Settings

Default: on

On

Use multithreaded compilation. Compile different reusable components on separate threads of a multicore machine.

Off

Do not use multithreaded compilation. Compile all components on a single thread.

Command-Line Information

Parameter: SimscapeMultithreadedCompilation
Type: character vector
Value: 'on' | 'off'
Default: 'on'

See Also

Enable Component Reuse During Compilation