Skip to content

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

from_json(json_str: str) -> SimulationConfig

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 SimulationConfig instance.

Raises:

Type Description
SchemaError

If the JSON is malformed or fails schema validation.

to_json

to_json() -> str

Serialize this configuration to a JSON string.

Returns:

Type Description
str

A compact JSON representation of the configuration.

validate

validate() -> None

Validate the configuration against the schema.

Raises:

Type Description
SchemaError

If any field value is out of range or inconsistent.