Sinergym package information

You can view or modify information directly from the Sinergym package without the need to set up any environment.

Available environments IDs and versions

[1]:
import sinergym

print(sinergym.__version__)
print(sinergym.__ids__)
Couldn't import dot_parser, loading of dot files will not be possible.
3.5.9
['Eplus-demo-v1', 'Eplus-office-hot-continuous-v1', 'Eplus-office-hot-discrete-v1', 'Eplus-office-hot-continuous-stochastic-v1', 'Eplus-office-hot-discrete-stochastic-v1', 'Eplus-office-mixed-continuous-v1', 'Eplus-office-mixed-discrete-v1', 'Eplus-office-mixed-continuous-stochastic-v1', 'Eplus-office-mixed-discrete-stochastic-v1', 'Eplus-office-cool-continuous-v1', 'Eplus-office-cool-discrete-v1', 'Eplus-office-cool-continuous-stochastic-v1', 'Eplus-office-cool-discrete-stochastic-v1', 'Eplus-warehouse-hot-continuous-v1', 'Eplus-warehouse-hot-discrete-v1', 'Eplus-warehouse-hot-continuous-stochastic-v1', 'Eplus-warehouse-hot-discrete-stochastic-v1', 'Eplus-warehouse-mixed-continuous-v1', 'Eplus-warehouse-mixed-discrete-v1', 'Eplus-warehouse-mixed-continuous-stochastic-v1', 'Eplus-warehouse-mixed-discrete-stochastic-v1', 'Eplus-warehouse-cool-continuous-v1', 'Eplus-warehouse-cool-discrete-v1', 'Eplus-warehouse-cool-continuous-stochastic-v1', 'Eplus-warehouse-cool-discrete-stochastic-v1', 'Eplus-radiant-hot-discrete-v1', 'Eplus-radiant-hot-discrete-stochastic-v1', 'Eplus-radiant-mixed-discrete-v1', 'Eplus-radiant-mixed-discrete-stochastic-v1', 'Eplus-radiant-cool-discrete-v1', 'Eplus-radiant-cool-discrete-stochastic-v1', 'Eplus-radiant-stockholm-discrete-v1', 'Eplus-radiant-stockholm-discrete-stochastic-v1', 'Eplus-datacenter-hot-continuous-v1', 'Eplus-datacenter-hot-discrete-v1', 'Eplus-datacenter-hot-continuous-stochastic-v1', 'Eplus-datacenter-hot-discrete-stochastic-v1', 'Eplus-datacenter-mixed-continuous-v1', 'Eplus-datacenter-mixed-discrete-v1', 'Eplus-datacenter-mixed-continuous-stochastic-v1', 'Eplus-datacenter-mixed-discrete-stochastic-v1', 'Eplus-datacenter-cool-continuous-v1', 'Eplus-datacenter-cool-discrete-v1', 'Eplus-datacenter-cool-continuous-stochastic-v1', 'Eplus-datacenter-cool-discrete-stochastic-v1', 'Eplus-shop-hot-continuous-v1', 'Eplus-shop-hot-discrete-v1', 'Eplus-shop-hot-continuous-stochastic-v1', 'Eplus-shop-hot-discrete-stochastic-v1', 'Eplus-shop-mixed-continuous-v1', 'Eplus-shop-mixed-discrete-v1', 'Eplus-shop-mixed-continuous-stochastic-v1', 'Eplus-shop-mixed-discrete-stochastic-v1', 'Eplus-shop-cool-continuous-v1', 'Eplus-shop-cool-discrete-v1', 'Eplus-shop-cool-continuous-stochastic-v1', 'Eplus-shop-cool-discrete-stochastic-v1', 'Eplus-smalldatacenter-hot-continuous-v1', 'Eplus-smalldatacenter-hot-continuous-stochastic-v1', 'Eplus-smalldatacenter-mixed-continuous-v1', 'Eplus-smalldatacenter-mixed-continuous-stochastic-v1', 'Eplus-smalldatacenter-cool-continuous-v1', 'Eplus-smalldatacenter-cool-continuous-stochastic-v1', 'Eplus-officegrid-hot-continuous-v1', 'Eplus-officegrid-hot-discrete-v1', 'Eplus-officegrid-hot-continuous-stochastic-v1', 'Eplus-officegrid-hot-discrete-stochastic-v1', 'Eplus-officegrid-mixed-continuous-v1', 'Eplus-officegrid-mixed-discrete-v1', 'Eplus-officegrid-mixed-continuous-stochastic-v1', 'Eplus-officegrid-mixed-discrete-stochastic-v1', 'Eplus-officegrid-cool-continuous-v1', 'Eplus-officegrid-cool-discrete-v1', 'Eplus-officegrid-cool-continuous-stochastic-v1', 'Eplus-officegrid-cool-discrete-stochastic-v1', 'Eplus-5zone-hot-continuous-v1', 'Eplus-5zone-hot-discrete-v1', 'Eplus-5zone-hot-continuous-stochastic-v1', 'Eplus-5zone-hot-discrete-stochastic-v1', 'Eplus-5zone-mixed-continuous-v1', 'Eplus-5zone-mixed-discrete-v1', 'Eplus-5zone-mixed-continuous-stochastic-v1', 'Eplus-5zone-mixed-discrete-stochastic-v1', 'Eplus-5zone-cool-continuous-v1', 'Eplus-5zone-cool-discrete-v1', 'Eplus-5zone-cool-continuous-stochastic-v1', 'Eplus-5zone-cool-discrete-stochastic-v1']

