Exemplo n.º 1
0
    'z3_ppl': ['Zone People Occupant Count', 'Perimeter_ZN_3 ZN'],
    'z4_ppl': ['Zone People Occupant Count', 'Perimeter_ZN_4 ZN'],
}
actuators_tc = {
    'ppl_sched': ['Schedule:Constant', 'Schedule Value', 'People Const Sched'],
}
weather_tc = {'sun_up': 'sun_is_up', 'raining': 'is_raining'}

timesteps = 6
# create calling point with actuation function
cp1 = 'callback_begin_zone_timestep_before_init_heat_balance'
cp2 = 'callback_after_predictor_after_hvac_managers'  # system timestep
# cp3 = 'callback_end_system_timestep_after_hvac_reporting'  # HVAC iteration loop

# create building energy simulation obj
sim = emspy.BcaEnv(ep_path, ep_idf_to_run, timesteps, vars_tc, int_vars_tc,
                   meters_tc, actuators_tc, weather_tc)
# create RL agent obj


class Agent:
    def __init__(self):
        self.ppl_sched = 0
        self.ppl_sched_after = 0
        pass

    def observe1(self):
        self.ppl_sched = sim.get_ems_data('z0_ppl_sched_dummy')
        # print(f'* PPL Sched: {self.ppl_sched}')

    def observe2(self):
        self.ppl_sched_after = sim.get_ems_data('z0_ppl')
Exemplo n.º 2
0
           'zone_temp': ['zone mean air temperature', zone]}

int_vars_tc = None
meters_tc = None
# still not working
actuators_tc = {'act_odb_temp': ['weather data', 'outdoor dry bulb', 'environment']}
weather_tc = {'sun': 'sun_is_up', 'rain': 'is_raining', 'wind_dir': 'wind_direction',
              'out_rh': 'outdoor_relative_humidity'}

# create calling point with actuation function and required callback fxn arguments
calling_point = 'callback_begin_zone_timestep_after_init_heat_balance'

ts = 12

# agent = emspy.BcaEnv(ep_path, ep_idf_to_run, ts, vars_tc, int_vars_tc, meters_tc, actuators_tc, weather_tc)
agent = emspy.BcaEnv(ep_path, ep_idf_to_run, ts, None, None, None, None, None)

class test_class:
    def __init__(self):
        self.param_data = 0


agent_params = test_class()


def actuation_fxn1():
    agent_params.param_data += 1
    print(agent_params.param_data)
    data = agent.get_ems_data(['wind_dir'], [0, 1, 2])
    print(f'Data: {data}')
    return None