deleteScenario - Delete allocation scenario - MATLAB (original) (raw)

Main Content

Delete allocation scenario

Since R2020b

Syntax

Description

deleteScenario([allocSet](#mw%5F4e21779c-0b8d-43c9-9716-90c2ff54963b%5Fsep%5Fmw%5F2aa43e21-d9fc-4e02-9769-d431e582562f),[name](#mw%5F4e21779c-0b8d-43c9-9716-90c2ff54963b%5Fsep%5Fmw%5Fb5f5a55e-7349-44a5-9ee6-66b747ec0595)) deletes the allocation scenario in the set allocSet with the given namename.

example

Examples

collapse all

Create two new models with one component each.

mSource = systemcomposer.createModel("Source_Model_Allocation"); systemcomposer.openModel("Source_Model_Allocation"); sourceComp = addComponent(get(mSource,"Architecture"),"Source_Component"); mTarget = systemcomposer.createModel("Target_Model_Allocation"); systemcomposer.openModel("Target_Model_Allocation"); targetComp = addComponent(get(mTarget,"Architecture"),"Target_Component");

Create an allocation set named MyNewAllocation.

allocSet = systemcomposer.allocation.createAllocationSet("MyNewAllocation",... "Source_Model_Allocation","Target_Model_Allocation");

Get the default allocation scenario.

defaultScenario = getScenario(allocSet,"Scenario 1");

Create a new allocation scenario.

newScenario = createScenario(allocSet,"Scenario 2");

Delete the default allocation scenario.

deleteScenario(allocSet,"Scenario 1");

Save the allocation set.

Open the Allocation Editor.

systemcomposer.allocation.editor

Input Arguments

collapse all

Name of allocation scenario, specified as a character vector or string.

Example: "Scenario 1"

Data Types: char | string

More About

Version History

Introduced in R2020b

See Also

Tools

Blocks

Objects

Functions

Topics