"""
Shyft Energy Market compute server
"""
from __future__ import annotations
import collections.abc
import shyft.energy_market.stm
from shyft.energy_market.stm import ManagedServerState
from shyft.energy_market.stm import ServerStatus
import shyft.time_series
import typing
__all__ = ['Client', 'GetAttrsReply', 'GetAttrsRequest', 'GetPlanReply', 'GetPlanRequest', 'GetStatusReply', 'GetStatusRequest', 'ManagedServerState', 'PlanReply', 'PlanRequest', 'Server', 'ServerConfig', 'ServerStatus', 'SetAttrsReply', 'SetAttrsRequest', 'StartReply', 'StartRequest', 'State', 'StopReply', 'StopRequest']
[docs]
class Client:
"""
A client to the Server.
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self, host_port: str, timeout_ms: typing.SupportsInt | typing.SupportsIndex, operation_timeout_ms: typing.SupportsInt | typing.SupportsIndex = 0) -> None:
"""
Create a client with the host port `host_port`
"""
[docs]
def send(self, request: shyft.energy_market.stm.compute.StartRequest | shyft.energy_market.stm.compute.GetStatusRequest | shyft.energy_market.stm.compute.GetAttrsRequest | shyft.energy_market.stm.compute.SetAttrsRequest | shyft.energy_market.stm.compute.StopRequest | shyft.energy_market.stm.compute.PlanRequest | shyft.energy_market.stm.compute.GetPlanRequest) -> shyft.energy_market.stm.compute.StartReply | shyft.energy_market.stm.compute.GetStatusReply | shyft.energy_market.stm.compute.GetAttrsReply | shyft.energy_market.stm.compute.SetAttrsReply | shyft.energy_market.stm.compute.StopReply | shyft.energy_market.stm.compute.PlanReply | shyft.energy_market.stm.compute.GetPlanReply:
...
@property
def operation_timeout_ms(self) -> int:
"""
int: Operation timeout for remote server operations, in number milliseconds.
"""
@operation_timeout_ms.setter
def operation_timeout_ms(self, arg1: typing.SupportsInt | typing.SupportsIndex) -> None:
...
[docs]
class GetAttrsReply:
"""
Compute reply
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def attrs(self) -> list[bool | float | int | int | shyft.time_series.TimeSeries | shyft.energy_market.t_xy | shyft.energy_market.t_xyz | shyft.energy_market.t_xyz_list | shyft.energy_market.t_turbine_description | str | shyft.time_series.TsVector | shyft.energy_market.UnitGroupType | shyft.time_series.TimeAxis | shyft.time_series.GeoPoint | None]:
...
@attrs.setter
def attrs(self, arg0: collections.abc.Sequence[bool | typing.SupportsFloat | typing.SupportsIndex | typing.SupportsInt | typing.SupportsIndex | typing.SupportsInt | typing.SupportsIndex | shyft.time_series.TimeSeries | shyft.energy_market.t_xy | shyft.energy_market.t_xyz | shyft.energy_market.t_xyz_list | shyft.energy_market.t_turbine_description | str | shyft.time_series.TsVector | shyft.energy_market.UnitGroupType | shyft.time_series.TimeAxis | shyft.time_series.GeoPoint | None]) -> None:
...
[docs]
class GetAttrsRequest:
"""
Compute request
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def urls(self) -> list[str]:
...
@urls.setter
def urls(self, arg0: collections.abc.Sequence[str]) -> None:
...
[docs]
class GetPlanReply:
"""
Compute reply
"""
summary: shyft.energy_market.stm._OptimizationSummary
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class GetPlanRequest:
"""
Compute request
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class GetStatusReply:
"""
Compute reply
"""
state: State
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def log(self) -> list[shyft.energy_market.stm.LogEntry]:
...
@log.setter
def log(self, arg0: collections.abc.Sequence[shyft.energy_market.stm.LogEntry]) -> None:
...
[docs]
class GetStatusRequest:
"""
Compute request
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def log_index(self) -> int | None:
...
@log_index.setter
def log_index(self, arg0: typing.SupportsInt | typing.SupportsIndex | None) -> None:
...
[docs]
class PlanReply:
"""
Compute reply
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class PlanRequest:
"""
Compute request
"""
time_axis: shyft.time_series.TimeAxis
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def commands(self) -> list[shyft.energy_market.stm.ShopCommand]:
...
@commands.setter
def commands(self, arg0: collections.abc.Sequence[shyft.energy_market.stm.ShopCommand]) -> None:
...
[docs]
class Server:
"""
A server for running heavy STM computations.
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self, config: ServerConfig = ...) -> None:
...
[docs]
def close(self) -> None:
...
[docs]
def get_listening_ip(self) -> str:
...
[docs]
def get_listening_port(self) -> int:
...
[docs]
def is_running(self) -> bool:
...
[docs]
def set_listening_ip(self, ip: str) -> None:
...
[docs]
def set_listening_port(self, port_no: typing.SupportsInt | typing.SupportsIndex) -> None:
...
[docs]
def start_server(self) -> int:
...
[docs]
def stop_server(self, timeout: typing.SupportsInt | typing.SupportsIndex = 1000) -> None:
...
[docs]
class ServerConfig(shyft.time_series.ServerConfig):
"""
Compute server config
"""
clean_run_files: bool
log: shyft.time_series.LogConfig
persistent_storage_path: str
stale_duration: shyft.time_series.time
stale_sweep_interval: shyft.time_series.time
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
@typing.overload
def __init__(self) -> None:
...
@typing.overload
def __init__(self, base0: shyft.time_series.ServerConfig, /, clean_run_files: bool, persistent_storage_path: str) -> None:
...
[docs]
class SetAttrsReply:
"""
Compute reply
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def attrs(self) -> list[bool]:
...
@attrs.setter
def attrs(self, arg0: collections.abc.Sequence[bool]) -> None:
...
[docs]
class SetAttrsRequest:
"""
Compute request
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
@property
def attrs(self) -> list[tuple[str, bool | float | int | int | shyft.time_series.TimeSeries | shyft.energy_market.t_xy | shyft.energy_market.t_xyz | shyft.energy_market.t_xyz_list | shyft.energy_market.t_turbine_description | str | shyft.time_series.TsVector | shyft.energy_market.UnitGroupType | shyft.time_series.TimeAxis | shyft.time_series.GeoPoint]]:
...
@attrs.setter
def attrs(self, arg0: collections.abc.Sequence[tuple[str, bool | typing.SupportsFloat | typing.SupportsIndex | typing.SupportsInt | typing.SupportsIndex | typing.SupportsInt | typing.SupportsIndex | shyft.time_series.TimeSeries | shyft.energy_market.t_xy | shyft.energy_market.t_xyz | shyft.energy_market.t_xyz_list | shyft.energy_market.t_turbine_description | str | shyft.time_series.TsVector | shyft.energy_market.UnitGroupType | shyft.time_series.TimeAxis | shyft.time_series.GeoPoint]]) -> None:
...
[docs]
class StartReply:
"""
Compute reply
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class StartRequest:
"""
Compute request
"""
model: shyft.energy_market.stm.StmSystem
model_id: str
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class State:
"""
Describes the possible states of a compute server
Members:
IDLE
STARTED
RUNNING
DONE
"""
DONE: typing.ClassVar[State] # value = <State.DONE: 3>
IDLE: typing.ClassVar[State] # value = <State.IDLE: 0>
RUNNING: typing.ClassVar[State] # value = <State.RUNNING: 2>
STARTED: typing.ClassVar[State] # value = <State.STARTED: 1>
__members__: typing.ClassVar[dict[str, State]] # value = {'IDLE': <State.IDLE: 0>, 'STARTED': <State.STARTED: 1>, 'RUNNING': <State.RUNNING: 2>, 'DONE': <State.DONE: 3>}
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
def __eq__(self, other: typing.Any) -> bool:
...
def __getstate__(self) -> int:
...
def __hash__(self) -> int:
...
def __index__(self) -> int:
...
[docs]
def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None:
...
def __int__(self) -> int:
...
def __ne__(self, other: typing.Any) -> bool:
...
def __repr__(self) -> str:
...
def __setstate__(self, state: typing.SupportsInt | typing.SupportsIndex) -> None:
...
def __str__(self) -> str:
...
@property
def name(self) -> str:
...
@property
def value(self) -> int:
...
[docs]
class StopReply:
"""
Compute reply
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
[docs]
class StopRequest:
"""
Compute request
"""
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs):
...
[docs]
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
__version__: str = '35.2.0'