Data models#
Simulation input models#
- pydantic model PyDSS.simulation_input_models.SnapshotTimePointSelectionConfigModel[source]#
Defines the user inputs for auto-selecting snapshot time points.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for auto-selecting snapshot time points.", "type": "object", "properties": { "mode": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionMode" } ], "default": "none", "description": "Mode", "title": "mode" }, "start_time": { "default": "2020-01-01T00:00:00", "description": "Start time in the load shape profiles", "format": "date-time", "title": "start_time", "type": "string" }, "search_duration_min": { "default": 1440.0, "description": "Duration in minutes to search in the load shape profiles", "title": "search_duration_min", "type": "number" } }, "$defs": { "SnapshotTimePointSelectionMode": { "description": "Defines methods by which snapshot time points can be calculated.", "enum": [ "max_pv_load_ratio", "max_load", "daytime_min_load", "pv_minus_load", "none" ], "title": "SnapshotTimePointSelectionMode", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
- field mode: SnapshotTimePointSelectionMode = SnapshotTimePointSelectionMode.NONE#
Mode
- field search_duration_min: float = 1440.0#
Duration in minutes to search in the load shape profiles
- field start_time: datetime = datetime.datetime(2020, 1, 1, 0, 0)#
Start time in the load shape profiles
- Validated by:
- validator double » start_time[source]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ScenarioPostProcessModel[source]#
Defines user inputs for a scenario post-process script.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines user inputs for a scenario post-process script.", "type": "object", "properties": { "script": { "default": "", "description": "Post-process script", "title": "script", "type": "string" }, "config_file": { "description": "Post-process config file", "title": "config_file", "type": "string" } }, "additionalProperties": false, "required": [ "config_file" ] }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field config_file: str [Required]#
Post-process config file
- field script: str = ''#
Post-process script
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ScenarioModel[source]#
Defines the user inputs for a scenario.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for a scenario.", "type": "object", "properties": { "name": { "description": "Name of scenario", "title": "name", "type": "string" }, "post_process_infos": { "default": [], "description": "Post-process script descriptors", "items": { "$ref": "#/$defs/ScenarioPostProcessModel" }, "title": "post_process_infos", "type": "array" }, "snapshot_time_point_selection_config": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionConfigModel" } ], "default": { "mode": "none", "start_time": "2020-01-01T00:00:00", "search_duration_min": 1440.0 }, "description": "Descriptor for auto-selecting snapshot time points", "title": "snapshot_time_point_selection_config" } }, "$defs": { "ScenarioPostProcessModel": { "additionalProperties": false, "description": "Defines user inputs for a scenario post-process script.", "properties": { "script": { "default": "", "description": "Post-process script", "title": "script", "type": "string" }, "config_file": { "description": "Post-process config file", "title": "config_file", "type": "string" } }, "required": [ "config_file" ], "title": "InputsBaseModel", "type": "object" }, "SnapshotTimePointSelectionConfigModel": { "additionalProperties": false, "description": "Defines the user inputs for auto-selecting snapshot time points.", "properties": { "mode": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionMode" } ], "default": "none", "description": "Mode", "title": "mode" }, "start_time": { "default": "2020-01-01T00:00:00", "description": "Start time in the load shape profiles", "format": "date-time", "title": "start_time", "type": "string" }, "search_duration_min": { "default": 1440.0, "description": "Duration in minutes to search in the load shape profiles", "title": "search_duration_min", "type": "number" } }, "title": "InputsBaseModel", "type": "object" }, "SnapshotTimePointSelectionMode": { "description": "Defines methods by which snapshot time points can be calculated.", "enum": [ "max_pv_load_ratio", "max_load", "daytime_min_load", "pv_minus_load", "none" ], "title": "SnapshotTimePointSelectionMode", "type": "string" } }, "additionalProperties": false, "required": [ "name" ] }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field name: str [Required]#
Name of scenario
- field post_process_infos: List[ScenarioPostProcessModel] = []#
Post-process script descriptors
- field snapshot_time_point_selection_config: SnapshotTimePointSelectionConfigModel = SnapshotTimePointSelectionConfigModel(mode=<SnapshotTimePointSelectionMode.NONE: 'none'>, start_time=datetime.datetime(2020, 1, 1, 0, 0), search_duration_min=1440.0)#
Descriptor for auto-selecting snapshot time points
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ProjectModel[source]#
Defines the user inputs for the project.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the project.", "type": "object", "properties": { "Project Path": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Base path of project. Join with 'active_project' to get full path", "title": "project_path" }, "Active Project": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Active project name. Join with 'project_path' to get full path", "title": "active_project" }, "active_project_path": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to project. Auto-generated.", "title": "active_project_path" }, "Scenarios": { "anyOf": [ { "items": { "$ref": "#/$defs/ScenarioModel" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "List of scenarios", "title": "scenarios" }, "Active Scenario": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "description": "Name of active scenario", "title": "active_scenario" }, "Start time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": "2020-01-01T00:00:00", "description": "Start time of simulation", "title": "start_time" }, "simulation_duration_min": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": 1440.0, "description": "Simulation duration in minutes.", "title": "simulation_duration_min" }, "Step resolution (sec)": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": 900.0, "description": "Time step resolution in seconds", "title": "step_resolution_sec" }, "Loadshape start time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": "2020-01-01 00:00:00.0", "description": "Start time of loadshape profiles", "title": "loadshape_start_time" }, "Simulation range": { "anyOf": [ { "$ref": "#/$defs/SimulationRangeModel" }, { "type": "null" } ], "default": { "start": "00:00:00", "end": "23:59:59" }, "description": "Restrict control algorithms and data collection to these hours. Useful for skipping night when simulating PV Systems.", "title": "simulation_range" }, "Simulation Type": { "allOf": [ { "$ref": "#/$defs/SimulationType" } ], "default": "qsts", "description": "Type of simulation to run.", "title": "simulation_type" }, "Control mode": { "allOf": [ { "$ref": "#/$defs/ControlMode" } ], "default": "Static", "description": "Simulation control mode", "title": "control_mode" }, "Max Control Iterations": { "default": 50, "description": "Maximum outer loop control iterations", "title": "max_control_iterations", "type": "integer" }, "Convergence error percent threshold": { "default": 0.0, "description": "Convergence error threshold as a percent", "title": "convergence_error_percent_threshold", "type": "number" }, "Error tolerance": { "default": 0.001, "description": "Error tolerance in per unit", "title": "error_tolerance", "type": "number" }, "Max error tolerance": { "default": 0.0, "description": "Abort simulation if a convergence error exceeds this value.", "title": "max_error_tolerance", "type": "number" }, "Skip export on convergence error": { "default": true, "description": "Do not export data at a time point if there is a convergence error.", "title": "skip_export_on_convergence_error", "type": "boolean" }, "DSS File": { "default": "Master.dss", "description": "OpenDSS master filename", "title": "dss_file", "type": "string" }, "DSS File Absolute Path": { "default": false, "description": "Set to true if 'dss_file' is an absolute path.", "title": "dss_file_absolute_path", "type": "boolean" }, "Disable PyDSS controllers": { "default": false, "description": "Allows disabling of the control algorithms", "title": "disable_pydss_controllers", "type": "boolean" }, "Use Controller Registry": { "default": false, "description": "Use local controller registry.", "title": "use_controller_registry", "type": "boolean" } }, "$defs": { "ControlMode": { "description": "Supported control modes", "enum": [ "Static", "Time" ], "title": "ControlMode", "type": "string" }, "ScenarioModel": { "additionalProperties": false, "description": "Defines the user inputs for a scenario.", "properties": { "name": { "description": "Name of scenario", "title": "name", "type": "string" }, "post_process_infos": { "default": [], "description": "Post-process script descriptors", "items": { "$ref": "#/$defs/ScenarioPostProcessModel" }, "title": "post_process_infos", "type": "array" }, "snapshot_time_point_selection_config": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionConfigModel" } ], "default": { "mode": "none", "start_time": "2020-01-01T00:00:00", "search_duration_min": 1440.0 }, "description": "Descriptor for auto-selecting snapshot time points", "title": "snapshot_time_point_selection_config" } }, "required": [ "name" ], "title": "InputsBaseModel", "type": "object" }, "ScenarioPostProcessModel": { "additionalProperties": false, "description": "Defines user inputs for a scenario post-process script.", "properties": { "script": { "default": "", "description": "Post-process script", "title": "script", "type": "string" }, "config_file": { "description": "Post-process config file", "title": "config_file", "type": "string" } }, "required": [ "config_file" ], "title": "InputsBaseModel", "type": "object" }, "SimulationRangeModel": { "additionalProperties": false, "description": "Governs time range when control algorithms can run in a simulation. Does not affect\nsimulation times.", "properties": { "start": { "default": "00:00:00", "description": "Time to start running control algorithms each day.", "title": "start", "type": "string" }, "end": { "default": "23:59:59", "description": "Time to stop running control algorithms each day.", "title": "end", "type": "string" } }, "title": "InputsBaseModel", "type": "object" }, "SimulationType": { "description": "Supported simulation types", "enum": [ "dynamic", "qsts", "snapshot" ], "title": "SimulationType", "type": "string" }, "SnapshotTimePointSelectionConfigModel": { "additionalProperties": false, "description": "Defines the user inputs for auto-selecting snapshot time points.", "properties": { "mode": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionMode" } ], "default": "none", "description": "Mode", "title": "mode" }, "start_time": { "default": "2020-01-01T00:00:00", "description": "Start time in the load shape profiles", "format": "date-time", "title": "start_time", "type": "string" }, "search_duration_min": { "default": 1440.0, "description": "Duration in minutes to search in the load shape profiles", "title": "search_duration_min", "type": "number" } }, "title": "InputsBaseModel", "type": "object" }, "SnapshotTimePointSelectionMode": { "description": "Defines methods by which snapshot time points can be calculated.", "enum": [ "max_pv_load_ratio", "max_load", "daytime_min_load", "pv_minus_load", "none" ], "title": "SnapshotTimePointSelectionMode", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
assign_active_project_path
»all fields
check_active_project
»all fields
check_scenarios
»all fields
pre_process
»all fields
- field active_project: str | None = None (alias 'Active Project')#
Active project name. Join with ‘project_path’ to get full path
- field active_project_path: Path | None = None#
Path to project. Auto-generated.
- field active_scenario: str | None = '' (alias 'Active Scenario')#
Name of active scenario
- field control_mode: ControlMode = ControlMode.STATIC (alias 'Control mode')#
Simulation control mode
- field convergence_error_percent_threshold: float = 0.0 (alias 'Convergence error percent threshold')#
Convergence error threshold as a percent
- field disable_pydss_controllers: bool = False (alias 'Disable PyDSS controllers')#
Allows disabling of the control algorithms
- field dss_file: str = 'Master.dss' (alias 'DSS File')#
OpenDSS master filename
- field dss_file_absolute_path: bool = False (alias 'DSS File Absolute Path')#
Set to true if ‘dss_file’ is an absolute path.
- field error_tolerance: float = 0.001 (alias 'Error tolerance')#
Error tolerance in per unit
- field loadshape_start_time: datetime | None = '2020-01-01 00:00:00.0' (alias 'Loadshape start time')#
Start time of loadshape profiles
- field max_control_iterations: int = 50 (alias 'Max Control Iterations')#
Maximum outer loop control iterations
- field max_error_tolerance: float = 0.0 (alias 'Max error tolerance')#
Abort simulation if a convergence error exceeds this value.
- field project_path: Path | None = None (alias 'Project Path')#
Base path of project. Join with ‘active_project’ to get full path
- field scenarios: List[ScenarioModel] | None = [] (alias 'Scenarios')#
List of scenarios
- field simulation_duration_min: float | None = 1440.0#
Simulation duration in minutes.
- field simulation_range: SimulationRangeModel | None = SimulationRangeModel(start='00:00:00', end='23:59:59') (alias 'Simulation range')#
Restrict control algorithms and data collection to these hours. Useful for skipping night when simulating PV Systems.
- field simulation_type: SimulationType = SimulationType.QSTS (alias 'Simulation Type')#
Type of simulation to run.
- field skip_export_on_convergence_error: bool = True (alias 'Skip export on convergence error')#
Do not export data at a time point if there is a convergence error.
- field start_time: datetime | None = datetime.datetime(2020, 1, 1, 0, 0) (alias 'Start time')#
Start time of simulation
- field step_resolution_sec: float | None = 900.0 (alias 'Step resolution (sec)')#
Time step resolution in seconds
- field use_controller_registry: bool = False (alias 'Use Controller Registry')#
Use local controller registry.
- validator check_project_path » project_path[source]#
- validator double » start_time, loadshape_start_time[source]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ExportsModel[source]#
Defines the user inputs for defining data exports.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for defining data exports.", "type": "object", "properties": { "Log Results": { "default": false, "description": "Set to true to export circuit element values at each time point.", "title": "export_results", "type": "boolean" }, "Export Elements": { "default": true, "description": "Set to true to export static information for all circuit elements.", "title": "export_elements", "type": "boolean" }, "Export Element Types": { "default": [], "description": "Restrict 'export_elements' to these element types. Default is all types", "items": {}, "title": "export_element_types", "type": "array" }, "Export Data Tables": { "default": true, "description": "Set to true to export circuit element data in tabular files. While it does duplicate data, it provides a way to preserve a human-readable dataset that does not require PyDSS to interpret.", "title": "export_data_tables", "type": "boolean" }, "Export PV Profiles": { "default": false, "description": "Set to true to export PV profiles to tabular files.", "title": "export_pv_profiles", "type": "boolean" }, "Export Data In Memory": { "default": false, "description": "Set to true to keep circuit element data in memory rather than periodically flushing to an HDF5 file. This can be faster but will consume more memory.", "title": "export_data_in_memory", "type": "boolean" }, "Export Node Names By Type": { "default": false, "description": "Set to true to export node names by primary/secondary type to a file.", "title": "export_node_names_by_type", "type": "boolean" }, "Export Event Log": { "default": true, "description": "Set to true to export the OpenDSS event log.", "title": "export_event_log", "type": "boolean" }, "Export Format": { "allOf": [ { "$ref": "#/$defs/FileFormat" } ], "default": "h5", "description": "Controls the file format used if export_data_tables is true.", "title": "export_format" }, "Export Compression": { "default": false, "description": "Set to true to compress data exported with 'export_data_tables'.", "title": "export_compression", "type": "boolean" }, "HDF Max Chunk Bytes": { "default": 1048576, "description": "The chunk size in bytes to use for exported data in the HDF5 data store. The value is passed to the h5py package. Refer to http://docs.h5py.org/en/stable/high/dataset.html#chunked-storage for more information.", "title": "hdf_max_chunk_bytes", "type": "integer" } }, "$defs": { "FileFormat": { "description": "Supported file formats", "enum": [ "csv", "h5" ], "title": "FileFormat", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
pre_process
»all fields
- field export_compression: bool = False (alias 'Export Compression')#
Set to true to compress data exported with ‘export_data_tables’.
- Validated by:
- field export_data_in_memory: bool = False (alias 'Export Data In Memory')#
Set to true to keep circuit element data in memory rather than periodically flushing to an HDF5 file. This can be faster but will consume more memory.
- Validated by:
- field export_data_tables: bool = True (alias 'Export Data Tables')#
Set to true to export circuit element data in tabular files. While it does duplicate data, it provides a way to preserve a human-readable dataset that does not require PyDSS to interpret.
- Validated by:
- field export_element_types: list = [] (alias 'Export Element Types')#
Restrict ‘export_elements’ to these element types. Default is all types
- Validated by:
- field export_elements: bool = True (alias 'Export Elements')#
Set to true to export static information for all circuit elements.
- Validated by:
- field export_event_log: bool = True (alias 'Export Event Log')#
Set to true to export the OpenDSS event log.
- Validated by:
- field export_format: FileFormat = FileFormat.HDF5 (alias 'Export Format')#
Controls the file format used if export_data_tables is true.
- Validated by:
- field export_node_names_by_type: bool = False (alias 'Export Node Names By Type')#
Set to true to export node names by primary/secondary type to a file.
- Validated by:
- field export_pv_profiles: bool = False (alias 'Export PV Profiles')#
Set to true to export PV profiles to tabular files.
- Validated by:
- field export_results: bool = False (alias 'Log Results')#
Set to true to export circuit element values at each time point.
- Validated by:
- field hdf_max_chunk_bytes: int = 1048576 (alias 'HDF Max Chunk Bytes')#
The chunk size in bytes to use for exported data in the HDF5 data store. The value is passed to the h5py package. Refer to http://docs.h5py.org/en/stable/high/dataset.html#chunked-storage for more information.
- Validated by:
- validator check_hdf_max_chunk_bytes » hdf_max_chunk_bytes[source]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.FrequencyModel[source]#
Defines the user inputs for defining frequency parameters.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for defining frequency parameters.", "type": "object", "properties": { "Enable frequency sweep": { "default": false, "description": "Enable harmonic sweep. Works with only 'Static' and 'QSTS' simulation modes.", "title": "enable_frequency_sweep", "type": "boolean" }, "Fundamental frequency": { "default": 60.0, "description": "Fundamental system frequeny in Hertz", "title": "fundamental_frequency", "type": "number" }, "Start frequency": { "default": 1.0, "description": "Start system frequeny in Hertz", "title": "start_frequency", "type": "number" }, "End frequency": { "default": 15.0, "description": "End system frequeny in Hertz", "title": "end_frequency", "type": "number" }, "frequency increment": { "default": 2.0, "description": "As multiple of fundamental", "title": "frequency_increment", "type": "number" }, "Neglect shunt admittance": { "default": false, "description": "Neglect shunt addmittance for frequency sweep", "title": "neglect_shunt_admittance", "type": "boolean" }, "Percentage load in series": { "default": 50.0, "description": "Percent of load that is series RL for Harmonic studies", "title": "percentage_load_in_series", "type": "number" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
- field enable_frequency_sweep: bool = False (alias 'Enable frequency sweep')#
Enable harmonic sweep. Works with only ‘Static’ and ‘QSTS’ simulation modes.
- Validated by:
- field end_frequency: float = 15.0 (alias 'End frequency')#
End system frequeny in Hertz
- Validated by:
- field frequency_increment: float = 2.0 (alias 'frequency increment')#
As multiple of fundamental
- Validated by:
- field fundamental_frequency: float = 60.0 (alias 'Fundamental frequency')#
Fundamental system frequeny in Hertz
- Validated by:
- field neglect_shunt_admittance: bool = False (alias 'Neglect shunt admittance')#
Neglect shunt addmittance for frequency sweep
- Validated by:
- field percentage_load_in_series: float = 50.0 (alias 'Percentage load in series')#
Percent of load that is series RL for Harmonic studies
- Validated by:
- field start_frequency: float = 1.0 (alias 'Start frequency')#
Start system frequeny in Hertz
- Validated by:
- validator check_fundamental_frequency » fundamental_frequency[source]#
- validator check_percentage_load_in_series » percentage_load_in_series[source]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.HelicsModel[source]#
Defines the user inputs for HELICS.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for HELICS.", "type": "object", "properties": { "Co-simulation Mode": { "default": false, "description": "Set to true to enable the HELICS interface for co-simulation.", "title": "co_simulation_mode", "type": "boolean" }, "Iterative Mode": { "default": false, "description": "Iterative mode", "title": "iterative_mode", "type": "boolean" }, "Error tolerance": { "default": 0.0001, "description": "Error tolerance", "title": "error_tolerance", "type": "number" }, "Max co-iterations": { "default": 15, "description": "Max number of co-simulation iterations", "title": "max_co_iterations", "type": "integer" }, "Broker": { "default": "mainbroker", "description": "Broker name", "title": "broker", "type": "string" }, "Broker port": { "default": 0, "description": "Broker port", "title": "broker_port", "type": "integer" }, "Federate name": { "default": "PyDSS", "description": "Name of the federate", "title": "federate_name", "type": "string" }, "Time delta": { "default": 0.01, "description": "The property controlling the minimum time delta for a federate.", "title": "time_delta", "type": "number" }, "Core type": { "default": "zmq", "description": "Core type to be use for communication", "title": "core_type", "type": "string" }, "Uninterruptible": { "default": true, "description": "Can the federate be interrupted", "title": "uninterruptible", "type": "boolean" }, "Helics logging level": { "default": 5, "description": "Logging level for the federate. Refer to HELICS documentation.", "title": "logging_level", "type": "integer" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
- field broker: str = 'mainbroker' (alias 'Broker')#
Broker name
- field broker_port: int = 0 (alias 'Broker port')#
Broker port
- field co_simulation_mode: bool = False (alias 'Co-simulation Mode')#
Set to true to enable the HELICS interface for co-simulation.
- field core_type: str = 'zmq' (alias 'Core type')#
Core type to be use for communication
- field error_tolerance: float = 0.0001 (alias 'Error tolerance')#
Error tolerance
- field federate_name: str = 'PyDSS' (alias 'Federate name')#
Name of the federate
- field iterative_mode: bool = False (alias 'Iterative Mode')#
Iterative mode
- field logging_level: int = 5 (alias 'Helics logging level')#
Logging level for the federate. Refer to HELICS documentation.
- Validated by:
- field max_co_iterations: int = 15 (alias 'Max co-iterations')#
Max number of co-simulation iterations
- Validated by:
- field time_delta: float = 0.01 (alias 'Time delta')#
The property controlling the minimum time delta for a federate.
- field uninterruptible: bool = True (alias 'Uninterruptible')#
Can the federate be interrupted
- validator check_logging_level » logging_level[source]#
- validator check_max_co_iterations » max_co_iterations[source]#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.LoggingModel[source]#
Defines the user inputs for controlling logging.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for controlling logging.", "type": "object", "properties": { "Logging Level": { "anyOf": [ { "$ref": "#/$defs/LoggingLevel" }, { "type": "null" } ], "default": "info", "description": "PyDSS minimum logging level", "title": "logging_level" }, "Display on screen": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to enable console logging.", "title": "enable_console" }, "Log to external file": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to enable logging to a file.", "title": "enable_file" }, "Clear old log file": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Set to true to clear and overwrite any existing log files.", "title": "clear_old_log_file" }, "Log time step updates": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to log each completed time step.", "title": "log_time_step_updates" } }, "$defs": { "LoggingLevel": { "description": "Supported logging levels", "enum": [ "debug", "info", "warning", "error" ], "title": "LoggingLevel", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
pre_process
»all fields
- field clear_old_log_file: bool | None = False (alias 'Clear old log file')#
Set to true to clear and overwrite any existing log files.
- Validated by:
- field enable_console: bool | None = True (alias 'Display on screen')#
Set to true to enable console logging.
- Validated by:
- field enable_file: bool | None = True (alias 'Log to external file')#
Set to true to enable logging to a file.
- Validated by:
- field log_time_step_updates: bool | None = True (alias 'Log time step updates')#
Set to true to log each completed time step.
- Validated by:
- field logging_level: LoggingLevel | None = LoggingLevel.INFO (alias 'Logging Level')#
PyDSS minimum logging level
- Validated by:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.MonteCarloModel[source]#
Defines the user inputs for Monte Carlo simulations.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for Monte Carlo simulations.", "type": "object", "properties": { "Number of Monte Carlo scenarios": { "default": -1, "description": "Number of Monte Carlo scenarios", "title": "num_scenarios", "type": "integer" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field num_scenarios: int = -1 (alias 'Number of Monte Carlo scenarios')#
Number of Monte Carlo scenarios
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ProfilesModel[source]#
Defines user inputs for the Profile Manager.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines user inputs for the Profile Manager.", "type": "object", "properties": { "Use profile manager": { "default": false, "description": "Set to true to enable the Profile Manager.", "title": "use_profile_manager", "type": "boolean" }, "source_type": { "anyOf": [ { "$ref": "#/$defs/FileFormat" }, { "type": "null" } ], "default": "h5", "description": "File format for source data", "title": "source_type" }, "source": { "default": "Profiles_backup.hdf5", "description": "File containing source data", "title": "source", "type": "string" }, "Profile mapping": { "default": "", "description": "Profile mapping", "title": "profile_mapping", "type": "string" }, "is_relative_path": { "default": true, "description": "Source file path is relative", "title": "is_relative_path", "type": "boolean" }, "settings": { "default": {}, "description": "Profiles settings", "title": "settings", "type": "object" } }, "$defs": { "FileFormat": { "description": "Supported file formats", "enum": [ "csv", "h5" ], "title": "FileFormat", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
pre_process
»all fields
- field is_relative_path: bool = True#
Source file path is relative
- Validated by:
- field profile_mapping: str = '' (alias 'Profile mapping')#
Profile mapping
- Validated by:
- field settings: Dict = {}#
Profiles settings
- Validated by:
- field source: str = 'Profiles_backup.hdf5'#
File containing source data
- Validated by:
- field source_type: FileFormat | None = FileFormat.HDF5#
File format for source data
- Validated by:
- field use_profile_manager: bool = False (alias 'Use profile manager')#
Set to true to enable the Profile Manager.
- Validated by:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ReportBaseModel[source]#
Defines the base model for all report-specific user inputs.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the base model for all report-specific user inputs.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field enabled: bool = False#
Set to true to enable the report
- field scenarios: List[str] = []#
Scenarios to which the report applies. Default is all scenarios.
- field store_all_time_points: bool = False#
Set to true to store data for all time points. If false, store aggregated metrics in memory.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.CapacitorStateChangeCountReportModel[source]#
Defines the user inputs for the Capacitor State Change Counts report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the Capacitor State Change Counts report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "Capacitor State Change Counts", "description": "Report name", "title": "name", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field name: str = 'Capacitor State Change Counts'#
Report name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.FeederLossesReportModel[source]#
Defines the user inputs for the Feeder Losses report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the Feeder Losses report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "Feeder Losses", "description": "Report name", "title": "name", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field name: str = 'Feeder Losses'#
Report name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.FeederLossesReportModel[source]#
Defines the user inputs for the Feeder Losses report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the Feeder Losses report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "Feeder Losses", "description": "Report name", "title": "name", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field enabled: Annotated[bool, Field(title='enabled', description='Set to true to enable the report', default=False)] = False#
Set to true to enable the report
- field name: str = 'Feeder Losses'#
Report name
- field scenarios: Annotated[List[str], Field(title='scenarios', description='Scenarios to which the report applies. Default is all scenarios.', default=[])] = []#
Scenarios to which the report applies. Default is all scenarios.
- field store_all_time_points: Annotated[bool, Field(title='store_all_time_points', description='Set to true to store data for all time points. If false, store aggregated metrics in memory.', default=False)] = False#
Set to true to store data for all time points. If false, store aggregated metrics in memory.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.PvClippingReportModel[source]#
Defines the user inputs for the PV Clipping report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the PV Clipping report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "PV Clipping", "description": "Report name", "title": "name", "type": "string" }, "diff_tolerance_percent_pmpp": { "default": 1.0, "description": "TBD", "title": "diff_tolerance_percent_pmpp", "type": "number" }, "denominator_tolerance_percent_pmpp": { "default": 1.0, "description": "TBD", "title": "denominator_tolerance_percent_pmpp", "type": "number" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field denominator_tolerance_percent_pmpp: float = 1.0#
TBD
- field diff_tolerance_percent_pmpp: float = 1.0#
TBD
- field name: str = 'PV Clipping'#
Report name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.PvCurtailmentReportModel[source]#
Defines the user inputs for the PV Curtailment report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the PV Curtailment report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "PV Curtailment", "description": "Report name", "title": "name", "type": "string" }, "diff_tolerance_percent_pmpp": { "default": 1.0, "description": "TBD", "title": "diff_tolerance_percent_pmpp", "type": "number" }, "denominator_tolerance_percent_pmpp": { "default": 1.0, "description": "TBD", "title": "denominator_tolerance_percent_pmpp", "type": "number" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field denominator_tolerance_percent_pmpp: float = 1.0#
TBD
- field diff_tolerance_percent_pmpp: float = 1.0#
TBD
- field name: str = 'PV Curtailment'#
Report name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.RegControlTapNumberChangeCountsReportModel[source]#
Defines the user inputs for the RegControl Tap Number Change Counts report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the RegControl Tap Number Change Counts report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "RegControl Tap Number Change Counts", "description": "Report name", "title": "name", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field name: str = 'RegControl Tap Number Change Counts'#
Report name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ThermalMetricsReportModel[source]#
Defines the user inputs for the Thermal Metrics report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the Thermal Metrics report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "Thermal Metrics", "description": "Report name", "title": "name", "type": "string" }, "transformer_window_size_hours": { "default": 2, "description": "Transformer window size hours", "title": "transformer_window_size_hours", "type": "integer" }, "transformer_loading_percent_threshold": { "default": 150, "description": "Transformer loading percent threshold", "title": "transformer_loading_percent_threshold", "type": "integer" }, "transformer_loading_percent_moving_average_threshold": { "default": 120, "description": "Transformer loading percent moving average threshold", "title": "transformer_loading_percent_moving_average_threshold", "type": "integer" }, "line_window_size_hours": { "default": 1, "description": "Line window size hours", "title": "line_window_size_hours", "type": "integer" }, "line_loading_percent_threshold": { "default": 120, "description": "Line loading percent threshold", "title": "line_loading_percent_threshold", "type": "integer" }, "line_loading_percent_moving_average_threshold": { "default": 100, "description": "Line loading percent moving average threshold", "title": "line_loading_percent_moving_average_threshold", "type": "integer" }, "store_per_element_data": { "default": true, "description": "Set to true to store metrics for each line and transformer.", "title": "store_per_element_data", "type": "boolean" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field line_loading_percent_moving_average_threshold: int = 100#
Line loading percent moving average threshold
- field line_loading_percent_threshold: int = 120#
Line loading percent threshold
- field line_window_size_hours: int = 1#
Line window size hours
- field name: str = 'Thermal Metrics'#
Report name
- field store_per_element_data: bool = True#
Set to true to store metrics for each line and transformer.
- field transformer_loading_percent_moving_average_threshold: int = 120#
Transformer loading percent moving average threshold
- field transformer_loading_percent_threshold: int = 150#
Transformer loading percent threshold
- field transformer_window_size_hours: int = 2#
Transformer window size hours
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.VoltageMetricsReportModel[source]#
Defines the user inputs for the Voltage Metrics report.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for the Voltage Metrics report.", "type": "object", "properties": { "enabled": { "default": false, "description": "Set to true to enable the report", "title": "enabled", "type": "boolean" }, "scenarios": { "default": [], "description": "Scenarios to which the report applies. Default is all scenarios.", "items": { "type": "string" }, "title": "scenarios", "type": "array" }, "store_all_time_points": { "default": false, "description": "Set to true to store data for all time points. If false, store aggregated metrics in memory.", "title": "store_all_time_points", "type": "boolean" }, "name": { "default": "Voltage Metrics", "description": "Report name", "title": "name", "type": "string" }, "window_size_minutes": { "default": 60, "description": "Window size minutes", "title": "window_size_minutes", "type": "integer" }, "range_a_limits": { "default": [ 0.95, 1.05 ], "description": "ANSI Range A voltage limits", "items": {}, "title": "range_a_limits", "type": "array" }, "range_b_limits": { "default": [ 0.9, 1.0583 ], "description": "ANSI Range B voltage limits", "items": {}, "title": "range_b_limits", "type": "array" }, "store_per_element_data": { "default": true, "description": "Set to true to store metrics for each node.", "title": "store_per_element_data", "type": "boolean" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field name: str = 'Voltage Metrics'#
Report name
- field range_a_limits: List = [0.95, 1.05]#
ANSI Range A voltage limits
- field range_b_limits: List = [0.9, 1.0583]#
ANSI Range B voltage limits
- field store_per_element_data: bool = True#
Set to true to store metrics for each node.
- field window_size_minutes: int = 60#
Window size minutes
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.ReportsModel[source]#
Defines the user inputs for reports.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines the user inputs for reports.", "type": "object", "properties": { "Format": { "allOf": [ { "$ref": "#/$defs/FileFormat" } ], "default": "h5", "description": "Controls the file format.", "title": "format" }, "Granularity": { "allOf": [ { "$ref": "#/$defs/ReportGranularity" } ], "default": "per_element_per_time_point", "description": "Specifies the granularity on which data is collected.", "title": "granularity" }, "Types": { "default": [], "description": "Reports to collect.", "items": {}, "title": "types", "type": "array" } }, "$defs": { "FileFormat": { "description": "Supported file formats", "enum": [ "csv", "h5" ], "title": "FileFormat", "type": "string" }, "ReportGranularity": { "description": "Specifies the granularity on which data is collected.", "enum": [ "per_element_per_time_point", "per_element_total", "all_elements_per_time_point", "all_elements_total" ], "title": "ReportGranularity", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- Validators:
- field format: FileFormat = FileFormat.HDF5 (alias 'Format')#
Controls the file format.
- field granularity: ReportGranularity = ReportGranularity.PER_ELEMENT_PER_TIME_POINT (alias 'Granularity')#
Specifies the granularity on which data is collected.
- field types: List[Any] = [] (alias 'Types')#
Reports to collect.
- Validated by:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.simulation_input_models.SimulationSettingsModel[source]#
Defines user inputs for a simulation.
Show JSON schema
{ "title": "InputsBaseModel", "description": "Defines user inputs for a simulation.", "type": "object", "properties": { "Project": { "allOf": [ { "$ref": "#/$defs/ProjectModel" } ], "description": "Project settings", "title": "project" }, "Exports": { "allOf": [ { "$ref": "#/$defs/ExportsModel" } ], "default": { "Log Results": false, "Export Elements": true, "Export Element Types": [], "Export Data Tables": true, "Export PV Profiles": false, "Export Data In Memory": false, "Export Node Names By Type": false, "Export Event Log": true, "Export Format": "h5", "Export Compression": false, "HDF Max Chunk Bytes": 1048576 }, "description": "Exports settings", "title": "exports" }, "Frequency": { "allOf": [ { "$ref": "#/$defs/FrequencyModel" } ], "default": { "Enable frequency sweep": false, "Fundamental frequency": 60.0, "Start frequency": 1.0, "End frequency": 15.0, "frequency increment": 2.0, "Neglect shunt admittance": false, "Percentage load in series": 50.0 }, "description": "Frequency settings", "title": "frequency" }, "Helics": { "allOf": [ { "$ref": "#/$defs/HelicsModel" } ], "default": { "Co-simulation Mode": false, "Iterative Mode": false, "Error tolerance": 0.0001, "Max co-iterations": 15, "Broker": "mainbroker", "Broker port": 0, "Federate name": "PyDSS", "Time delta": 0.01, "Core type": "zmq", "Uninterruptible": true, "Helics logging level": 5 }, "description": "HELICS settings", "title": "helics" }, "Logging": { "allOf": [ { "$ref": "#/$defs/LoggingModel" } ], "default": { "Logging Level": "info", "Display on screen": true, "Log to external file": true, "Clear old log file": false, "Log time step updates": true }, "description": "Logging settings", "title": "logging" }, "MonteCarlo": { "allOf": [ { "$ref": "#/$defs/MonteCarloModel" } ], "default": { "Number of Monte Carlo scenarios": -1 }, "description": "Monte Carlo settings", "title": "monte_carlo" }, "Profiles": { "allOf": [ { "$ref": "#/$defs/ProfilesModel" } ], "default": { "Use profile manager": false, "source_type": "h5", "source": "Profiles_backup.hdf5", "Profile mapping": "", "is_relative_path": true, "settings": {} }, "description": "Profiles settings", "title": "profiles" }, "Reports": { "allOf": [ { "$ref": "#/$defs/ReportsModel" } ], "default": { "Format": "h5", "Granularity": "per_element_per_time_point", "Types": [] }, "description": "Reports settings", "title": "reports" } }, "$defs": { "ControlMode": { "description": "Supported control modes", "enum": [ "Static", "Time" ], "title": "ControlMode", "type": "string" }, "ExportsModel": { "additionalProperties": false, "description": "Defines the user inputs for defining data exports.", "properties": { "Log Results": { "default": false, "description": "Set to true to export circuit element values at each time point.", "title": "export_results", "type": "boolean" }, "Export Elements": { "default": true, "description": "Set to true to export static information for all circuit elements.", "title": "export_elements", "type": "boolean" }, "Export Element Types": { "default": [], "description": "Restrict 'export_elements' to these element types. Default is all types", "items": {}, "title": "export_element_types", "type": "array" }, "Export Data Tables": { "default": true, "description": "Set to true to export circuit element data in tabular files. While it does duplicate data, it provides a way to preserve a human-readable dataset that does not require PyDSS to interpret.", "title": "export_data_tables", "type": "boolean" }, "Export PV Profiles": { "default": false, "description": "Set to true to export PV profiles to tabular files.", "title": "export_pv_profiles", "type": "boolean" }, "Export Data In Memory": { "default": false, "description": "Set to true to keep circuit element data in memory rather than periodically flushing to an HDF5 file. This can be faster but will consume more memory.", "title": "export_data_in_memory", "type": "boolean" }, "Export Node Names By Type": { "default": false, "description": "Set to true to export node names by primary/secondary type to a file.", "title": "export_node_names_by_type", "type": "boolean" }, "Export Event Log": { "default": true, "description": "Set to true to export the OpenDSS event log.", "title": "export_event_log", "type": "boolean" }, "Export Format": { "allOf": [ { "$ref": "#/$defs/FileFormat" } ], "default": "h5", "description": "Controls the file format used if export_data_tables is true.", "title": "export_format" }, "Export Compression": { "default": false, "description": "Set to true to compress data exported with 'export_data_tables'.", "title": "export_compression", "type": "boolean" }, "HDF Max Chunk Bytes": { "default": 1048576, "description": "The chunk size in bytes to use for exported data in the HDF5 data store. The value is passed to the h5py package. Refer to http://docs.h5py.org/en/stable/high/dataset.html#chunked-storage for more information.", "title": "hdf_max_chunk_bytes", "type": "integer" } }, "title": "InputsBaseModel", "type": "object" }, "FileFormat": { "description": "Supported file formats", "enum": [ "csv", "h5" ], "title": "FileFormat", "type": "string" }, "FrequencyModel": { "additionalProperties": false, "description": "Defines the user inputs for defining frequency parameters.", "properties": { "Enable frequency sweep": { "default": false, "description": "Enable harmonic sweep. Works with only 'Static' and 'QSTS' simulation modes.", "title": "enable_frequency_sweep", "type": "boolean" }, "Fundamental frequency": { "default": 60.0, "description": "Fundamental system frequeny in Hertz", "title": "fundamental_frequency", "type": "number" }, "Start frequency": { "default": 1.0, "description": "Start system frequeny in Hertz", "title": "start_frequency", "type": "number" }, "End frequency": { "default": 15.0, "description": "End system frequeny in Hertz", "title": "end_frequency", "type": "number" }, "frequency increment": { "default": 2.0, "description": "As multiple of fundamental", "title": "frequency_increment", "type": "number" }, "Neglect shunt admittance": { "default": false, "description": "Neglect shunt addmittance for frequency sweep", "title": "neglect_shunt_admittance", "type": "boolean" }, "Percentage load in series": { "default": 50.0, "description": "Percent of load that is series RL for Harmonic studies", "title": "percentage_load_in_series", "type": "number" } }, "title": "InputsBaseModel", "type": "object" }, "HelicsModel": { "additionalProperties": false, "description": "Defines the user inputs for HELICS.", "properties": { "Co-simulation Mode": { "default": false, "description": "Set to true to enable the HELICS interface for co-simulation.", "title": "co_simulation_mode", "type": "boolean" }, "Iterative Mode": { "default": false, "description": "Iterative mode", "title": "iterative_mode", "type": "boolean" }, "Error tolerance": { "default": 0.0001, "description": "Error tolerance", "title": "error_tolerance", "type": "number" }, "Max co-iterations": { "default": 15, "description": "Max number of co-simulation iterations", "title": "max_co_iterations", "type": "integer" }, "Broker": { "default": "mainbroker", "description": "Broker name", "title": "broker", "type": "string" }, "Broker port": { "default": 0, "description": "Broker port", "title": "broker_port", "type": "integer" }, "Federate name": { "default": "PyDSS", "description": "Name of the federate", "title": "federate_name", "type": "string" }, "Time delta": { "default": 0.01, "description": "The property controlling the minimum time delta for a federate.", "title": "time_delta", "type": "number" }, "Core type": { "default": "zmq", "description": "Core type to be use for communication", "title": "core_type", "type": "string" }, "Uninterruptible": { "default": true, "description": "Can the federate be interrupted", "title": "uninterruptible", "type": "boolean" }, "Helics logging level": { "default": 5, "description": "Logging level for the federate. Refer to HELICS documentation.", "title": "logging_level", "type": "integer" } }, "title": "InputsBaseModel", "type": "object" }, "LoggingLevel": { "description": "Supported logging levels", "enum": [ "debug", "info", "warning", "error" ], "title": "LoggingLevel", "type": "string" }, "LoggingModel": { "additionalProperties": false, "description": "Defines the user inputs for controlling logging.", "properties": { "Logging Level": { "anyOf": [ { "$ref": "#/$defs/LoggingLevel" }, { "type": "null" } ], "default": "info", "description": "PyDSS minimum logging level", "title": "logging_level" }, "Display on screen": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to enable console logging.", "title": "enable_console" }, "Log to external file": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to enable logging to a file.", "title": "enable_file" }, "Clear old log file": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Set to true to clear and overwrite any existing log files.", "title": "clear_old_log_file" }, "Log time step updates": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Set to true to log each completed time step.", "title": "log_time_step_updates" } }, "title": "InputsBaseModel", "type": "object" }, "MonteCarloModel": { "additionalProperties": false, "description": "Defines the user inputs for Monte Carlo simulations.", "properties": { "Number of Monte Carlo scenarios": { "default": -1, "description": "Number of Monte Carlo scenarios", "title": "num_scenarios", "type": "integer" } }, "title": "InputsBaseModel", "type": "object" }, "ProfilesModel": { "additionalProperties": false, "description": "Defines user inputs for the Profile Manager.", "properties": { "Use profile manager": { "default": false, "description": "Set to true to enable the Profile Manager.", "title": "use_profile_manager", "type": "boolean" }, "source_type": { "anyOf": [ { "$ref": "#/$defs/FileFormat" }, { "type": "null" } ], "default": "h5", "description": "File format for source data", "title": "source_type" }, "source": { "default": "Profiles_backup.hdf5", "description": "File containing source data", "title": "source", "type": "string" }, "Profile mapping": { "default": "", "description": "Profile mapping", "title": "profile_mapping", "type": "string" }, "is_relative_path": { "default": true, "description": "Source file path is relative", "title": "is_relative_path", "type": "boolean" }, "settings": { "default": {}, "description": "Profiles settings", "title": "settings", "type": "object" } }, "title": "InputsBaseModel", "type": "object" }, "ProjectModel": { "additionalProperties": false, "description": "Defines the user inputs for the project.", "properties": { "Project Path": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Base path of project. Join with 'active_project' to get full path", "title": "project_path" }, "Active Project": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Active project name. Join with 'project_path' to get full path", "title": "active_project" }, "active_project_path": { "anyOf": [ { "format": "path", "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to project. Auto-generated.", "title": "active_project_path" }, "Scenarios": { "anyOf": [ { "items": { "$ref": "#/$defs/ScenarioModel" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "List of scenarios", "title": "scenarios" }, "Active Scenario": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "", "description": "Name of active scenario", "title": "active_scenario" }, "Start time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": "2020-01-01T00:00:00", "description": "Start time of simulation", "title": "start_time" }, "simulation_duration_min": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": 1440.0, "description": "Simulation duration in minutes.", "title": "simulation_duration_min" }, "Step resolution (sec)": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": 900.0, "description": "Time step resolution in seconds", "title": "step_resolution_sec" }, "Loadshape start time": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": "2020-01-01 00:00:00.0", "description": "Start time of loadshape profiles", "title": "loadshape_start_time" }, "Simulation range": { "anyOf": [ { "$ref": "#/$defs/SimulationRangeModel" }, { "type": "null" } ], "default": { "start": "00:00:00", "end": "23:59:59" }, "description": "Restrict control algorithms and data collection to these hours. Useful for skipping night when simulating PV Systems.", "title": "simulation_range" }, "Simulation Type": { "allOf": [ { "$ref": "#/$defs/SimulationType" } ], "default": "qsts", "description": "Type of simulation to run.", "title": "simulation_type" }, "Control mode": { "allOf": [ { "$ref": "#/$defs/ControlMode" } ], "default": "Static", "description": "Simulation control mode", "title": "control_mode" }, "Max Control Iterations": { "default": 50, "description": "Maximum outer loop control iterations", "title": "max_control_iterations", "type": "integer" }, "Convergence error percent threshold": { "default": 0.0, "description": "Convergence error threshold as a percent", "title": "convergence_error_percent_threshold", "type": "number" }, "Error tolerance": { "default": 0.001, "description": "Error tolerance in per unit", "title": "error_tolerance", "type": "number" }, "Max error tolerance": { "default": 0.0, "description": "Abort simulation if a convergence error exceeds this value.", "title": "max_error_tolerance", "type": "number" }, "Skip export on convergence error": { "default": true, "description": "Do not export data at a time point if there is a convergence error.", "title": "skip_export_on_convergence_error", "type": "boolean" }, "DSS File": { "default": "Master.dss", "description": "OpenDSS master filename", "title": "dss_file", "type": "string" }, "DSS File Absolute Path": { "default": false, "description": "Set to true if 'dss_file' is an absolute path.", "title": "dss_file_absolute_path", "type": "boolean" }, "Disable PyDSS controllers": { "default": false, "description": "Allows disabling of the control algorithms", "title": "disable_pydss_controllers", "type": "boolean" }, "Use Controller Registry": { "default": false, "description": "Use local controller registry.", "title": "use_controller_registry", "type": "boolean" } }, "title": "InputsBaseModel", "type": "object" }, "ReportGranularity": { "description": "Specifies the granularity on which data is collected.", "enum": [ "per_element_per_time_point", "per_element_total", "all_elements_per_time_point", "all_elements_total" ], "title": "ReportGranularity", "type": "string" }, "ReportsModel": { "additionalProperties": false, "description": "Defines the user inputs for reports.", "properties": { "Format": { "allOf": [ { "$ref": "#/$defs/FileFormat" } ], "default": "h5", "description": "Controls the file format.", "title": "format" }, "Granularity": { "allOf": [ { "$ref": "#/$defs/ReportGranularity" } ], "default": "per_element_per_time_point", "description": "Specifies the granularity on which data is collected.", "title": "granularity" }, "Types": { "default": [], "description": "Reports to collect.", "items": {}, "title": "types", "type": "array" } }, "title": "InputsBaseModel", "type": "object" }, "ScenarioModel": { "additionalProperties": false, "description": "Defines the user inputs for a scenario.", "properties": { "name": { "description": "Name of scenario", "title": "name", "type": "string" }, "post_process_infos": { "default": [], "description": "Post-process script descriptors", "items": { "$ref": "#/$defs/ScenarioPostProcessModel" }, "title": "post_process_infos", "type": "array" }, "snapshot_time_point_selection_config": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionConfigModel" } ], "default": { "mode": "none", "start_time": "2020-01-01T00:00:00", "search_duration_min": 1440.0 }, "description": "Descriptor for auto-selecting snapshot time points", "title": "snapshot_time_point_selection_config" } }, "required": [ "name" ], "title": "InputsBaseModel", "type": "object" }, "ScenarioPostProcessModel": { "additionalProperties": false, "description": "Defines user inputs for a scenario post-process script.", "properties": { "script": { "default": "", "description": "Post-process script", "title": "script", "type": "string" }, "config_file": { "description": "Post-process config file", "title": "config_file", "type": "string" } }, "required": [ "config_file" ], "title": "InputsBaseModel", "type": "object" }, "SimulationRangeModel": { "additionalProperties": false, "description": "Governs time range when control algorithms can run in a simulation. Does not affect\nsimulation times.", "properties": { "start": { "default": "00:00:00", "description": "Time to start running control algorithms each day.", "title": "start", "type": "string" }, "end": { "default": "23:59:59", "description": "Time to stop running control algorithms each day.", "title": "end", "type": "string" } }, "title": "InputsBaseModel", "type": "object" }, "SimulationType": { "description": "Supported simulation types", "enum": [ "dynamic", "qsts", "snapshot" ], "title": "SimulationType", "type": "string" }, "SnapshotTimePointSelectionConfigModel": { "additionalProperties": false, "description": "Defines the user inputs for auto-selecting snapshot time points.", "properties": { "mode": { "allOf": [ { "$ref": "#/$defs/SnapshotTimePointSelectionMode" } ], "default": "none", "description": "Mode", "title": "mode" }, "start_time": { "default": "2020-01-01T00:00:00", "description": "Start time in the load shape profiles", "format": "date-time", "title": "start_time", "type": "string" }, "search_duration_min": { "default": 1440.0, "description": "Duration in minutes to search in the load shape profiles", "title": "search_duration_min", "type": "number" } }, "title": "InputsBaseModel", "type": "object" }, "SnapshotTimePointSelectionMode": { "description": "Defines methods by which snapshot time points can be calculated.", "enum": [ "max_pv_load_ratio", "max_load", "daytime_min_load", "pv_minus_load", "none" ], "title": "SnapshotTimePointSelectionMode", "type": "string" } }, "additionalProperties": false, "required": [ "Project" ] }
- Config:
title: str = InputsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field exports: ExportsModel = ExportsModel(export_results=False, export_elements=True, export_element_types=[], export_data_tables=True, export_pv_profiles=False, export_data_in_memory=False, export_node_names_by_type=False, export_event_log=True, export_format=<FileFormat.HDF5: 'h5'>, export_compression=False, hdf_max_chunk_bytes=1048576) (alias 'Exports')#
Exports settings
- field frequency: FrequencyModel = FrequencyModel(enable_frequency_sweep=False, fundamental_frequency=60.0, start_frequency=1.0, end_frequency=15.0, frequency_increment=2.0, neglect_shunt_admittance=False, percentage_load_in_series=50.0) (alias 'Frequency')#
Frequency settings
- field helics: HelicsModel = HelicsModel(co_simulation_mode=False, iterative_mode=False, error_tolerance=0.0001, max_co_iterations=15, broker='mainbroker', broker_port=0, federate_name='PyDSS', time_delta=0.01, core_type='zmq', uninterruptible=True, logging_level=5) (alias 'Helics')#
HELICS settings
- field logging: LoggingModel = LoggingModel(logging_level=<LoggingLevel.INFO: 'info'>, enable_console=True, enable_file=True, clear_old_log_file=False, log_time_step_updates=True) (alias 'Logging')#
Logging settings
- field monte_carlo: MonteCarloModel = MonteCarloModel(num_scenarios=-1) (alias 'MonteCarlo')#
Monte Carlo settings
- field profiles: ProfilesModel = ProfilesModel(use_profile_manager=False, source_type=<FileFormat.HDF5: 'h5'>, source='Profiles_backup.hdf5', profile_mapping='', is_relative_path=True, settings={}) (alias 'Profiles')#
Profiles settings
- field project: ProjectModel [Required] (alias 'Project')#
Project settings
- field reports: ReportsModel = ReportsModel(format=<FileFormat.HDF5: 'h5'>, granularity=<ReportGranularity.PER_ELEMENT_PER_TIME_POINT: 'per_element_per_time_point'>, types=[]) (alias 'Reports')#
Reports settings
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Scenario setup models#
- pydantic model PyDSS.controllers.ControllerBaseModel[source]#
Show JSON schema
{ "title": "ControllerBaseModel", "type": "object", "properties": {}, "additionalProperties": false }
- Config:
title: str = ControllerBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.controllers.PvControllerModel[source]#
Show JSON schema
{ "title": "ControllerBaseModel", "type": "object", "properties": { "Control1": { "description": "Algorithm to run in the first control loop", "title": "Control1", "type": "string" }, "Control2": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Algorithm to run in the second control loop", "title": "Control1" }, "Control3": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Algorithm to run in the third control loop", "title": "Control3" }, "pf": { "description": "Power factor for the PV system", "title": "pf", "type": "integer" }, "pfMin": { "description": "Minimum allowable power factor for the PV system. Applied only if enable_pf_limit is set.", "title": "pfMin", "type": "number" }, "pfMax": { "description": "Maximum allowable power factor for the PV system. Applied only if enable_pf_limit is set.", "title": "pfMax", "type": "number" }, "Pmin": { "description": "TODO", "title": "Pmin", "type": "number" }, "Pmax": { "description": "TODO", "title": "Pmax", "type": "number" }, "uMin": { "description": "Per unit voltage value at which inverter produces maximum vars. (volt / var algorithm).", "title": "uMin", "type": "number" }, "uDbMin": { "description": "Lower bound for the voltage deadband [per unit]. Inverter will not produce or consume vars within these bands (volt / var algorithm).", "title": "uDbMin", "type": "number" }, "uDbMax": { "description": "Upper bound for the voltage deadband [per unit]. Inverter will not produce or consume vars within these bands (volt / var algorithm).", "title": "uDbMax", "type": "number" }, "uMax": { "description": "Per unit voltage value at which inverter consumes maximum vars (volt / var algorithm).", "title": "uMax", "type": "number" }, "QlimPU": { "description": "Inverter reactive power limit [per unit] for the volt / var algorithm.", "title": "QlimPU", "type": "number" }, "PFlim": { "description": "Inverter power factor limit. Applied only if enable_pf_limit is set.", "title": "PFlim", "type": "number" }, "Enable PF limit": { "description": "Flag to enable / disable power factor limits on the inverter", "title": "EnablePFLimit", "type": "boolean" }, "uMinC": { "description": "Lower voltage bound [per unit] for the volt / watt algorithm", "title": "uMinC", "type": "number" }, "uMaxC": { "description": "Upper voltage bound [per unit] for the volt / watt algorithm", "title": "uMaxC", "type": "number" }, "PminVW": { "description": "Lower bound for the inveter active power output for the volt / watt algorithm", "title": "PminVW", "type": "number" }, "VWtype": { "description": "volt / watt algorithm to be implemented on rated or available power", "title": "VWtype", "type": "string" }, "%PCutin": { "description": "Percentage cut-in power -- Percentage of kVA rating of inverter. When the inverter is OFF, the power from the array must be greater than this for the inverter to turn on.", "title": "PCutin", "type": "number" }, "%PCutout": { "description": "Percentage cut-out power -- Percentage of kVA rating of inverter. When the inverter is ON, the inverter turns OFF when the power from the array drops below this value.", "title": "%PCutout", "type": "number" }, "Efficiency": { "description": "Efficieny of the inverter system", "title": "Efficiency", "type": "number" }, "Priority": { "description": "Set export priority for active power or reactive power", "title": "Priority", "type": "string" }, "DampCoef": { "description": "Damping cooefficient for the convergence algorithm", "title": "DampCoef", "type": "number" } }, "additionalProperties": false, "required": [ "Control1", "Control2", "Control3", "pf", "pfMin", "pfMax", "Pmin", "Pmax", "uMin", "uDbMin", "uDbMax", "uMax", "QlimPU", "PFlim", "Enable PF limit", "uMinC", "uMaxC", "PminVW", "VWtype", "%PCutin", "%PCutout", "Efficiency", "Priority", "DampCoef" ] }
- Config:
title: str = ControllerBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
populate_by_name: bool = True
- Fields:
- field control1: str [Required] (alias 'Control1')#
Algorithm to run in the first control loop
- field control2: str | None [Required] (alias 'Control2')#
Algorithm to run in the second control loop
- field control3: str | None [Required] (alias 'Control3')#
Algorithm to run in the third control loop
- field damp_coef: float [Required] (alias 'DampCoef')#
Damping cooefficient for the convergence algorithm
- field efficiency: float [Required] (alias 'Efficiency')#
Efficieny of the inverter system
- field enable_pf_limit: bool [Required] (alias 'Enable PF limit')#
Flag to enable / disable power factor limits on the inverter
- field p_max: float [Required] (alias 'Pmax')#
TODO
- field p_min: float [Required] (alias 'Pmin')#
TODO
- field p_min_vw: float [Required] (alias 'PminVW')#
Lower bound for the inveter active power output for the volt / watt algorithm
- field percent_p_cutin: float [Required] (alias '%PCutin')#
Percentage cut-in power – Percentage of kVA rating of inverter. When the inverter is OFF, the power from the array must be greater than this for the inverter to turn on.
- field percent_p_cutout: float [Required] (alias '%PCutout')#
Percentage cut-out power – Percentage of kVA rating of inverter. When the inverter is ON, the inverter turns OFF when the power from the array drops below this value.
- field pf: int [Required]#
Power factor for the PV system
- field pf_lim: float [Required] (alias 'PFlim')#
Inverter power factor limit. Applied only if enable_pf_limit is set.
- field pf_max: float [Required] (alias 'pfMax')#
Maximum allowable power factor for the PV system. Applied only if enable_pf_limit is set.
- field pf_min: float [Required] (alias 'pfMin')#
Minimum allowable power factor for the PV system. Applied only if enable_pf_limit is set.
- field priority: str [Required] (alias 'Priority')#
Set export priority for active power or reactive power
- field q_lim_pu: float [Required] (alias 'QlimPU')#
Inverter reactive power limit [per unit] for the volt / var algorithm.
- field u_db_max: float [Required] (alias 'uDbMax')#
Upper bound for the voltage deadband [per unit]. Inverter will not produce or consume vars within these bands (volt / var algorithm).
- field u_db_min: float [Required] (alias 'uDbMin')#
Lower bound for the voltage deadband [per unit]. Inverter will not produce or consume vars within these bands (volt / var algorithm).
- field u_max: float [Required] (alias 'uMax')#
Per unit voltage value at which inverter consumes maximum vars (volt / var algorithm).
- field u_max_c: float [Required] (alias 'uMaxC')#
Upper voltage bound [per unit] for the volt / watt algorithm
- field u_min: float [Required] (alias 'uMin')#
Per unit voltage value at which inverter produces maximum vars. (volt / var algorithm).
- field u_min_c: float [Required] (alias 'uMinC')#
Lower voltage bound [per unit] for the volt / watt algorithm
- field vw_type: str [Required] (alias 'VWtype')#
volt / watt algorithm to be implemented on rated or available power
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Thermal metrics models#
- pydantic model PyDSS.thermal_metrics.ThermalMetricsBaseModel[source]#
Show JSON schema
{ "title": "ThermalMetricsBaseModel", "type": "object", "properties": {}, "additionalProperties": false }
- Config:
title: str = ThermalMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.thermal_metrics.ThermalMetricsModel[source]#
Show JSON schema
{ "title": "ThermalMetricsBaseModel", "type": "object", "properties": { "max_instantaneous_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum instantaneous loading percent for each element", "title": "max_instantaneous_loadings_pct", "type": "object" }, "max_instantaneous_loading_pct": { "default": 120, "description": "maximum instantaneous loading percent overall", "title": "max_instantaneous_loading_pct", "type": "number" }, "max_moving_average_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum moving average loading percent for each element", "title": "max_moving_average_loadings_pct", "type": "object" }, "max_moving_average_loading_pct": { "default": 100, "description": "maximum moving average loading percent overall", "title": "max_moving_average_loading_pct", "type": "number" }, "window_size_hours": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "window size used to calculate the moving average", "title": "window_size_hours" }, "num_time_points_with_instantaneous_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the instantaneous threshold was violated", "title": "num_time_points_with_instantaneous_violations" }, "num_time_points_with_moving_average_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the moving average threshold was violated", "title": "num_time_points_with_moving_average_violations" }, "instantaneous_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "instantaneous threshold", "title": "instantaneous_threshold" }, "moving_average_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "moving average threshold", "title": "moving_average_threshold" } }, "additionalProperties": false }
- Config:
title: str = ThermalMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field instantaneous_threshold: int | None = None#
instantaneous threshold
- field max_instantaneous_loading_pct: float = 120#
maximum instantaneous loading percent overall
- field max_instantaneous_loadings_pct: Dict[str, float] = {}#
maximum instantaneous loading percent for each element
- field max_moving_average_loading_pct: float = 100#
maximum moving average loading percent overall
- field max_moving_average_loadings_pct: Dict[str, float] = {}#
maximum moving average loading percent for each element
- field moving_average_threshold: int | None = None#
moving average threshold
- field num_time_points_with_instantaneous_violations: int | None = None#
number of time points where the instantaneous threshold was violated
- field num_time_points_with_moving_average_violations: int | None = None#
number of time points where the moving average threshold was violated
- field window_size_hours: int | None = None#
window size used to calculate the moving average
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.thermal_metrics.ThermalMetricsSummaryModel[source]#
Show JSON schema
{ "title": "ThermalMetricsBaseModel", "type": "object", "properties": { "line_loadings": { "allOf": [ { "$ref": "#/$defs/ThermalMetricsModel" } ], "description": "line loading metrics", "title": "line_loadings" }, "transformer_loadings": { "anyOf": [ { "$ref": "#/$defs/ThermalMetricsModel" }, { "type": "null" } ], "description": "transformer loading metrics", "title": "transformer_loadings" } }, "$defs": { "ThermalMetricsModel": { "additionalProperties": false, "properties": { "max_instantaneous_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum instantaneous loading percent for each element", "title": "max_instantaneous_loadings_pct", "type": "object" }, "max_instantaneous_loading_pct": { "default": 120, "description": "maximum instantaneous loading percent overall", "title": "max_instantaneous_loading_pct", "type": "number" }, "max_moving_average_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum moving average loading percent for each element", "title": "max_moving_average_loadings_pct", "type": "object" }, "max_moving_average_loading_pct": { "default": 100, "description": "maximum moving average loading percent overall", "title": "max_moving_average_loading_pct", "type": "number" }, "window_size_hours": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "window size used to calculate the moving average", "title": "window_size_hours" }, "num_time_points_with_instantaneous_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the instantaneous threshold was violated", "title": "num_time_points_with_instantaneous_violations" }, "num_time_points_with_moving_average_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the moving average threshold was violated", "title": "num_time_points_with_moving_average_violations" }, "instantaneous_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "instantaneous threshold", "title": "instantaneous_threshold" }, "moving_average_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "moving average threshold", "title": "moving_average_threshold" } }, "title": "ThermalMetricsBaseModel", "type": "object" } }, "additionalProperties": false, "required": [ "line_loadings", "transformer_loadings" ] }
- Config:
title: str = ThermalMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field line_loadings: ThermalMetricsModel [Required]#
line loading metrics
- field transformer_loadings: ThermalMetricsModel | None [Required]#
transformer loading metrics
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.thermal_metrics.SimulationThermalMetricsModel[source]#
Show JSON schema
{ "title": "ThermalMetricsBaseModel", "type": "object", "properties": { "scenarios": { "additionalProperties": { "$ref": "#/$defs/ThermalMetricsSummaryModel" }, "description": "thermal metrics by PyDSS scenario name", "title": "scenarios", "type": "object" } }, "$defs": { "ThermalMetricsModel": { "additionalProperties": false, "properties": { "max_instantaneous_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum instantaneous loading percent for each element", "title": "max_instantaneous_loadings_pct", "type": "object" }, "max_instantaneous_loading_pct": { "default": 120, "description": "maximum instantaneous loading percent overall", "title": "max_instantaneous_loading_pct", "type": "number" }, "max_moving_average_loadings_pct": { "additionalProperties": { "type": "number" }, "default": {}, "description": "maximum moving average loading percent for each element", "title": "max_moving_average_loadings_pct", "type": "object" }, "max_moving_average_loading_pct": { "default": 100, "description": "maximum moving average loading percent overall", "title": "max_moving_average_loading_pct", "type": "number" }, "window_size_hours": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "window size used to calculate the moving average", "title": "window_size_hours" }, "num_time_points_with_instantaneous_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the instantaneous threshold was violated", "title": "num_time_points_with_instantaneous_violations" }, "num_time_points_with_moving_average_violations": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "number of time points where the moving average threshold was violated", "title": "num_time_points_with_moving_average_violations" }, "instantaneous_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "instantaneous threshold", "title": "instantaneous_threshold" }, "moving_average_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "moving average threshold", "title": "moving_average_threshold" } }, "title": "ThermalMetricsBaseModel", "type": "object" }, "ThermalMetricsSummaryModel": { "additionalProperties": false, "properties": { "line_loadings": { "allOf": [ { "$ref": "#/$defs/ThermalMetricsModel" } ], "description": "line loading metrics", "title": "line_loadings" }, "transformer_loadings": { "anyOf": [ { "$ref": "#/$defs/ThermalMetricsModel" }, { "type": "null" } ], "description": "transformer loading metrics", "title": "transformer_loadings" } }, "required": [ "line_loadings", "transformer_loadings" ], "title": "ThermalMetricsBaseModel", "type": "object" } }, "additionalProperties": false, "required": [ "scenarios" ] }
- Config:
title: str = ThermalMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field scenarios: Dict[str, ThermalMetricsSummaryModel] [Required]#
thermal metrics by PyDSS scenario name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Voltage metrics models#
- pydantic model PyDSS.node_voltage_metrics.VoltageMetricsBaseModel[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": {}, "additionalProperties": false }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric1[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "time_points": { "default": null, "description": "time points that contain voltages between ANSI A and ANSI B thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "default": null, "description": "amount of time where metric 1 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "additionalProperties": false }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field duration: timedelta = None#
amount of time where metric 1 existed (len(time_points) * resolution)
- field time_points: List[datetime] = None#
time points that contain voltages between ANSI A and ANSI B thresholds
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric2[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "duration": { "description": "amount of time where a node experienced ANSI A violations", "format": "duration", "title": "duration", "type": "string" }, "duration_percentage": { "description": "percentage of overall time", "title": "duration_percentage", "type": "number" } }, "additionalProperties": false, "required": [ "duration", "duration_percentage" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field duration: timedelta [Required]#
amount of time where a node experienced ANSI A violations
- field duration_percentage: float [Required]#
percentage of overall time
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric3[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "time_points": { "description": "time points where moving average voltages violated ANSI A thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "description": "amount of time where metric 3 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "additionalProperties": false, "required": [ "time_points", "duration" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field duration: timedelta [Required]#
amount of time where metric 3 existed (len(time_points) * resolution)
- field time_points: List[datetime] [Required]#
time points where moving average voltages violated ANSI A thresholds
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric4[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "percent_node_ansi_a_violations": { "description": "percent of nodes with ANSI A violations at time points. Excludes time points with no violations. Inner list is [timestamp, percent].", "items": { "items": {}, "type": "array" }, "title": "percent_node_ansi_a_violations", "type": "array" } }, "additionalProperties": false, "required": [ "percent_node_ansi_a_violations" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field percent_node_ansi_a_violations: List[List] [Required]#
percent of nodes with ANSI A violations at time points. Excludes time points with no violations. Inner list is [timestamp, percent].
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric5[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "min_voltages": { "description": "Mapping of node name to minimum voltage", "title": "min_voltage_by_node", "type": "object" }, "max_voltages": { "description": "Mapping of node name to maximum voltage", "title": "max_voltage_by_node", "type": "object" } }, "additionalProperties": false, "required": [ "min_voltages", "max_voltages" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field max_voltages: Dict [Required]#
Mapping of node name to maximum voltage
- field min_voltages: Dict [Required]#
Mapping of node name to minimum voltage
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetric5[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "min_voltages": { "description": "Mapping of node name to minimum voltage", "title": "min_voltage_by_node", "type": "object" }, "max_voltages": { "description": "Mapping of node name to maximum voltage", "title": "max_voltage_by_node", "type": "object" } }, "additionalProperties": false, "required": [ "min_voltages", "max_voltages" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field max_voltages: Dict [Required]#
Mapping of node name to maximum voltage
- field min_voltages: Dict [Required]#
Mapping of node name to minimum voltage
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetricsSummaryModel[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "voltage_duration_between_ansi_a_and_b_minutes": { "description": "time in minutes that contain voltages between ANSI A and ANSI B thresholds", "title": "voltage_duration_between_ansi_a_and_b_minutes", "type": "integer" }, "max_per_node_voltage_duration_outside_ansi_a_minutes": { "description": "maximum time in minutes that a node was outside ANSI A thresholds", "title": "max_per_node_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_average_voltage_duration_outside_ansi_a_minutes": { "description": "time in minutes the moving average voltage was outside ANSI A", "title": "moving_average_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_window_minutes": { "description": "window size in minutes for moving average metrics", "title": "moving_window_minutes", "type": "integer" }, "max_voltage": { "description": "maximum voltage seen on any node", "title": "max_voltage", "type": "number" }, "min_voltage": { "description": "minimum voltage seen on any node", "title": "min_voltage", "type": "number" }, "num_nodes_always_inside_ansi_a": { "description": "number of nodes always inside ANSI A thresholds", "title": "num_nodes_always_inside_ansi_a", "type": "integer" }, "num_nodes_any_outside_ansi_a_always_inside_ansi_b": { "description": "number of nodes with some ANSI A violations but no ANSI B violations", "title": "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "type": "integer" }, "num_nodes_any_outside_ansi_b": { "description": "number of nodes with some ANSI B violations", "title": "num_nodes_always_outside_ansi_b", "type": "integer" }, "num_time_points_with_ansi_b_violations": { "description": "number of time points with ANSI B violations", "title": "num_time_points_with_ansi_b_violations", "type": "integer" }, "total_num_time_points": { "description": "number of time points in the simulation", "title": "total_num_time_points", "type": "integer" }, "total_simulation_duration": { "description": "total length of time of the simulation", "format": "duration", "title": "total_simulation_duration", "type": "string" } }, "additionalProperties": false, "required": [ "voltage_duration_between_ansi_a_and_b_minutes", "max_per_node_voltage_duration_outside_ansi_a_minutes", "moving_average_voltage_duration_outside_ansi_a_minutes", "moving_window_minutes", "max_voltage", "min_voltage", "num_nodes_always_inside_ansi_a", "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "num_nodes_any_outside_ansi_b", "num_time_points_with_ansi_b_violations", "total_num_time_points", "total_simulation_duration" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field max_per_node_voltage_duration_outside_ansi_a_minutes: float [Required]#
maximum time in minutes that a node was outside ANSI A thresholds
- field max_voltage: float [Required]#
maximum voltage seen on any node
- field min_voltage: float [Required]#
minimum voltage seen on any node
- field moving_average_voltage_duration_outside_ansi_a_minutes: float [Required]#
time in minutes the moving average voltage was outside ANSI A
- field moving_window_minutes: int [Required]#
window size in minutes for moving average metrics
- field num_nodes_always_inside_ansi_a: int [Required]#
number of nodes always inside ANSI A thresholds
- field num_nodes_any_outside_ansi_a_always_inside_ansi_b: int [Required]#
number of nodes with some ANSI A violations but no ANSI B violations
- field num_nodes_any_outside_ansi_b: int [Required]#
number of nodes with some ANSI B violations
- field num_time_points_with_ansi_b_violations: int [Required]#
number of time points with ANSI B violations
- field total_num_time_points: int [Required]#
number of time points in the simulation
- field total_simulation_duration: timedelta [Required]#
total length of time of the simulation
- field voltage_duration_between_ansi_a_and_b_minutes: int [Required]#
time in minutes that contain voltages between ANSI A and ANSI B thresholds
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetricsModel[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "metric_1": { "allOf": [ { "$ref": "#/$defs/VoltageMetric1" } ], "description": "metric 1", "title": "metric_1" }, "metric_2": { "additionalProperties": { "$ref": "#/$defs/VoltageMetric2" }, "description": "metric 2", "title": "metric_2", "type": "object" }, "metric_3": { "allOf": [ { "$ref": "#/$defs/VoltageMetric3" } ], "description": "metric 3", "title": "metric_3" }, "metric_4": { "allOf": [ { "$ref": "#/$defs/VoltageMetric4" } ], "description": "metric 4", "title": "metric_4" }, "metric_5": { "allOf": [ { "$ref": "#/$defs/VoltageMetric5" } ], "description": "metric 5", "title": "metric_5" }, "metric_6": { "allOf": [ { "$ref": "#/$defs/VoltageMetric6" } ], "description": "metric 6", "title": "metric_6" }, "summary": { "anyOf": [ { "$ref": "#/$defs/VoltageMetricsSummaryModel" }, { "type": "null" } ], "description": "summary of metrics", "title": "summary" } }, "$defs": { "VoltageMetric1": { "additionalProperties": false, "properties": { "time_points": { "default": null, "description": "time points that contain voltages between ANSI A and ANSI B thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "default": null, "description": "amount of time where metric 1 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric2": { "additionalProperties": false, "properties": { "duration": { "description": "amount of time where a node experienced ANSI A violations", "format": "duration", "title": "duration", "type": "string" }, "duration_percentage": { "description": "percentage of overall time", "title": "duration_percentage", "type": "number" } }, "required": [ "duration", "duration_percentage" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric3": { "additionalProperties": false, "properties": { "time_points": { "description": "time points where moving average voltages violated ANSI A thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "description": "amount of time where metric 3 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric4": { "additionalProperties": false, "properties": { "percent_node_ansi_a_violations": { "description": "percent of nodes with ANSI A violations at time points. Excludes time points with no violations. Inner list is [timestamp, percent].", "items": { "items": {}, "type": "array" }, "title": "percent_node_ansi_a_violations", "type": "array" } }, "required": [ "percent_node_ansi_a_violations" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric5": { "additionalProperties": false, "properties": { "min_voltages": { "description": "Mapping of node name to minimum voltage", "title": "min_voltage_by_node", "type": "object" }, "max_voltages": { "description": "Mapping of node name to maximum voltage", "title": "max_voltage_by_node", "type": "object" } }, "required": [ "min_voltages", "max_voltages" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric6": { "additionalProperties": false, "properties": { "num_time_points": { "description": "number of time points that violate ANSI B thresholds", "title": "num_time_points", "type": "integer" }, "percent_time_points": { "description": "percentage of time points that violate ANSI B thresholds", "title": "percent_time_points", "type": "number" }, "duration": { "description": "amount of time where metric 6 existed (len(num_time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "num_time_points", "percent_time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsSummaryModel": { "additionalProperties": false, "properties": { "voltage_duration_between_ansi_a_and_b_minutes": { "description": "time in minutes that contain voltages between ANSI A and ANSI B thresholds", "title": "voltage_duration_between_ansi_a_and_b_minutes", "type": "integer" }, "max_per_node_voltage_duration_outside_ansi_a_minutes": { "description": "maximum time in minutes that a node was outside ANSI A thresholds", "title": "max_per_node_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_average_voltage_duration_outside_ansi_a_minutes": { "description": "time in minutes the moving average voltage was outside ANSI A", "title": "moving_average_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_window_minutes": { "description": "window size in minutes for moving average metrics", "title": "moving_window_minutes", "type": "integer" }, "max_voltage": { "description": "maximum voltage seen on any node", "title": "max_voltage", "type": "number" }, "min_voltage": { "description": "minimum voltage seen on any node", "title": "min_voltage", "type": "number" }, "num_nodes_always_inside_ansi_a": { "description": "number of nodes always inside ANSI A thresholds", "title": "num_nodes_always_inside_ansi_a", "type": "integer" }, "num_nodes_any_outside_ansi_a_always_inside_ansi_b": { "description": "number of nodes with some ANSI A violations but no ANSI B violations", "title": "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "type": "integer" }, "num_nodes_any_outside_ansi_b": { "description": "number of nodes with some ANSI B violations", "title": "num_nodes_always_outside_ansi_b", "type": "integer" }, "num_time_points_with_ansi_b_violations": { "description": "number of time points with ANSI B violations", "title": "num_time_points_with_ansi_b_violations", "type": "integer" }, "total_num_time_points": { "description": "number of time points in the simulation", "title": "total_num_time_points", "type": "integer" }, "total_simulation_duration": { "description": "total length of time of the simulation", "format": "duration", "title": "total_simulation_duration", "type": "string" } }, "required": [ "voltage_duration_between_ansi_a_and_b_minutes", "max_per_node_voltage_duration_outside_ansi_a_minutes", "moving_average_voltage_duration_outside_ansi_a_minutes", "moving_window_minutes", "max_voltage", "min_voltage", "num_nodes_always_inside_ansi_a", "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "num_nodes_any_outside_ansi_b", "num_time_points_with_ansi_b_violations", "total_num_time_points", "total_simulation_duration" ], "title": "VoltageMetricsBaseModel", "type": "object" } }, "additionalProperties": false, "required": [ "metric_1", "metric_2", "metric_3", "metric_4", "metric_5", "metric_6", "summary" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field metric_1: VoltageMetric1 [Required]#
metric 1
- field metric_2: Dict[str, VoltageMetric2] [Required]#
metric 2
- field metric_3: VoltageMetric3 [Required]#
metric 3
- field metric_4: VoltageMetric4 [Required]#
metric 4
- field metric_5: VoltageMetric5 [Required]#
metric 5
- field metric_6: VoltageMetric6 [Required]#
metric 6
- field summary: VoltageMetricsSummaryModel | None [Required]#
summary of metrics
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.VoltageMetricsByBusTypeModel[source]#
Metrics separated by bus type
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "description": "Metrics separated by bus type", "type": "object", "properties": { "primaries": { "allOf": [ { "$ref": "#/$defs/VoltageMetricsModel" } ], "description": "metrics for primary buses", "title": "primaries" }, "secondaries": { "allOf": [ { "$ref": "#/$defs/VoltageMetricsModel" } ], "description": "metrics for secondary buses", "title": "secondaries" } }, "$defs": { "VoltageMetric1": { "additionalProperties": false, "properties": { "time_points": { "default": null, "description": "time points that contain voltages between ANSI A and ANSI B thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "default": null, "description": "amount of time where metric 1 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric2": { "additionalProperties": false, "properties": { "duration": { "description": "amount of time where a node experienced ANSI A violations", "format": "duration", "title": "duration", "type": "string" }, "duration_percentage": { "description": "percentage of overall time", "title": "duration_percentage", "type": "number" } }, "required": [ "duration", "duration_percentage" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric3": { "additionalProperties": false, "properties": { "time_points": { "description": "time points where moving average voltages violated ANSI A thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "description": "amount of time where metric 3 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric4": { "additionalProperties": false, "properties": { "percent_node_ansi_a_violations": { "description": "percent of nodes with ANSI A violations at time points. Excludes time points with no violations. Inner list is [timestamp, percent].", "items": { "items": {}, "type": "array" }, "title": "percent_node_ansi_a_violations", "type": "array" } }, "required": [ "percent_node_ansi_a_violations" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric5": { "additionalProperties": false, "properties": { "min_voltages": { "description": "Mapping of node name to minimum voltage", "title": "min_voltage_by_node", "type": "object" }, "max_voltages": { "description": "Mapping of node name to maximum voltage", "title": "max_voltage_by_node", "type": "object" } }, "required": [ "min_voltages", "max_voltages" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric6": { "additionalProperties": false, "properties": { "num_time_points": { "description": "number of time points that violate ANSI B thresholds", "title": "num_time_points", "type": "integer" }, "percent_time_points": { "description": "percentage of time points that violate ANSI B thresholds", "title": "percent_time_points", "type": "number" }, "duration": { "description": "amount of time where metric 6 existed (len(num_time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "num_time_points", "percent_time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsModel": { "additionalProperties": false, "properties": { "metric_1": { "allOf": [ { "$ref": "#/$defs/VoltageMetric1" } ], "description": "metric 1", "title": "metric_1" }, "metric_2": { "additionalProperties": { "$ref": "#/$defs/VoltageMetric2" }, "description": "metric 2", "title": "metric_2", "type": "object" }, "metric_3": { "allOf": [ { "$ref": "#/$defs/VoltageMetric3" } ], "description": "metric 3", "title": "metric_3" }, "metric_4": { "allOf": [ { "$ref": "#/$defs/VoltageMetric4" } ], "description": "metric 4", "title": "metric_4" }, "metric_5": { "allOf": [ { "$ref": "#/$defs/VoltageMetric5" } ], "description": "metric 5", "title": "metric_5" }, "metric_6": { "allOf": [ { "$ref": "#/$defs/VoltageMetric6" } ], "description": "metric 6", "title": "metric_6" }, "summary": { "anyOf": [ { "$ref": "#/$defs/VoltageMetricsSummaryModel" }, { "type": "null" } ], "description": "summary of metrics", "title": "summary" } }, "required": [ "metric_1", "metric_2", "metric_3", "metric_4", "metric_5", "metric_6", "summary" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsSummaryModel": { "additionalProperties": false, "properties": { "voltage_duration_between_ansi_a_and_b_minutes": { "description": "time in minutes that contain voltages between ANSI A and ANSI B thresholds", "title": "voltage_duration_between_ansi_a_and_b_minutes", "type": "integer" }, "max_per_node_voltage_duration_outside_ansi_a_minutes": { "description": "maximum time in minutes that a node was outside ANSI A thresholds", "title": "max_per_node_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_average_voltage_duration_outside_ansi_a_minutes": { "description": "time in minutes the moving average voltage was outside ANSI A", "title": "moving_average_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_window_minutes": { "description": "window size in minutes for moving average metrics", "title": "moving_window_minutes", "type": "integer" }, "max_voltage": { "description": "maximum voltage seen on any node", "title": "max_voltage", "type": "number" }, "min_voltage": { "description": "minimum voltage seen on any node", "title": "min_voltage", "type": "number" }, "num_nodes_always_inside_ansi_a": { "description": "number of nodes always inside ANSI A thresholds", "title": "num_nodes_always_inside_ansi_a", "type": "integer" }, "num_nodes_any_outside_ansi_a_always_inside_ansi_b": { "description": "number of nodes with some ANSI A violations but no ANSI B violations", "title": "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "type": "integer" }, "num_nodes_any_outside_ansi_b": { "description": "number of nodes with some ANSI B violations", "title": "num_nodes_always_outside_ansi_b", "type": "integer" }, "num_time_points_with_ansi_b_violations": { "description": "number of time points with ANSI B violations", "title": "num_time_points_with_ansi_b_violations", "type": "integer" }, "total_num_time_points": { "description": "number of time points in the simulation", "title": "total_num_time_points", "type": "integer" }, "total_simulation_duration": { "description": "total length of time of the simulation", "format": "duration", "title": "total_simulation_duration", "type": "string" } }, "required": [ "voltage_duration_between_ansi_a_and_b_minutes", "max_per_node_voltage_duration_outside_ansi_a_minutes", "moving_average_voltage_duration_outside_ansi_a_minutes", "moving_window_minutes", "max_voltage", "min_voltage", "num_nodes_always_inside_ansi_a", "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "num_nodes_any_outside_ansi_b", "num_time_points_with_ansi_b_violations", "total_num_time_points", "total_simulation_duration" ], "title": "VoltageMetricsBaseModel", "type": "object" } }, "additionalProperties": false, "required": [ "primaries", "secondaries" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field primaries: VoltageMetricsModel [Required]#
metrics for primary buses
- field secondaries: VoltageMetricsModel [Required]#
metrics for secondary buses
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.node_voltage_metrics.SimulationVoltageMetricsModel[source]#
Show JSON schema
{ "title": "VoltageMetricsBaseModel", "type": "object", "properties": { "scenarios": { "additionalProperties": { "$ref": "#/$defs/VoltageMetricsByBusTypeModel" }, "description": "voltage metrics by PyDSS scenario name", "title": "scenarios", "type": "object" } }, "$defs": { "VoltageMetric1": { "additionalProperties": false, "properties": { "time_points": { "default": null, "description": "time points that contain voltages between ANSI A and ANSI B thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "default": null, "description": "amount of time where metric 1 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric2": { "additionalProperties": false, "properties": { "duration": { "description": "amount of time where a node experienced ANSI A violations", "format": "duration", "title": "duration", "type": "string" }, "duration_percentage": { "description": "percentage of overall time", "title": "duration_percentage", "type": "number" } }, "required": [ "duration", "duration_percentage" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric3": { "additionalProperties": false, "properties": { "time_points": { "description": "time points where moving average voltages violated ANSI A thresholds", "items": { "format": "date-time", "type": "string" }, "title": "time_points", "type": "array" }, "duration": { "description": "amount of time where metric 3 existed (len(time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric4": { "additionalProperties": false, "properties": { "percent_node_ansi_a_violations": { "description": "percent of nodes with ANSI A violations at time points. Excludes time points with no violations. Inner list is [timestamp, percent].", "items": { "items": {}, "type": "array" }, "title": "percent_node_ansi_a_violations", "type": "array" } }, "required": [ "percent_node_ansi_a_violations" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric5": { "additionalProperties": false, "properties": { "min_voltages": { "description": "Mapping of node name to minimum voltage", "title": "min_voltage_by_node", "type": "object" }, "max_voltages": { "description": "Mapping of node name to maximum voltage", "title": "max_voltage_by_node", "type": "object" } }, "required": [ "min_voltages", "max_voltages" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetric6": { "additionalProperties": false, "properties": { "num_time_points": { "description": "number of time points that violate ANSI B thresholds", "title": "num_time_points", "type": "integer" }, "percent_time_points": { "description": "percentage of time points that violate ANSI B thresholds", "title": "percent_time_points", "type": "number" }, "duration": { "description": "amount of time where metric 6 existed (len(num_time_points) * resolution)", "format": "duration", "title": "duration", "type": "string" } }, "required": [ "num_time_points", "percent_time_points", "duration" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsByBusTypeModel": { "additionalProperties": false, "description": "Metrics separated by bus type", "properties": { "primaries": { "allOf": [ { "$ref": "#/$defs/VoltageMetricsModel" } ], "description": "metrics for primary buses", "title": "primaries" }, "secondaries": { "allOf": [ { "$ref": "#/$defs/VoltageMetricsModel" } ], "description": "metrics for secondary buses", "title": "secondaries" } }, "required": [ "primaries", "secondaries" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsModel": { "additionalProperties": false, "properties": { "metric_1": { "allOf": [ { "$ref": "#/$defs/VoltageMetric1" } ], "description": "metric 1", "title": "metric_1" }, "metric_2": { "additionalProperties": { "$ref": "#/$defs/VoltageMetric2" }, "description": "metric 2", "title": "metric_2", "type": "object" }, "metric_3": { "allOf": [ { "$ref": "#/$defs/VoltageMetric3" } ], "description": "metric 3", "title": "metric_3" }, "metric_4": { "allOf": [ { "$ref": "#/$defs/VoltageMetric4" } ], "description": "metric 4", "title": "metric_4" }, "metric_5": { "allOf": [ { "$ref": "#/$defs/VoltageMetric5" } ], "description": "metric 5", "title": "metric_5" }, "metric_6": { "allOf": [ { "$ref": "#/$defs/VoltageMetric6" } ], "description": "metric 6", "title": "metric_6" }, "summary": { "anyOf": [ { "$ref": "#/$defs/VoltageMetricsSummaryModel" }, { "type": "null" } ], "description": "summary of metrics", "title": "summary" } }, "required": [ "metric_1", "metric_2", "metric_3", "metric_4", "metric_5", "metric_6", "summary" ], "title": "VoltageMetricsBaseModel", "type": "object" }, "VoltageMetricsSummaryModel": { "additionalProperties": false, "properties": { "voltage_duration_between_ansi_a_and_b_minutes": { "description": "time in minutes that contain voltages between ANSI A and ANSI B thresholds", "title": "voltage_duration_between_ansi_a_and_b_minutes", "type": "integer" }, "max_per_node_voltage_duration_outside_ansi_a_minutes": { "description": "maximum time in minutes that a node was outside ANSI A thresholds", "title": "max_per_node_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_average_voltage_duration_outside_ansi_a_minutes": { "description": "time in minutes the moving average voltage was outside ANSI A", "title": "moving_average_voltage_duration_outside_ansi_a_minutes", "type": "number" }, "moving_window_minutes": { "description": "window size in minutes for moving average metrics", "title": "moving_window_minutes", "type": "integer" }, "max_voltage": { "description": "maximum voltage seen on any node", "title": "max_voltage", "type": "number" }, "min_voltage": { "description": "minimum voltage seen on any node", "title": "min_voltage", "type": "number" }, "num_nodes_always_inside_ansi_a": { "description": "number of nodes always inside ANSI A thresholds", "title": "num_nodes_always_inside_ansi_a", "type": "integer" }, "num_nodes_any_outside_ansi_a_always_inside_ansi_b": { "description": "number of nodes with some ANSI A violations but no ANSI B violations", "title": "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "type": "integer" }, "num_nodes_any_outside_ansi_b": { "description": "number of nodes with some ANSI B violations", "title": "num_nodes_always_outside_ansi_b", "type": "integer" }, "num_time_points_with_ansi_b_violations": { "description": "number of time points with ANSI B violations", "title": "num_time_points_with_ansi_b_violations", "type": "integer" }, "total_num_time_points": { "description": "number of time points in the simulation", "title": "total_num_time_points", "type": "integer" }, "total_simulation_duration": { "description": "total length of time of the simulation", "format": "duration", "title": "total_simulation_duration", "type": "string" } }, "required": [ "voltage_duration_between_ansi_a_and_b_minutes", "max_per_node_voltage_duration_outside_ansi_a_minutes", "moving_average_voltage_duration_outside_ansi_a_minutes", "moving_window_minutes", "max_voltage", "min_voltage", "num_nodes_always_inside_ansi_a", "num_nodes_any_outside_ansi_a_always_inside_ansi_b", "num_nodes_any_outside_ansi_b", "num_time_points_with_ansi_b_violations", "total_num_time_points", "total_simulation_duration" ], "title": "VoltageMetricsBaseModel", "type": "object" } }, "additionalProperties": false, "required": [ "scenarios" ] }
- Config:
title: str = VoltageMetricsBaseModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field scenarios: Dict[str, VoltageMetricsByBusTypeModel] [Required]#
voltage metrics by PyDSS scenario name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Feeder metrics models#
- pydantic model PyDSS.reports.feeder_losses.FeederLossesMetricsModel[source]#
Data model for metrics describing feeder losses
Show JSON schema
{ "title": "FeederLossesMetricsModel", "description": "Data model for metrics describing feeder losses", "type": "object", "properties": { "total_losses_kwh": { "default": null, "description": "Total losses in the circuit", "title": "total_losses_kwh", "type": "number" }, "line_losses_kwh": { "default": null, "description": "Total line losses", "title": "line_losses_kwh", "type": "number" }, "transformer_losses_kwh": { "default": null, "description": "Total transformer losses", "title": "transformer_losses_kwh", "type": "number" }, "total_load_demand_kwh": { "default": null, "description": "Total power output of loads", "title": "total_load_demand_kwh", "type": "number" } }, "additionalProperties": false }
- Config:
title: str = FeederLossesMetricsModel
str_strip_whitespace: bool = True
validate_assignment: bool = True
validate_default: bool = True
extra: str = forbid
use_enum_values: bool = False
- Fields:
- field line_losses_kwh: float = None#
Total line losses
- field total_load_demand_kwh: float = None#
Total power output of loads
- field total_losses_kwh: float = None#
Total losses in the circuit
- field transformer_losses_kwh: float = None#
Total transformer losses
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.reports.feeder_losses.SimulationFeederLossesMetricsModel[source]#
Show JSON schema
{ "title": "SimulationFeederLossesMetricsModel", "type": "object", "properties": { "scenarios": { "additionalProperties": { "$ref": "#/$defs/FeederLossesMetricsModel" }, "description": "Feeder losses by PyDSS scenario name", "title": "scenarios", "type": "object" } }, "$defs": { "FeederLossesMetricsModel": { "additionalProperties": false, "description": "Data model for metrics describing feeder losses", "properties": { "total_losses_kwh": { "default": null, "description": "Total losses in the circuit", "title": "total_losses_kwh", "type": "number" }, "line_losses_kwh": { "default": null, "description": "Total line losses", "title": "line_losses_kwh", "type": "number" }, "transformer_losses_kwh": { "default": null, "description": "Total transformer losses", "title": "transformer_losses_kwh", "type": "number" }, "total_load_demand_kwh": { "default": null, "description": "Total power output of loads", "title": "total_load_demand_kwh", "type": "number" } }, "title": "FeederLossesMetricsModel", "type": "object" } }, "required": [ "scenarios" ] }
- field scenarios: Dict[str, FeederLossesMetricsModel] [Required]#
Feeder losses by PyDSS scenario name
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
HELICS interface models#
- pydantic model PyDSS.helics_interface.Subscription[source]#
Show JSON schema
{ "title": "Subscription", "type": "object", "properties": { "model": { "title": "Model", "type": "string" }, "property": { "title": "Property", "type": "string" }, "id": { "title": "Id", "type": "string" }, "unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "subscribe": { "default": true, "title": "Subscribe", "type": "boolean" }, "data_type": { "$ref": "#/$defs/DataType" }, "multiplier": { "default": 1.0, "title": "Multiplier", "type": "number" }, "object": { "default": null, "title": "Object" }, "states": { "default": [ 0.0, 0.0, 0.0, 0.0, 0.0 ], "items": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "boolean" } ] }, "title": "States", "type": "array" }, "sub": { "default": null, "title": "Sub" } }, "$defs": { "DataType": { "enum": [ "double", "vector", "string", "boolean", "integer" ], "title": "DataType", "type": "string" } }, "required": [ "model", "property", "id", "data_type" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- field data_type: DataType [Required]#
- field id: str [Required]#
- field model: str [Required]#
- field multiplier: float = 1.0#
- field object: Any = None#
- field property: str [Required]#
- field states: List[float | int | bool] = [0.0, 0.0, 0.0, 0.0, 0.0]#
- field sub: Any = None#
- field subscribe: bool = True#
- field unit: str | None = None#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.helics_interface.Publication[source]#
Show JSON schema
{ "title": "Publication", "type": "object", "properties": { "model": { "title": "Model", "type": "string" }, "property": { "title": "Property", "type": "string" }, "id": { "title": "Id", "type": "string" }, "object": { "default": null, "title": "Object" }, "pub": { "default": null, "title": "Pub" }, "data_type": { "$ref": "#/$defs/DataType" } }, "$defs": { "DataType": { "enum": [ "double", "vector", "string", "boolean", "integer" ], "title": "DataType", "type": "string" } }, "required": [ "model", "property", "id", "data_type" ] }
- Fields:
- field data_type: DataType [Required]#
- field id: str [Required]#
- field model: str [Required]#
- field object: Any = None#
- field property: str [Required]#
- field pub: Any = None#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.helics_interface.Subscriptions[source]#
Show JSON schema
{ "title": "Subscriptions", "type": "object", "properties": { "federate": { "default": null, "title": "Federate" }, "opendss_models": { "title": "Opendss Models", "type": "object" }, "subscriptions": { "items": { "$ref": "#/$defs/Subscription" }, "title": "Subscriptions", "type": "array" } }, "$defs": { "DataType": { "enum": [ "double", "vector", "string", "boolean", "integer" ], "title": "DataType", "type": "string" }, "Subscription": { "properties": { "model": { "title": "Model", "type": "string" }, "property": { "title": "Property", "type": "string" }, "id": { "title": "Id", "type": "string" }, "unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Unit" }, "subscribe": { "default": true, "title": "Subscribe", "type": "boolean" }, "data_type": { "$ref": "#/$defs/DataType" }, "multiplier": { "default": 1.0, "title": "Multiplier", "type": "number" }, "object": { "default": null, "title": "Object" }, "states": { "default": [ 0.0, 0.0, 0.0, 0.0, 0.0 ], "items": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "boolean" } ] }, "title": "States", "type": "array" }, "sub": { "default": null, "title": "Sub" } }, "required": [ "model", "property", "id", "data_type" ], "title": "Subscription", "type": "object" } }, "required": [ "opendss_models", "subscriptions" ] }
- Fields:
- Validators:
is_in_opendss_model
»all fields
- field federate: Any = None#
- Validated by:
- field opendss_models: Dict [Required]#
- Validated by:
- field subscriptions: List[Subscription] [Required]#
- Validated by:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- pydantic model PyDSS.helics_interface.Publications[source]#
Show JSON schema
{ "title": "Publications", "type": "object", "properties": { "federate": { "default": null, "title": "Federate" }, "federate_name": { "title": "Federate Name", "type": "string" }, "opendss_models": { "title": "Opendss Models", "type": "object" }, "publications": { "default": [], "items": { "$ref": "#/$defs/Publication" }, "title": "Publications", "type": "array" }, "legacy_input": { "default": {}, "title": "Legacy Input", "type": "object" }, "input": { "default": {}, "title": "Input", "type": "object" } }, "$defs": { "DataType": { "enum": [ "double", "vector", "string", "boolean", "integer" ], "title": "DataType", "type": "string" }, "Publication": { "properties": { "model": { "title": "Model", "type": "string" }, "property": { "title": "Property", "type": "string" }, "id": { "title": "Id", "type": "string" }, "object": { "default": null, "title": "Object" }, "pub": { "default": null, "title": "Pub" }, "data_type": { "$ref": "#/$defs/DataType" } }, "required": [ "model", "property", "id", "data_type" ], "title": "Publication", "type": "object" } }, "required": [ "federate_name", "opendss_models" ] }
- Fields:
- Validators:
build_from_export
»all fields
build_from_legacy
»all fields
- field federate: Any = None#
- Validated by:
- field federate_name: str [Required]#
- Validated by:
- field input: Dict = {}#
- Validated by:
- field legacy_input: Dict = {}#
- Validated by:
- field opendss_models: Dict [Required]#
- Validated by:
- field publications: List[Publication] = []#
- Validated by:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.