Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
0

Which field to access during Runtime in order to modify Setpoint temperature of a Zone

asked 2022-09-20 05:40:43 -0600

IVIazz's avatar

Hi, i'm developing a Reinforcement Learning(RL) framework using EnergyPlus as the simulation enviroment.

I'm having an hard time figuring out which object to access during runtime in order to modify the temperature setpoint of a zone. Right now i have

ZoneControl:Thermostat,
    ZONE ONE Thermostat,     !- Name
    ZONE ONE,                !- Zone or ZoneList Name
    ALWAYS 4,                !- Control Type Schedule Name
    ThermostatSetpoint:DualSetpoint,  !- Control 1 Object Type
    Temperature Setpoints;  !- Control 1 Name

ThermostatSetpoint:DualSetpoint,
     Office Thermostat Dual SP Control,  !- Name
     ALWAYS 20,               !- Heating Setpoint Temperature Schedule Name
     ALWAYS 24;               !- Cooling Setpoint Temperature Schedule Name

Always N are schedules that set value to N for all the 24h of a day.

I get that i have to use the get_actuator_handle() and then set_actuator_handle() but i can't figure out the names/instances of the variables i need to access/retrieve in order to do that.

Do i need to add actuators or new objects in the idf file?

Thanks in advance for the response

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-09-21 11:44:00 -0600

The python example files are a good place to learn the python API syntax. See example files PythonPluginMultiSpeedHeatPumpOverrideControl.idf and PythonPluginMultiSpeedHeatPumpOverrideControl.py.

PythonPluginMultiSpeedHeatPumpOverrideControl.idf:

ZoneControl:Thermostat,
  Zone Thermostat,         !- Name
  LIVING ZONE,             !- Zone or ZoneList Name
  Dual Zone Control Type Sched,  !- Control Type Schedule Name
  ThermostatSetpoint:DualSetpoint,  !- Control 1 Object Type
  Setpoints,               !- Control 1 Name
  ,                        !- Control 2 Object Type
  ,                        !- Control 2 Name
  ,                        !- Control 3 Object Type
  ,                        !- Control 3 Name
  ,                        !- Control 4 Object Type
  ,                        !- Control 4 Name
  2.0;                     !- Temperature Difference Between Cutout And Setpoint {deltaC}

ThermostatSetpoint:DualSetpoint,
  Setpoints,               !- Name
  Dual Heating Setpoints,  !- Heating Setpoint Temperature Schedule Name
  Dual Cooling Setpoints;  !- Cooling Setpoint Temperature Schedule Name

Schedule:Compact,
  Dual Heating Setpoints,  !- Name
  Temperature,             !- Schedule Type Limits Name
  Through: 12/31,          !- Field 1
  For: AllDays,            !- Field 2
  Until: 24:00,22.0;       !- Field 3

Schedule:Compact,
  Dual Cooling Setpoints,  !- Name
  Temperature,             !- Schedule Type Limits Name
  Through: 12/31,          !- Field 1
  For: AllDays,            !- Field 2
  Until: 24:00,26.6;       !- Field 3

PythonPluginMultiSpeedHeatPumpOverrideControl.py:

self.heating_setpoint_handle = self.api.exchange.get_variable_handle(state,
                                                                     "Zone Thermostat Heating Setpoint Temperature",
                                                                     "LIVING ZONE")

self.cooling_setpoint_handle = self.api.exchange.get_variable_handle(state,
                                                                     "Zone Thermostat Cooling Setpoint Temperature",
                                                                     "LIVING ZONE")
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

Stats

Asked: 2022-09-20 05:40:43 -0600

Seen: 143 times

Last updated: Sep 21 '22