Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve docs on batch error #884

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/power_grid_model/_core/power_grid_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ class PowerGridModel:
@property
def batch_error(self) -> PowerGridBatchError | None:
"""
Get the batch error object, if present
Get the batch error object, if present, after a batch calculation with errors.

Also works when continue_on_batch_error was set to True during the calculation.

Returns:
Batch error object, or None
Expand Down Expand Up @@ -474,8 +476,9 @@ def calculate_power_flow(
- None: Row based data for the specified component types.
- ComponentAttributeFilterOptions: Columnar data for the specified component types.
- set[str] | list[str]: Columnar data for the specified component types and attributes.
continue_on_batch_error (bool, optional): Continue the program (instead of throwing error) if some
scenarios fail.
continue_on_batch_error (bool, optional):
Continue the program (instead of throwing error) if some scenarios fail.
You can still retrieve the errors and succeeded/failed scenarios via the batch_error.
decode_error (bool, optional):
Decode error messages to their derived types if possible.

Expand Down Expand Up @@ -568,8 +571,9 @@ def calculate_state_estimation(
- None: Row based data for the specified component types.
- ComponentAttributeFilterOptions: Columnar data for the specified component types.
- set[str] | list[str]: Columnar data for the specified component types and attributes.
continue_on_batch_error (bool, optional): Continue the program (instead of throwing error) if some
scenarios fail.
continue_on_batch_error (bool, optional):
Continue the program (instead of throwing error) if some scenarios fail.
You can still retrieve the errors and succeeded/failed scenarios via the batch_error.
decode_error (bool, optional):
Decode error messages to their derived types if possible.

Expand Down Expand Up @@ -653,6 +657,7 @@ def calculate_short_circuit(
- set[str] | list[str]: Columnar data for the specified component types and attributes.
continue_on_batch_error (bool, optional):
Continue the program (instead of throwing error) if some scenarios fail.
You can still retrieve the errors and succeeded/failed scenarios via the batch_error.
decode_error (bool, optional):
Decode error messages to their derived types if possible.
short_circuit_voltage_scaling ({ShortCircuitVoltageSaling, str}, optional):
Expand Down
Loading