SimulationConfig¶
SimulationConfig ¶
Top-level simulation configuration object.
Typically constructed from a JSON string (or file) via
SimulationConfig.from_json(). The JSON must conform to the
Schema Reference.
from_json
staticmethod
¶
Deserialize a SimulationConfig from a JSON string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_str
|
str
|
A JSON string that conforms to the mp3du configuration schema. |
required |
Returns:
| Type | Description |
|---|---|
SimulationConfig
|
A validated |
Raises:
| Type | Description |
|---|---|
SchemaError
|
If the JSON is malformed or fails schema validation. |
to_json ¶
Serialize this configuration to a JSON string.
Returns:
| Type | Description |
|---|---|
str
|
A compact JSON representation of the configuration. |
validate ¶
Validate the configuration against the schema.
Raises:
| Type | Description |
|---|---|
SchemaError
|
If any field value is out of range or inconsistent. |