rea-analysis-optimization
MOmorluto/rea485k近 7 天新增 7,690 个 star
Build and refine multi-layer (functional/logical/physical) system architecture models with System Composer. Use when building or restructuring architecture models, or when working with interface dictionaries and port interfaces (including composite boundary ports), stereotypes and profiles, architecture views, sequence diagrams, allocation sets, roll-up analysis, or requirements traceability for architecture components.
CRITICAL RULE — PHASE GATE: When building multiple architecture layers, you MUST stop after completing each layer and ask the user for review and approval before starting the next layer. Do NOT build Logical until the user approves Functional. Do NOT build Physical until the user approves Logical. This applies even when the user says "automatically continue" or "build all layers." When you stop, outline the remaining roadmap (e.g., "Next: Logical layer, then Physical layer and allocation sets") and ask for the user's approval to proceed.
Create and refine System Composer architecture models — from greenfield F/L/P designs to targeted additions (stereotypes, views, allocation sets, requirements tracing).
building-simulink-models.building-simulink-models with model_editspecifying-mbd-algorithms to produce a spec first, then return here to buildreferences/system-composer-api.md § Sequence Diagrams.)F/L/P = 3 separate Architecture models. There are no special model types (systemcomposer.createFunctionalModel does not exist). Layers are a convention — three independent .slx models connected by allocation sets.
Layer conventions:
SenseState, ComputeControl), abstract interfaces, no unitsSensingUnit, ControlUnit), typed signals, design-agnosticIMU_SensorModule, FlightComputer), physical units, implementation-levelAllocation links layers. Allocation sets map elements across models (F→L, L→P). Rebuilding a model invalidates allocation links because SIDs change — always re-run allocation after a model rebuild.
Interface dictionaries are per-layer. Each layer has its own .sldd with interfaces at the appropriate abstraction. The dictionary must be linked to the model (linkDictionary) before setInterface works — without it, ports silently stay untyped.
Stereotypes follow a strict lifecycle. Create profile → save → apply to model → apply stereotype to components → set properties. Fully-qualified paths required: Profile.Stereotype.Property.
Always:
model_check after building each model to detect unconnected portsAsk First:
Never:
model_check verification after building a layersystemcomposer.createAllocationSet — correct namespace is systemcomposer.allocation.createAllocationSet| Intent | Reference |
|---|---|
| Build a full system architecture from scratch (greenfield) | references/flp-reference-workflow.md — tailor to user's scope and existing artifacts |
| Add interface dictionaries, stereotypes, views, or analysis | references/system-composer-api.md |
| Create sequence diagrams (interactions, lifelines, messages) — requires R2024b+ | references/system-composer-api.md § Sequence Diagrams |
| Create allocation sets between layers | references/system-composer-api.md § Allocation Sets |
| Link requirements to architecture components | references/requirements-traceability-api.md |
| Set up project for architecture work | references/matlab-project.md + managing-simulink-projects |
managing-simulink-projects)The helper scripts/resolveComponent.m is in the skill's scripts/ directory. Use evaluate_matlab_code with project_path set to the skill's scripts/ folder so MATLAB can find it. Never use addpath.
Run after building each model:
model_check MCP tool with checks="unconnected_ports" to detect unwired ports. Do not substitute manual port queries via evaluate_matlab_code — use the model_check tool directly.set_param(modelName, "SimulationCommand", "update")) via evaluate_matlab_code to catch interface type issuesmodel_edit — structural modeling (components, ports, connections, layout)model_check — post-build verification (unconnected ports)evaluate_matlab_code — SC-specific APIs (interface dictionaries, stereotypes, allocation, views, analysis, requirements linking)scripts/resolveComponent.m — helper to resolve nested sub-components by pathCopyright 2026 The MathWorks, Inc.
MOmorluto/rea485k近 7 天新增 7,690 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star