メインコンテンツ

getScenario

割り当てシナリオを取得

    説明

    scenario = getScenario(allocSet,name) は、与えられた名前 name の割り当てシナリオが割り当てセット allocSet に存在する場合、そのシナリオを取得します。

    すべて折りたたむ

    それぞれ 1 つのコンポーネントをもつ 2 つの新しいモデルを作成します。

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

    MyNewAllocation という名前の割り当てセットを作成します。

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

    既定の割り当てシナリオを取得します。

    defaultScenario = getScenario(allocSet,"Scenario 1")
    defaultScenario = 
    
      AllocationScenario with properties:
    
                 Name: 'Scenario 1'
          Description: ''
        AllocationSet: [1×1 systemcomposer.allocation.AllocationSet]
          Allocations: [0×0 systemcomposer.allocation.Allocation]
                 UUID: '6cde23e8-7c72-4fa0-8f51-e65290208564'

    入力引数

    すべて折りたたむ

    割り当てセット。systemcomposer.allocation.AllocationSet オブジェクトとして指定します。

    割り当てシナリオの名前。文字ベクトルまたは string として指定します。

    例: "Scenario 1"

    データ型: char | string

    出力引数

    すべて折りたたむ

    割り当てシナリオ。systemcomposer.allocation.AllocationScenario オブジェクトとして返されます。

    詳細

    すべて折りたたむ

    バージョン履歴

    R2020b で導入