> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/subsystem.md).

# Subsystem

*class* opalone.\_internal.subsystems.Subsystem(*block\_id*, *model\_id*)

<table data-header-hidden><thead><tr><th width="158.22222900390625"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>A subsystem is a special <code>Block</code> that contains other blocks inside itself. This allows for a hierarchical representation of the simulation model.</td></tr><tr><td><strong>Parameters</strong></td><td><p><strong>block_id</strong> (<em>str</em>) – The ID of the subsystem block.</p><p><strong>model_id</strong> (<em>str</em>) – The ID of the containing <code>Model</code>.</p></td></tr><tr><td><strong>Bases</strong></td><td>Block</td></tr></tbody></table>

## Method

### add\_block

add\_block(*library\_block\_path*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add a block to the current subsystem.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>library_block_path</strong> (<em>str</em>) – The library path of the block to add.</td></tr><tr><td><strong>Returns</strong></td><td>The added block.</td></tr><tr><td><strong>Return type</strong></td><td>Block | Subsystem</td></tr></tbody></table>

### add\_multiple\_block

add\_multiple\_blocks(*library\_block\_paths*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Add multiple blocks to the current subsystem.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>library_block_path</strong> (<em>str</em>) – The library path of the block to add.</td></tr><tr><td><strong>Returns</strong></td><td>The added blocks.</td></tr><tr><td><strong>Return type</strong></td><td>Block | Subsystem</td></tr></tbody></table>

### delete

delete()

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Delete the current resource, which is done by suppressing its ID.</td></tr><tr><td><strong>Parameters</strong></td><td>None</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### remove\_blocks

remove\_blocks(*blocks*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Remove one or more blocks from the current subsystem.</td></tr><tr><td><strong>Parameters</strong></td><td><strong>blocks</strong> (<em>str | Block | list[str|Block]</em>) – The blocks to remove, either IDs or block objects. If a list is provided, IDs and objects can be mixed.</td></tr><tr><td><strong>Returns</strong></td><td>None</td></tr></tbody></table>

### to\_json

to\_json(*fields*, *values*)

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Convert this resource to a serialized JSON representation.</td></tr><tr><td><strong>Parameter</strong></td><td><ul><li><strong>fields</strong> (<em>tuple[str] | list[str]</em>) – Fields to include.</li><li><strong>values</strong> (<em>tuple[object] | list[object]</em>) – The value of each field</li></ul></td></tr><tr><td><strong>Returns</strong></td><td>The serialized JSON representation.</td></tr><tr><td><strong>Return type</strong></td><td>str</td></tr></tbody></table>

## Property

### angle

*property* angl&#x65;*: float*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The angle of the block.</p><p>The value is between 0 and 360 degrees.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### blocks

property blocks: Dict\[str, Block]

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The blocks contained in this subsystem, as a mapping <em>name = block</em>. Block names are unique within a given subsystem.</p><p>This property is read-only, it cannot be modified. However, each parameter might have alterable properties.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### comment\_state

*property* comment\_stat&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The <em>comment state</em> of the block.</p><p>The default value is <strong>NONE</strong>.</p><p>If <strong>COMMENT_OUT</strong>, the block is not considered by the simulation.</p><p>If <strong>COMMENT_THROUGH</strong>, the block is considered as a link between its input ports and output ports.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### datapoints

*property* datapoint&#x73;*: dict\[str, Datapoint]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The datapoints of the block, in the form of a mapping <em>name = datapoint</em>. Datapoint names are unique within a given block.</p><p>Datapoints are a concatenation of parameters and signals, and could include other elements in the future.</p><p>This property is read-only, it cannot be modified. However, each datapoint might have alterable properties.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### description

*property* descriptio&#x6E;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The description of the block.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### dimensions

*property* dimension&#x73;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>Dimensions (width and height) of the block.</p><p>The format of the location is <em>x y</em> where <em>x</em> and <em>y</em> are integer values (no decimal).</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### flip\_state

*property* flip\_stat&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The flip state of the block.</p><p>The default value is <strong>NONE</strong>.</p><p>If <strong>HORIZONTAL</strong>, the block is flipped horizontally (the flip axis is vertical).</p><p>If <strong>VERTICAL</strong>, the block is flipped vertically (the flip axis is horizontal).</p><p>If <strong>BOTH</strong>, both axes are used.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### id

*property* i&#x64;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The ID of the resource.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_label\_visible

*property* is\_label\_visibl&#x65;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Indicates if this block’s label is <em>visible</em> (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### is\_loocked

*property* is\_locke&#x64;*: bool*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>Indicates if this block can be moved in the diagram and if it can be resized. (True) or not (False).</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### location

*property* locatio&#x6E;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The location of the block within a diagram.</p><p>The format of the location is <em>(x,y)</em> where <em>x</em> and <em>y</em> are integer values (no decimal).</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### name

*property* nam&#x65;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td>The name of the block. Block names must be unique within a Subsystem.<br>A widget name must be unique within a Panel.</td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### parameters

*property* parameter&#x73;*: dict\[str, BlockParameter]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The parameters of the block, in the form of a mapping <em>name = parameter</em>.<br>Parameter names are unique within a given block.</p><p>This property is read-only, it cannot be modified. However, each parameter might have alterable properties.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### ports

*property* port&#x73;*: dict\[str, Port]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The ports of the block, in the form of a mapping <em>name = port</em>. Port names are unique within a given block.</p><p>This property is read-only, it cannot be modified. However, each port might have alterable properties.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### ref\_id

*property* ref\_i&#x64;*: str*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The reference ID of the block.</p><p>This ID is only useful to lookup the block’s library data.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### signals

*property* signal&#x73;*: dict\[str, BlockSignal]*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The signals of the block, in the form of a mapping <em>name = signal</em>. Signal names are unique within a given block.</p><p>This property is read-only, it cannot be modified. However, each signal might have alterable properties.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>

### type

*property* typ&#x65;*: BlockType*

<table data-header-hidden><thead><tr><th width="200"></th><th></th></tr></thead><tbody><tr><td><strong>Description</strong></td><td><p>The type of the block.</p><p>This property is read-only, it cannot be modified.</p></td></tr><tr><td><strong>Parameter</strong></td><td>None</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/hypersim/automation-api-and-scripting/python-dashboard-api/api-reference/class-reference/subsystem.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
