rtw.codegenObjectives.Objective

Class: rtw.codegenObjectives.Objective
Package: rtw.codegenObjectives

Create custom code generation objectives

Syntax

obj = rtw.codegenObjectives.Objective('objID')
obj = rtw.codegenObjectives.Objective('objID', 'base_objID')

Description

obj = rtw.codegenObjectives.Objective('objID') creates an objective object, obj.

obj = rtw.codegenObjectives.Objective('objID', 'base_objID') creates an object, obj, for a new objective that is identical to an existing objective. You can then modify the new objective to meet your requirements.

Input Arguments

objID

A permanent, unique identifier for the objective.

  • You must have

    objID.

  • The value of objID must remain constant.

  • When you refresh your customizations, if objID is not unique, Simulink® generates an error.

base_objID

The identifier of the objective that you want to base the new objective on.

Examples

Create a new objective:

obj = rtw.codegenObjectives.Objective('ex_ram_1');

Create a new objective based on the existing Execution efficiency objective:

obj = rtw.codegenObjectives.Objective('ex_my_efficiency_1', 'Execution efficiency');