|
1 | | -from _typeshed import Incomplete |
| 1 | +from typing import Any, SupportsIndex as Int |
2 | 2 |
|
| 3 | +from pandapower.auxiliary import pandapowerNet |
3 | 4 | from pandapower.io_utils import JSONSerializableClass |
4 | 5 |
|
5 | 6 | class BasicCtrl(JSONSerializableClass): |
6 | | - index: Incomplete |
7 | | - def __init__(self, container, index: Incomplete | None = None, **kwargs) -> None: ... |
8 | | - def time_step(self, container, time) -> None: ... |
9 | | - def initialize_control(self, container) -> None: ... |
10 | | - def is_converged(self, container): ... |
11 | | - def control_step(self, container) -> None: ... |
12 | | - def repair_control(self, container) -> None: ... |
13 | | - def restore_init_state(self, container) -> None: ... |
14 | | - def finalize_control(self, container) -> None: ... |
15 | | - def finalize_step(self, container, time) -> None: ... |
16 | | - def set_active(self, container, in_service) -> None: ... |
| 7 | + index: int |
| 8 | + def __init__(self, container: pandapowerNet, index: Int | None = None, **kwargs) -> None: ... |
| 9 | + def time_step(self, container: pandapowerNet, time: Any) -> None: ... |
| 10 | + def initialize_control(self, container: pandapowerNet) -> None: ... |
| 11 | + def is_converged(self, container: pandapowerNet): ... |
| 12 | + def control_step(self, container: pandapowerNet) -> None: ... |
| 13 | + def repair_control(self, container: pandapowerNet) -> None: ... |
| 14 | + def restore_init_state(self, container: pandapowerNet) -> None: ... |
| 15 | + def finalize_control(self, container: pandapowerNet) -> None: ... |
| 16 | + def finalize_step(self, container: pandapowerNet, time: Any) -> None: ... |
| 17 | + def set_active(self, container: pandapowerNet, in_service: bool) -> None: ... |
17 | 18 | def level_reset(self, prosumer) -> None: ... |
18 | 19 |
|
19 | 20 | class Controller(BasicCtrl): |
20 | | - matching_params: Incomplete |
21 | | - index: Incomplete |
| 21 | + matching_params: dict[str, Any] |
| 22 | + index: int |
22 | 23 | def __init__( |
23 | 24 | self, |
24 | | - net, |
| 25 | + net: pandapowerNet, |
25 | 26 | in_service: bool = True, |
26 | | - order: int = 0, |
27 | | - level: int = 0, |
28 | | - index: Incomplete | None = None, |
| 27 | + order: Int = 0, |
| 28 | + level: Int = 0, |
| 29 | + index: Int | None = None, |
29 | 30 | recycle: bool = False, |
30 | 31 | drop_same_existing_ctrl: bool = False, |
31 | 32 | initial_run: bool = True, |
32 | 33 | overwrite: bool = False, |
33 | | - matching_params: Incomplete | None = None, |
| 34 | + matching_params: dict[str, Any] | None = None, |
34 | 35 | **kwargs, |
35 | 36 | ) -> None: ... |
36 | 37 | def add_controller_to_net( |
37 | | - self, net, in_service, initial_run, order, level, index, recycle, drop_same_existing_ctrl, overwrite, **kwargs |
38 | | - ): ... |
39 | | - def time_step(self, net, time) -> None: ... |
40 | | - def initialize_control(self, net) -> None: ... |
41 | | - def is_converged(self, net): ... |
42 | | - def control_step(self, net) -> None: ... |
43 | | - def repair_control(self, net) -> None: ... |
44 | | - def restore_init_state(self, net) -> None: ... |
45 | | - def finalize_control(self, net) -> None: ... |
46 | | - def finalize_step(self, net, time) -> None: ... |
47 | | - def set_active(self, net, in_service) -> None: ... |
48 | | - def set_recycle(self, net) -> None: ... |
| 38 | + self, |
| 39 | + net: pandapowerNet, |
| 40 | + in_service: bool, |
| 41 | + initial_run: bool, |
| 42 | + order: Int, |
| 43 | + level: Int, |
| 44 | + index: Int, |
| 45 | + recycle: bool, |
| 46 | + drop_same_existing_ctrl: bool, |
| 47 | + overwrite: bool, |
| 48 | + **kwargs, |
| 49 | + ) -> int: ... |
| 50 | + def time_step(self, net: pandapowerNet, time: Any) -> None: ... |
| 51 | + def initialize_control(self, net: pandapowerNet) -> None: ... |
| 52 | + def is_converged(self, net: pandapowerNet): ... |
| 53 | + def control_step(self, net: pandapowerNet) -> None: ... |
| 54 | + def repair_control(self, net: pandapowerNet) -> None: ... |
| 55 | + def restore_init_state(self, net: pandapowerNet) -> None: ... |
| 56 | + def finalize_control(self, net: pandapowerNet) -> None: ... |
| 57 | + def finalize_step(self, net: pandapowerNet, time: Any) -> None: ... |
| 58 | + def set_active(self, net: pandapowerNet, in_service: bool) -> None: ... |
| 59 | + def set_recycle(self, net: pandapowerNet) -> None: ... |
0 commit comments