simscape.op.Target

Variable initialization target object

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 Target objects, each target consisting of a variable value, unit, and initialization priority.

Creation

Description

example

t = simscape.op.Target() creates an empty Target object.

example

t = simscape.op.Target(value) creates a Target object with the Value property set to provided value.

example

t = simscape.op.Target(value, unit) creates a Target object with the Value property set to provided value and the Unit property set to provided unit expression.

example

t = simscape.op.Target(value, unit, priority) creates a Target object with the Value property set to provided value, the Unit property set to provided unit expression, and the Priority property set to provided variable initialization priority.

Properties

expand all

Variable initialization target value, specified as a scalar, vector, or matrix.

Example: 1.5

Data Types: double | int32

Physical unit expression, specified as a character vector or string scalar. The expression can consist of valid physical unit names, numbers, math operators, such as +, -, *, /, and ^, and parentheses to specify the order of operations.

Example: 'm/s^2'

Data Types: char | string

Variable initialization priority, specified as 'High', 'Low', or 'None'.

Data Types: char

Descriptive name of target variable, specified as a character vector or string scalar. If you create an operating point by extracting data from log or model, the extraction algorithms populate this target property with the user-friendly description of the variable. However, you do not have to set this property to be able to use the target for model initialization.

Data Types: char | string

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 properties:

    Description: ''
          Value: 1.5000
           Unit: 'V'
       Priority: 'High'
     Attributes: [0×1 containers.Map]

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:
  -----------------------------
   v0  1.5000|'V'  High
  -----------------------------

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

Introduced in R2017b