Source code for shyft.energy_market.stm.compute

"""
Shyft Energy Market compute server
"""
from __future__ import annotations
import shyft.energy_market
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: int, operation_timeout_ms: int = 0) -> None: """ Create a client with the host port `host_port` """
[docs] def send(self, request: StartRequest | GetStatusRequest | GetAttrsRequest | SetAttrsRequest | StopRequest | PlanRequest | GetPlanRequest) -> StartReply | GetStatusReply | GetAttrsReply | SetAttrsReply | StopReply | PlanReply | 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: int) -> None: ...
[docs] class GetAttrsReply: """ Compute reply """ attrs: 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] @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[docs] class GetAttrsRequest: """ Compute request """ urls: list[str] @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[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 """ log: list[shyft.energy_market.stm.LogEntry] state: State @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[docs] class GetStatusRequest: """ Compute request """ log_index: int | None @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[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 """ commands: list[shyft.energy_market.stm.ShopCommand] 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: ...
[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: int) -> None: ...
[docs] def start_server(self) -> int: ...
[docs] def stop_server(self, timeout: int = 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 """ attrs: list[bool] @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[docs] class SetAttrsRequest: """ Compute request """ attrs: 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]] @staticmethod def _pybind11_conduit_v1_(*args, **kwargs): ...
[docs] def __init__(self) -> None: ...
def __repr__(self) -> str: ... def __str__(self) -> str: ...
[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: int) -> None: ...
def __int__(self) -> int: ... def __ne__(self, other: typing.Any) -> bool: ... def __repr__(self) -> str: ... def __setstate__(self, state: int) -> 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 = '26.0.0'