ReEDSParser
Parser for ReEDS model data using the Plugin[ReEDSConfig] pattern.
Import
Section titled “Import”>>> from r2x_reeds import ReEDSParser>>> assert ReEDSParser is not NoneBases: Plugin[ReEDSConfig]. Inherited contracts remain defined by the base classes.
Declared methods and properties
Section titled “Declared methods and properties”from_context
Section titled “from_context”@classmethodfrom_context(cls, ctx: PluginContext[ReEDSConfig]) -> SelfCreate the parser and install custom ReEDS data readers.
on_validate_config
Section titled “on_validate_config”on_validate_config(self) -> Result[None, str]Validate configuration assets before upgrades or data I/O.
on_upgrade
Section titled “on_upgrade”on_upgrade(self) -> Result[System | None, str]Run ReEDS file upgrades before input validation.
read_data_file
Section titled “read_data_file”read_data_file(self, name: str) -> AnyRead a data file from the store.
create_component
Section titled “create_component”create_component(self, component_class: type[Component], **kwargs: Any) -> ComponentCreate a component instance with consistent validation handling.
on_validate
Section titled “on_validate”on_validate(self) -> Result[None, str]Validate input data after upgrades, before building the system.
on_prepare
Section titled “on_prepare”on_prepare(self) -> Result[None, str]Prepare and normalize configuration, time arrays, and component datasets.
on_build
Section titled “on_build”on_build(self) -> Result[System, str]Build and return the complete infrasys.System.
Continue with the Python API overview and transform contracts.