Main Content

systemcomposer.allocation.AllocationSet.find

Find loaded allocation set

Since R2020b

    Description

    allocSet = systemcomposer.allocation.AllocationSet.find(name) finds a loaded allocation set in the global name space with the given name name.

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

    Find the allocation set.

    allocSetFind = systemcomposer.allocation.AllocationSet.find("MyNewAllocation")
    allocSetFind = 
    
      AllocationSet with properties:
    
                Name: 'MyNewAllocation'
         Description: ''
           Scenarios: [1×1 systemcomposer.allocation.AllocationScenario]
               Dirty: 1
        NeedsRefresh: 0
                UUID: '96e34f0d-fceb-4fb0-872d-2e588308d0e9'
         SourceModel: [1×1 systemcomposer.arch.Model]
         TargetModel: [1×1 systemcomposer.arch.Model]

    Input Arguments

    collapse all

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

    Example: "MyNewAllocation"

    Data Types: char | string

    Output Arguments

    collapse all

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

    More About

    collapse all

    Version History

    Introduced in R2020b