def run(envClass, wrapper=None, scenario={'electricity_price':'constant'}, plot=False): # Use the first 3 days of February for testing with 3 days for initialization env = envClass(url = url, actions = ['oveHeaPumY_u'], observations = {'reaTZon_y':(280.,310.)}, random_start_time = False, start_time = 31*24*3600, max_episode_length = 3*24*3600, warmup_period = 3*24*3600, scenario = scenario, step_period = 3600) # Define an empty action list to don't overwrite any input env.actions = [] # Add wrapper if any if wrapper is not None: env = wrapper(env) model = BaselineModel() # Perform test observations, actions, rewards, _ = test_agent(env, model, start_time=start_time_test, episode_length=episode_length_test, warmup_period=warmup_period_test, plot=plot) return observations, actions, rewards
def run(envClass, wrapper=None, plot=False): # Use the first 3 days of February for testing with 3 days for initialization env = envClass(url=url, actions=['oveHeaPumY_u'], observations={'reaTZon_y': (280., 310.)}, random_start_time=False, start_time=31 * 24 * 3600, max_episode_length=3 * 24 * 3600, warmup_period=3 * 24 * 3600, Ts=3600) # Add wrapper if any if wrapper is not None: env = wrapper(env) model = SampleModel(env) # Perform test observations, actions, rewards, _ = test_agent( env, model, start_time=start_time_test, episode_length=episode_length_test, warmup_period=warmup_period_test, plot=plot) return observations, actions, rewards
def test_nov(env, model, start_time_tests, episode_length_test, warmup_period_test, plot=False): ''' Perform test in November ''' observations, actions, rewards, kpis = test_agent(env, model, start_time=start_time_tests[1], episode_length=episode_length_test, warmup_period=warmup_period_test, plot=plot) return observations, actions, rewards, kpis
def test_typi(env, model, start_time_tests, episode_length_test, warmup_period_test, log_dir=os.getcwd(), kpis_to_file=False, plot=False): ''' Perform test in typical heat period (November) ''' observations, actions, rewards, kpis = test_agent(env, model, start_time=start_time_tests[1], episode_length=episode_length_test, warmup_period=warmup_period_test, log_dir=log_dir, kpis_to_file=kpis_to_file, plot=plot) return observations, actions, rewards, kpis
def test_peak(env, model, start_time_tests, episode_length_test, warmup_period_test, log_dir=os.getcwd(), kpis_to_file=False, plot=False): ''' Perform test in peak heat period (February). ''' observations, actions, rewards, kpis = test_agent(env, model, start_time=start_time_tests[0], episode_length=episode_length_test, warmup_period=warmup_period_test, log_dir=log_dir, kpis_to_file=kpis_to_file, plot=plot) return observations, actions, rewards, kpis