本文へ移動
cccskills
無料GitHub で公開日本語紹介

arranging-simulink-layouts

Simulinkのブロック図で重なったブロックや交差する線を整理し、必要な範囲の配置を整えたり、ブロックをサブシステムにまとめたりするスキルです。

原文原文の説明を見る

Arranges and tidies Simulink block diagram layouts with the model_edit layout engine. Use when the user asks to fix, clean up, tidy, straighten, or rearrange a layout, when blocks overlap or lines cross, when specific blocks need re-placing, or when grouping blocks into or expanding a subsystem.

matlab/simulink-agentic-toolkitスター 1,289(GitHub 1,289 + cccskills 0)

実行スコア 未検証

インストール方法を見る

こんなときに便利

  • 重なったブロックを整理したいとき
  • 線の交差を解消したいとき
  • 追加したブロックを並べ直したいとき
  • ブロックをサブシステムにまとめたいとき

日本語での紹介

できること

Simulinkのブロック図で、重なりや交差した線、配置の乱れを整えます。自動レイアウトエンジンを使い、指定したブロックと接続線を中心に動かす方法が基本です。必要に応じて範囲全体を再配置したり、指定位置への移動や整列を行ったりできます。ブロックをサブシステムにまとめる、またはサブシステムを展開する作業にも対応します。

こんなときに便利

ブロックを追加した後に図を読みやすく整えたいときや、線がブロックを横切る状態を直したいときに向いています。図全体ではなく、乱れている箇所だけを動かしたい場合にも使えます。

使い方の例

  • 「この図で重なっているブロックの配置を整えて」
  • 「追加したブロックを周囲に合わせて並べて」
  • 「このブロック群をサブシステムにまとめて」

注意点

レイアウトは自動で行われ、ピクセル単位の手動配置ではありません。範囲全体の再配置は既存の配置を変えるため、実行前に合意が必要です。多くのブロックを動かす場合は、先にモデルを保存するよう案内します。初回のレイアウト処理には約20秒かかることがあります。MathWorksのライセンスに従います。

この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。

含まれるファイル(3)

  • SKILL.md5.5 KB
  • manifest.yaml771 B
  • references/subsystem-restructuring.md2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Arranging Simulink Layouts

Re-place blocks with the SATK layout engine in model_edit. Move as little of the user's diagram as the request allows.

When to Use

  • "Fix / clean up / tidy / straighten / rearrange the layout", "make it readable"
  • Blocks overlap, lines cross or run through blocks, a few blocks landed in odd places
  • "Move these blocks", "line these up", "sort out the blocks I just added"
  • Grouping blocks into a subsystem, or expanding a subsystem into its parent

When NOT to Use

  • Adding, connecting, deleting, or configuring blocks: use building-simulink-models. Layout already runs automatically after every model_edit call.
  • Stateflow chart layout: the layout op is Simulink-only. A chart scope accepts only a full re-layout (operations [], layout_mode "full"), which moves every element, so ask first.

Set Expectations

  • You drive an automatic layout engine. You don't place blocks pixel by pixel. Say so if the user expects hand-tuned placement.
  • Ctrl+Z is not reliable for agent edits, including layout. Don't offer undo. Before any layout that moves many blocks, recommend that the user saves the model (or a copy) first.
  • The first layout in a MATLAB session can take about 20 s while the engine starts. Later calls take 1–2 s.

Choose the Method

Selective layout is the default. A full layout of a diagram the user has arranged by hand discards their arrangement, so ask before running one.

SituationMethod
A few blocks are messy, overlapping, or just added{"op":"layout","targets":[...]} with layout_mode "incremental"
The whole scope is a mess and the user agrees that everything movesoperations [] with layout_mode "full"
The user explicitly asks for Simulink's own tidy-upFormat > Auto Arrange / Simulink.BlockDiagram.arrangeSystem, and only on request
The user wants an exact placementconfigure with Position through model_edit

Selective layout (default)

model_edit(model, "root", '[{"op":"layout","targets":["blk_5","blk_7"]}]', "incremental")
  • Targets must sit directly inside scope. Make one call per scope.
  • The targets move and the lines touching them are rerouted. Other blocks stay put, except that blocks downstream of a target may shift to make room. Mention that in your report.
  • You can combine a layout op with edits in the same call. A #ref target names a block that the call adds: [{"op":"add_block","type":"Gain","ref":"g"},{"op":"connect","target":"blk_3.y1 -> #g.u1"},{"op":"layout","targets":["#g","blk_9"]}]
  • When the wiring is tangled, add the targets' immediate neighbours to targets.
  • With layout_mode "full", the targets are ignored and the whole scope is re-laid out.

