-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
106 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,59 @@ | ||
from _typeshed import Incomplete | ||
from typing import Any, SupportsIndex as Int | ||
|
||
from pandapower.auxiliary import pandapowerNet | ||
from pandapower.io_utils import JSONSerializableClass | ||
|
||
class BasicCtrl(JSONSerializableClass): | ||
index: Incomplete | ||
def __init__(self, container, index: Incomplete | None = None, **kwargs) -> None: ... | ||
def time_step(self, container, time) -> None: ... | ||
def initialize_control(self, container) -> None: ... | ||
def is_converged(self, container): ... | ||
def control_step(self, container) -> None: ... | ||
def repair_control(self, container) -> None: ... | ||
def restore_init_state(self, container) -> None: ... | ||
def finalize_control(self, container) -> None: ... | ||
def finalize_step(self, container, time) -> None: ... | ||
def set_active(self, container, in_service) -> None: ... | ||
index: int | ||
def __init__(self, container: pandapowerNet, index: Int | None = None, **kwargs) -> None: ... | ||
def time_step(self, container: pandapowerNet, time: Any) -> None: ... | ||
def initialize_control(self, container: pandapowerNet) -> None: ... | ||
def is_converged(self, container: pandapowerNet): ... | ||
def control_step(self, container: pandapowerNet) -> None: ... | ||
def repair_control(self, container: pandapowerNet) -> None: ... | ||
def restore_init_state(self, container: pandapowerNet) -> None: ... | ||
def finalize_control(self, container: pandapowerNet) -> None: ... | ||
def finalize_step(self, container: pandapowerNet, time: Any) -> None: ... | ||
def set_active(self, container: pandapowerNet, in_service: bool) -> None: ... | ||
def level_reset(self, prosumer) -> None: ... | ||
|
||
class Controller(BasicCtrl): | ||
matching_params: Incomplete | ||
index: Incomplete | ||
matching_params: dict[str, Any] | ||
index: int | ||
def __init__( | ||
self, | ||
net, | ||
net: pandapowerNet, | ||
in_service: bool = True, | ||
order: int = 0, | ||
level: int = 0, | ||
index: Incomplete | None = None, | ||
order: Int = 0, | ||
level: Int = 0, | ||
index: Int | None = None, | ||
recycle: bool = False, | ||
drop_same_existing_ctrl: bool = False, | ||
initial_run: bool = True, | ||
overwrite: bool = False, | ||
matching_params: Incomplete | None = None, | ||
matching_params: dict[str, Any] | None = None, | ||
**kwargs, | ||
) -> None: ... | ||
def add_controller_to_net( | ||
self, net, in_service, initial_run, order, level, index, recycle, drop_same_existing_ctrl, overwrite, **kwargs | ||
): ... | ||
def time_step(self, net, time) -> None: ... | ||
def initialize_control(self, net) -> None: ... | ||
def is_converged(self, net): ... | ||
def control_step(self, net) -> None: ... | ||
def repair_control(self, net) -> None: ... | ||
def restore_init_state(self, net) -> None: ... | ||
def finalize_control(self, net) -> None: ... | ||
def finalize_step(self, net, time) -> None: ... | ||
def set_active(self, net, in_service) -> None: ... | ||
def set_recycle(self, net) -> None: ... | ||
self, | ||
net: pandapowerNet, | ||
in_service: bool, | ||
initial_run: bool, | ||
order: Int, | ||
level: Int, | ||
index: Int, | ||
recycle: bool, | ||
drop_same_existing_ctrl: bool, | ||
overwrite: bool, | ||
**kwargs, | ||
) -> int: ... | ||
def time_step(self, net: pandapowerNet, time: Any) -> None: ... | ||
def initialize_control(self, net: pandapowerNet) -> None: ... | ||
def is_converged(self, net: pandapowerNet): ... | ||
def control_step(self, net: pandapowerNet) -> None: ... | ||
def repair_control(self, net: pandapowerNet) -> None: ... | ||
def restore_init_state(self, net: pandapowerNet) -> None: ... | ||
def finalize_control(self, net: pandapowerNet) -> None: ... | ||
def finalize_step(self, net: pandapowerNet, time: Any) -> None: ... | ||
def set_active(self, net: pandapowerNet, in_service: bool) -> None: ... | ||
def set_recycle(self, net: pandapowerNet) -> None: ... |
45 changes: 25 additions & 20 deletions
45
stubs/pandapower-stubs/control/controller/const_control.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
from _typeshed import Incomplete | ||
from collections.abc import Iterable | ||
from typing import Any, SupportsIndex as Int | ||
|
||
from pandas._typing import Axes, Scalar | ||
|
||
from pandapower.auxiliary import pandapowerNet | ||
from pandapower.control.basic_controller import Controller | ||
from pandapower.timeseries.data_source import DataSource | ||
|
||
class ConstControl(Controller): | ||
data_source: Incomplete | ||
element_index: Incomplete | ||
element: Incomplete | ||
values: Incomplete | ||
profile_name: Incomplete | ||
scale_factor: Incomplete | ||
data_source: DataSource | ||
element_index: Axes | Scalar | ||
element: str | ||
values: Any | ||
profile_name: str | Iterable[str] | ||
scale_factor: float | ||
applied: bool | ||
def __init__( | ||
self, | ||
net, | ||
element, | ||
variable, | ||
element_index, | ||
profile_name: Incomplete | None = None, | ||
data_source: Incomplete | None = None, | ||
net: pandapowerNet, | ||
element: str, | ||
variable: str, | ||
element_index: Axes | Scalar, | ||
profile_name: str | Iterable[str] | None = None, | ||
data_source: DataSource | None = None, | ||
scale_factor: float = 1.0, | ||
in_service: bool = True, | ||
recycle: bool = True, | ||
order: int = -1, | ||
level: int = -1, | ||
order: Int = -1, | ||
level: Int = -1, | ||
drop_same_existing_ctrl: bool = False, | ||
matching_params: Incomplete | None = None, | ||
matching_params: dict[str, Any] | None = None, | ||
initial_run: bool = False, | ||
**kwargs, | ||
) -> None: ... | ||
def set_recycle(self, net) -> None: ... | ||
def time_step(self, net, time) -> None: ... | ||
def is_converged(self, net): ... | ||
def control_step(self, net) -> None: ... | ||
def set_recycle(self, net: pandapowerNet) -> None: ... | ||
def time_step(self, net: pandapowerNet, time: Any) -> None: ... | ||
def is_converged(self, net: pandapowerNet) -> bool: ... | ||
def control_step(self, net: pandapowerNet) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
from _typeshed import Incomplete | ||
from collections.abc import Iterable | ||
from typing import Any | ||
|
||
from pandas._typing import Scalar | ||
|
||
from pandapower.io_utils import JSONSerializableClass | ||
|
||
class DataSource(JSONSerializableClass): | ||
def get_time_step_value(self, time_step: Incomplete, profile_name: str, scale_factor: float = 1.0) -> Incomplete: ... | ||
def get_time_step_value(self, time_step: Scalar, profile_name: str | Iterable[str], scale_factor: float = 1.0) -> Any: ... |
14 changes: 9 additions & 5 deletions
14
stubs/pandapower-stubs/timeseries/data_sources/frame_data.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
from _typeshed import Incomplete | ||
from collections.abc import Iterable | ||
from typing import Any | ||
|
||
import pandas as pd | ||
from pandas._typing import Scalar | ||
|
||
from pandapower.timeseries.data_source import DataSource | ||
|
||
class DFData(DataSource): | ||
df: Incomplete | ||
def __init__(self, df, multi: bool = False) -> None: ... | ||
def get_time_step_value(self, time_step, profile_name, scale_factor: float = 1.0): ... | ||
def get_time_steps_len(self): ... | ||
df: pd.DataFrame | ||
def __init__(self, df: pd.DataFrame, multi: bool = False) -> None: ... | ||
def get_time_step_value(self, time_step: Scalar, profile_name: str | Iterable[str], scale_factor: float = 1.0) -> Any: ... | ||
def get_time_steps_len(self) -> int: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters