sinergym.simulators.eplus.EnergyPlus
- class sinergym.simulators.eplus.EnergyPlus(name: str, obs_queue: Queue, info_queue: Queue, act_queue: Queue, time_variables: List[str] = [], variables: Dict[str, Tuple[str, str]] = {}, meters: Dict[str, str] = {}, actuators: Dict[str, Tuple[str, str, str]] = {})
- __init__(name: str, obs_queue: Queue, info_queue: Queue, act_queue: Queue, time_variables: List[str] = [], variables: Dict[str, Tuple[str, str]] = {}, meters: Dict[str, str] = {}, actuators: Dict[str, Tuple[str, str, str]] = {})
EnergyPlus runner class. This class run an episode in a thread when start() is called.
- Parameters:
name (str) – Name of the environment which is using the simulator.
obs_queue (Queue) – Observation queue for Gymnasium environment communication.
info_queue (Queue) – Extra information dict queue for Gymnasium environment communication.
act_queue (Queue) – Action queue for Gymnasium environment communication.
time_variables (List[str]) – EnergyPlus time variables we want to observe. The name of the variable must match with the name of the E+ Data Transfer API method name. Defaults to empty list
variables (Dict[str, Tuple[str, str]]) – Specification for EnergyPlus Output:Variable. The key name is custom, then tuple must be the original variable name and the output variable key. Defaults to empty dict.
meters (Dict[str, str]) – Specification for EnergyPlus Output:Meter. The key name is custom, then value is the original EnergyPlus Meters name.
actuators (Dict[str, Tuple[str, str, str]]) – Specification for EnergyPlus Input Actuators. The key name is custom, then value is a tuple with actuator type, value type and original actuator name. Defaults to empty dict.
Methods
__init__
(name, obs_queue, info_queue, act_queue)EnergyPlus runner class.
failed
()Method to determine if simulation has failed.
Transform attributes defined in class instance into energyplus bash command
start
(building_path, weather_path, output_path)Initializes all callbacks and handlers using EnergyPlus API, prepare the simulation system
stop
()It forces the simulation ends, cleans all communication queues, thread is deleted (joined) and simulator attributes are reset (except handlers, to not initialize again if there is a next thread execution).
Attributes
- failed() bool
Method to determine if simulation has failed.
- Returns:
Flag to describe this state
- Return type:
bool
- property is_running: bool
- logger = <Logger SIMULATOR (INFO)>
- make_eplus_args() List[str]
Transform attributes defined in class instance into energyplus bash command
- Returns:
List of the argument components for energyplus bash command
- Return type:
List[str]
- start(building_path: str, weather_path: str, output_path: str) None
- Initializes all callbacks and handlers using EnergyPlus API, prepare the simulation system
and start running the simulation in a Python thread.
- Parameters:
building_path (str) – EnergyPlus input description file path.
weather_path (str) – EnergyPlus weather path.
output_path (str) – Path where EnergyPlus process is going to allocate its output files.
- stop() None
It forces the simulation ends, cleans all communication queues, thread is deleted (joined) and simulator attributes are reset (except handlers, to not initialize again if there is a next thread execution).