Full layout of a scope

model_edit(model, "blk_12", "[]", "full")

Use it for a scope that is new or already unreadable, and only with the user's agreement. Prefer the smallest subsystem that contains the mess over root.

Exact placement

model_edit(model, "root", '[{"op":"configure","target":"blk_5","params":{"Position":"[300 100 340 130]"}}]', "incremental")

Later incremental layouts leave the block where you put it, but a full layout of the scope moves it. Use this only when the user names a position or asks for specific alignment.

Pick the Targets

  1. The user names blocks: find their blk_X IDs with model_read (depth "0") or model_overview on the scope.
  2. The user points at the diagram ("these blocks", "the ones on the left"): ask them to select the blocks in the editor, then read the selection:
    sel = find_system('<scopePath>', 'SearchDepth', 1, 'Type', 'Block', 'Selected', 'on');
    ids = cellfun(@(p) ['blk_' extractAfter(Simulink.ID.getSID(p), ':')], sel, 'UniformOutput', false)
    
    A selection can be stale: earlier operations sometimes leave blocks selected. Read the block names back to the user and confirm before laying out.
  3. Overlaps: compare the targets' Position values with model_query_params, or check the model in the editor.

After Layout

  • Read the layout: block in the response. applied: false comes with a detail that explains why. Report it; don't retry blindly.
  • Run model_check(model, scope, '["unconnected_lines"]') to confirm that the wiring survived.
  • Tell the user which blocks moved, and mention any downstream blocks that shifted.

Restructuring Subsystems

To group blocks into a new subsystem, or expand a subsystem in place, see references/subsystem-restructuring.md. Don't rebuild the content block by block with model_edit.

Anti-Patterns

  • set_param(..., 'Position', ...) block by block to "fix" a layout. Use a layout op, or configure Position through model_edit.
  • Simulink.BlockDiagram.arrangeSystem when the user didn't ask for Auto Arrange.
  • A full layout of an existing, hand-arranged diagram without asking.
  • Copying blocks into a subsystem one at a time, which loses wiring and layout. Use Simulink.BlockDiagram.createSubsystem.
  • Promising that Ctrl+Z will restore the previous layout.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

author-modeladvisor-checks

無料概要あり

SimulinkやSystem Composerのモデリング規約をガイドライン化し、Model Advisorチェックの仕様作成、実装、テストまで一貫して支援します。

  • モデリング規約をチェックにしたいとき
  • 独自のModel Advisorチェックを作りたいとき
  • 既存チェックをDetailStyleへ移行したいとき
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

authoring-simulink-inputs

無料概要あり

Simulinkモデルの入力ポート向けに、正弦波やランプなどの新しい信号を作り、型や補間方式を保ったDatasetとして整えます。

  • 入力ポート用の波形を作りたいとき
  • 空のDatasetにテスト信号を入れたいとき
  • Signal Editor用のシナリオを作りたいとき
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

System Composerで機能・論理・物理のシステム構成を設計し、インターフェースや割り当て、要件との対応をモデル上で管理します。

  • システムの機能・論理・物理構成を設計
  • インターフェース辞書をモデルに設定
  • 層をまたぐ要素の割り当てを管理
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

building-simulink-models

無料概要あり

Simulink、System Composer、Stateflow、Simscape のモデル構造やブロック、接続、設定を編集し、変更後の構成や接続状態を確認するスキルです。

  • モデルにブロックを追加・接続したいとき
  • Stateflow の状態や遷移を編集したいとき
  • System Composer の構成を作りたいとき
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

checking-model-compliance

無料概要あり

SimulinkモデルをMISRAやJMAABなどの規格に照らして検査し、優先度付きの指摘と修正案をまとめられます。

  • MISRAなどの規格でモデルを検査したいとき
  • JMAABのチェック結果を確認したいとき
  • 指摘事項と修正案のレポートを作りたいとき
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

configuring-block-policy

無料概要あり

プロジェクトの `.satk/block-policy.json` を整え、エージェントが使えるブロックや除外対象、変更を禁止するパラメーターを設定するスキルです。

  • 使用可能なブロックを決めたいとき
  • 古いブロックを除外したいとき
  • 特定のパラメーターを保護したいとき
matlab/simulink-agentic-toolkit1,2892026年10月30日 更新

matlab のスキルをすべて見る

このスキルの問題を報告する