close - Close allocation set - MATLAB (original) (raw)
Main Content
Close allocation set
Since R2020b
Syntax
Description
close([allocSet](#mw%5F91764c4d-60db-48f5-8b59-6ec1ec734bf4%5Fsep%5Fmw%5F2aa43e21-d9fc-4e02-9769-d431e582562f),[force](#mw%5Febc4b9e8-9dce-4ea1-bba6-6d338a02faeb))
closes the allocation set allocSet
. If there are any unsaved changes, you will receive an error unless the argument force
istrue
.
Tip
Use closeAll to close all loaded allocation sets.
Examples
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");
Allocate components between models.
allocation = allocate(defaultScenario,sourceComp,targetComp);
Close the allocation set without saving.
Open the Allocation Editor.
systemcomposer.allocation.editor
Input Arguments
Force close allocation set, specified as 1
(true
) or 0
(false
).
Data Types: logical
More About
Version History
Introduced in R2020b
See Also
Tools
Blocks
Objects
- systemcomposer.allocation.Allocation | systemcomposer.allocation.AllocationScenario | systemcomposer.allocation.AllocationSet
Functions
- systemcomposer.allocation.createAllocationSet | systemcomposer.allocation.load | systemcomposer.allocation.open | systemcomposer.allocation.editor | systemcomposer.allocation.AllocationSet.closeAll | systemcomposer.allocation.AllocationSet.find | save | rebindSourceModel | rebindTargetModel | synchronizeChanges | createScenario | deleteScenario | getScenario | allocate | deallocate | getAllocation | getAllocatedFrom | getAllocatedTo | destroy