Set terminal logger level

The logging level for each module is set by default within Sinergym constants. However, these can be modified from the package once the environment has been created to take effect.

The currently available levels are: ENVIRONMENT, SIMULATOR, MODEL, REWARD, COMMON, WRAPPER (or WRAPPERS, both options are detected), and CALLBACK.

Below is an example of how to use them:

[ ]:
import gymnasium as gym
import sinergym

env = gym.make('Eplus-demo-v1')

# Update log levels to DEBUG in Environment instead of info
sinergym.set_logger_level('ENVIRONMENT', 'DEBUG')

env.reset()
terminated = truncated = False

# Run an episode
while not terminated and not truncated:
    action = env.action_space.sample()
    _, _, terminated, truncated, _ = env.step(action)
env.close()
#==============================================================================================#
[ENVIRONMENT] (INFO) : Creating Gymnasium environment.
[ENVIRONMENT] (INFO) : Name: demo-v1
#==============================================================================================#
[MODEL] (INFO) : Experiment working directory created.
[MODEL] (INFO) : Working directory: /workspaces/sinergym/examples/Eplus-env-demo-v1-res8
[MODEL] (INFO) : Model Config is correct.
[MODEL] (INFO) : Update building model Output:Variable with variable names.
[MODEL] (INFO) : Update building model Output:Meter with meter names.
[MODEL] (INFO) : Extra config: runperiod updated to {'apply_weekend_holiday_rule': 'No', 'begin_day_of_month': 1, 'begin_month': 1, 'begin_year': 1991, 'day_of_week_for_start_day': 'Monday', 'end_day_of_month': 1, 'end_month': 3, 'end_year': 1991, 'use_weather_file_daylight_saving_period': 'Yes', 'use_weather_file_holidays_and_special_days': 'Yes', 'use_weather_file_rain_indicators': 'Yes', 'use_weather_file_snow_indicators': 'Yes'}
[MODEL] (INFO) : Updated episode length (seconds): 5184000.0
[MODEL] (INFO) : Updated timestep size (seconds): 3600.0
[MODEL] (INFO) : Updated timesteps per episode: 1440
[MODEL] (INFO) : Runperiod established.
[MODEL] (INFO) : Episode length (seconds): 5184000.0
[MODEL] (INFO) : timestep size (seconds): 3600.0
[MODEL] (INFO) : timesteps per episode: 1440
[REWARD] (INFO) : Reward function initialized.
[ENVIRONMENT] (INFO) : Environment created successfully.
#----------------------------------------------------------------------------------------------#
[ENVIRONMENT] (INFO) : Starting a new episode.
[ENVIRONMENT] (INFO) : Episode 1: demo-v1
#----------------------------------------------------------------------------------------------#
[MODEL] (INFO) : Episode directory created.
[MODEL] (INFO) : Weather file USA_PA_Pittsburgh-Allegheny.County.AP.725205_TMY3.epw used.
[MODEL] (INFO) : Adapting weather to building model.
[ENVIRONMENT] (INFO) : Saving episode output path.
[ENVIRONMENT] (DEBUG) : Path: /workspaces/sinergym/examples/Eplus-env-demo-v1-res8/Eplus-env-sub_run1/output
[ENVIRONMENT] (INFO) : Episode 1 started.
[ENVIRONMENT] (DEBUG) : Waiting for finishing WARMUP process.
[ENVIRONMENT] (DEBUG) : WARMUP process finished.
[SIMULATOR] (INFO) : handlers initialized.
[SIMULATOR] (INFO) : handlers are ready.
[SIMULATOR] (INFO) : System is ready.
[ENVIRONMENT] (DEBUG) : RESET observation received: {'month': 1, 'day_of_month': 1, 'hour': 0, 'outdoor_temperature': 7.2, 'htg_setpoint': 12.8, 'clg_setpoint': 40.0, 'air_temperature': 19.7479730060398, 'air_humidity': 54.12386596530383, 'HVAC_electricity_demand_rate': 87.36488027634958}
[ENVIRONMENT] (DEBUG) : RESET info received: {'time_elapsed(hours)': 1.5, 'month': 1, 'day': 1, 'hour': 0, 'is_raining': False, 'timestep': 0}
[ENVIRONMENT] (DEBUG) : STEP queues not receive value, simulation must be completed. changing TRUNCATED flag to TRUE
Simulation Progress [Episode 1]: 100%|██████████| 100/100 [00:02<00:00, 36.37%/s, 100% completed]
[ENVIRONMENT] (INFO) : Environment closed. [demo-v1]