Main Content

simscape.op.OperatingPoint

Operating point object containing hierarchical target data for variable initialization

Description

OperatingPoint objects let you save sets of data necessary to initialize a model, manipulate this data, and then use it to initialize another model, or the same model before another simulation run. These sets of data contain a hierarchy of operating point targets, each target consisting of a variable value, unit, and initialization priority.

Creation

There are several ways to create an OperatingPoint object:

  • The simscape.op.OperatingPoint function (described here) creates an empty OperatingPoint object. You can then create Target objects and add them to the OperatingPoint.

  • Instead of adding targets one by one, you can create an OperatingPoint object by extracting data from an existing model or from logged simulation data, by using the simscape.op.create function.

Description

op = simscape.op.OperatingPoint creates an empty OperatingPoint object.

example

Properties

expand all

Simulink identifier (SID) of the OperatingPoint object, specified as a character vector or string scalar.

You do not have to set this property to be able to use an operating point for model initialization. In other words, you can initialize model A by using operating point B (or with an empty Identifier), as long as the OperatingPoint hierarchy matches the model.

For the relativePath function to work, the identifier of the operating point must match the name (SID) of the model. If you create an operating point by extracting data from log or model, the extraction algorithms set this property to match the SID of the model or block.

Names of the immediate children of the OperatingPoint object, specified as a cell array. These are the names of variables, blocks, or subsystems that comprise the next layer of the operating point hierarchy.

Immediate children of the OperatingPoint object, specified as a cell array. These are operating point nodes or targets that correspond to the child IDs.

Map of the OperatingPoint object attributes, specified as a character vector, string scalar, Boolean, or numeric, with the KeyType of char.

You can use these attributes to tag operating points and targets with useful metadata. If you create an operating point by extracting data from log or model, the extraction algorithms set the attributes, for example, a Boolean describing whether the target is differential or algebraic. Use this data for filtering out elements of interest.

Object Functions

setAdd or update element of operating point
getAccess element of operating point data tree
relativePathGet path to node associated with block or subsystem
hasPathDetermine whether operating point data contains element at specified path
removeRemove element from operating point
moveMove element from one path to another
mergeCreate operating point by merging data from two operating points
hasPrivateDataDetermine whether operating point data contains private data elements
removePrivateDataRemove private data elements from operating point

Examples

collapse all

Create an empty OperatingPoint object named op:

op = simscape.op.OperatingPoint
op = 

  OperatingPoint with no children.

Create a Target object named t, consisting of a variable value, unit, and initialization priority:

 t = simscape.op.Target(1.5, 'V', 'High')
t = 

  Target with fields:

        Value: 1.5000 : V
     Priority: High
   Attributes: containers.Map
  Description:

Add the target t to the operating point op by assigning this target to the variable named v0:

op = set(op, 'v0', t)
op = 
  OperatingPoint with children:

  Targets:

   ChildId   Value  Unit  Priority
   _______  ______  ____  ________

   'v0'     1.5000  'V'     'High'

You can create other Target objects or OperatingPoint objects and add them as children to the operating point op.

Version History

Introduced in R2017b