Ejemplo n.º 1
0
    def __init__(self, horizon_hours, init_battery, init_charging, test_days, pareto_point, no_clusters='auto'):
        print "Initialising Task Based RHC"
        self.charge_model, self.discharge_model = get_battery_model()
        print "Initialising Rewards Model"
        self.pr = probabilistic_rewards_t.ProbabilisticRewards(test_days=test_days, no_clusters=no_clusters)
        self.no_int = self.pr.no_int 
        self.int_duration = self.pr.int_duration
        self.no_days = len(test_days)
        self.horizon_hours = 48
        self.horizon = horizon_hours*(60/self.int_duration) ## horizon in intervals
        self.req_pareto_point = pareto_point
        print "Generating Sample Tasks"
        self.samples = taskbased_sample_generator.SampleGenerator(test_days).samples
        # print self.samples

        self.main_path = roslib.packages.get_pkg_dir('battery_scheduler')
        self.path_mod = self.main_path + '/models/'
        self.path_data = self.main_path + '/data/'

        ## For tracking plan
        self.actions = []
        self.obtained_rewards = []
        self.available_rewards = []
        self.matched_rewards = []
        self.battery = []
        self.charging = []
        self.time =[]
        self.pareto_point = []        
        self.timing_tracker = []
        self.simulate(init_battery, init_charging)
Ejemplo n.º 2
0
	def __init__(self, test_days):
		
		self.samples = taskbased_sample_generator.SampleGenerator(test_days).samples

		self.main_path = roslib.packages.get_pkg_dir('battery_scheduler')
		self.path_data = self.main_path + '/data/'

		self.battery = []
		self.charging = []
		self.actions = []
		self.time = []
		self.obtained_rewards = []
		self.actual_rewards = []
Ejemplo n.º 3
0
    def __init__(self, init_battery, init_charging, test_days):

        self.samples = taskbased_sample_generator.SampleGenerator(
            test_days).samples

        self.threshold = self.samples['priority'].mean()

        self.main_path = roslib.packages.get_pkg_dir('battery_scheduler')
        self.path_data = self.main_path + '/data/'

        self.battery = []
        self.charging = []
        self.actions = []
        self.time = []
        self.obtained_rewards = []
        self.actual_rewards = []

        self.simulate(init_battery, init_charging)