Main Content

systemcomposer.allocation.createAllocationSet

Create new allocation set

Since R2020b

    Description

    allocSet = systemcomposer.allocation.createAllocationSet(name,sourceModel,targetModel) creates a new allocation set with the given name in which the source and target models are provided.

    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");

    Save the allocation set.

    save(allocSet)

    Open the Allocation Editor.

    systemcomposer.allocation.editor

    Input Arguments

    collapse all

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

    Example: "MyNewAllocation"

    Data Types: char | string

    Source model for allocation, specified as a systemcomposer.arch.Model object or the name of a model as a character vector or string.

    Data Types: char | string

    Target model for allocation, specified as a systemcomposer.arch.Model object or the name of a model as a character vector or string.

    Data Types: char | string

    Output Arguments

    collapse all

    Allocation set created, returned as a systemcomposer.allocation.AllocationSet object.

    More About

    collapse all

    Version History

    Introduced in R2020b