#!/usr/bin/python3 from lib.ArgParser import get_config, get_model_from_config from lib.Controller import simulate, BruteForceController, CostController, ReplayController, ThermostatController from lib.Cost import NegativeCost, NegativeCostExtendedRange from lib.Env import CentralHeatingHistoryEnv # ARGS config = get_config(uses_future=True) # MODEL model = get_model_from_config(config) # PLOT config['plot_fields'] = ['time', 'temp_in_calc', 'temp_out', 'temperature', 'mode_calc'] config['future_values'] += config['model_future_values'] # ENV env = CentralHeatingHistoryEnv() env.model = model env.config = config env.cost_class = NegativeCostExtendedRange env.reset() # MAIN # controller = BruteForceController(model=model, cost_calculator_class=NegativeCost, config=config) controller = ThermostatController(19.6, 20.4) # controller = ReplayController() simulate(env, controller)