Main Content

refresh

Refresh architecture instance

Description

refresh(instance) refreshes an architecture instance instance to mirror the changes in the specification model. The refresh method is part of the systemcomposer.analysis.ArchitectureInstance class.

Note

This function is part of the instance programmatic interfaces that you can use to analyze the model iteratively, element-by-element. The instance refers to the element instance on which the iteration is being performed.

example

Examples

collapse all

Refresh an architecture instance to mirror the changes in the specification model.

Create a profile for latency characteristics and save it.

profile = systemcomposer.profile.Profile.createProfile("LatencyProfile");

latencybase = profile.addStereotype("LatencyBase");
latencybase.addProperty("latency",Type="double");
latencybase.addProperty("dataRate",Type="double",DefaultValue="10");

connLatency = profile.addStereotype("ConnectorLatency",...
Parent="LatencyProfile.LatencyBase");
connLatency.addProperty("secure",Type="boolean");
connLatency.addProperty("linkDistance",Type="double");

nodeLatency = profile.addStereotype("NodeLatency",...
Parent="LatencyProfile.LatencyBase");
nodeLatency.addProperty("resources",Type="double",DefaultValue="1");

portLatency = profile.addStereotype("PortLatency",...
Parent="LatencyProfile.LatencyBase");
portLatency.addProperty("queueDepth",Type="double");
portLatency.addProperty("dummy",Type="int32");

profile.save

Instantiate all stereotypes in a profile.

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
instance = instantiate(model.Architecture,"LatencyProfile","NewInstance");

Apply the profile to the model. Apply the stereotype to the architecture.

model.applyProfile("LatencyProfile");
model.Architecture.applyStereotype("LatencyProfile.LatencyBase");

Refresh the architecture instance according to the specification model. Get the default value for the "dataRate" property on the architecture instance.

instance.refresh;
value = instance.getValue("LatencyProfile.LatencyBase.dataRate")
value =

    10

Input Arguments

collapse all

Architecture instance to be refreshed, specified as a systemcomposer.analysis.ArchitectureInstance object.

More About

collapse all

Definitions

TermDefinitionApplicationMore Information
analysis

Analysis is a method for quantitatively evaluating an architecture for certain characteristics. Static analysis analyzes the structure of the system. Static analysis uses an analysis function and parametric values of properties and parameters captured in the system model.

Use analyses to calculate overall reliability, mass roll-up, performance, or thermal characteristics of a system, or to perform a size, weight, and power (SWaP) analysis to increase efficiency.

analysis function

An analysis function is a MATLAB® function that computes values necessary to evaluate the architecture using the properties of each element in the model instance and instance-specific parameters on the component and architecture level.

Use an analysis function to calculate the result of an analysis.

instance model

An instance model is a collection of instances.

You can update an instance model with changes to a model, but the instance model will not update with changes in active variants or model references. You can use an instance model, saved in a MAT file, of a System Composer™ architecture model for analysis.

Run Analysis Function
instance

An instance is an occurrence of an architecture model element at a given point in time.

An instance freezes the active variant or model reference of the component in the instance model.

Create a Model Instance for Analysis

Version History

Introduced in R2019a