def __init__(self, start_time, timestep, isoption=False,islocal=True,ischarging=True): self.reset_time(start_time, timestep) self.last_vehicle_id = 1 self.vehicle_queue = [] sim_logger.setup_logging(self) self.logger = getLogger(__name__) self.route_cache = {} self.current_dummyV = 0 self.current_dqnV = 0 # containers as dictionaries self.match_zone_collection = [] self.hex_zone_collection = {} # DQN for getting actions and dumping transitions self.all_transitions = [] self.prime_transitions = [] self.f_transitions=[] self.charging_station_collections = [] self.snapped_hex_coords_list = [[0,0]] self.num_match = 0 self.total_num_arrivals = 0 self.total_num_removed_pass = 0 self.total_num_served_pass = 0 self.total_num_longwait_pass = 0 self.total_idled_vehicles = 0 self.global_state_tensor = np.zeros((NUM_CHANNELS, MAP_HEIGHT, MAP_WIDTH)) # t, c, w, h # self.global_state_tensor[2] = 1e6 # queue length self.global_state_buffer=dict() self.with_charging = ischarging self.local_matching = islocal self.with_option = isoption self.hex_diffusions = None
def __init__(self, start_time, timestep): self.reset(start_time, timestep) sim_logger.setup_logging(self) self.logger = getLogger(__name__) self.demand_generator = DemandGenerator() self.routing_engine = RoutingEngine.create_engine() self.route_cache = {}
def __init__(self, start_time, timestep): self.reset(start_time, timestep) self.last_vehicle_id = 1 self.vehicle_queue = [] sim_logger.setup_logging(self) self.logger = getLogger(__name__) self.route_cache = {} self.current_dummyV = 0 self.current_dqnV = 0 # containers as dictionaries self.match_zone_collection = [] self.hex_zone_collection = {} self.vehicle_collection = {} self.all_transitions = [] self.charging_station_collections = [] self.num_match = 0 self.total_num_arrivals = 0 self.total_num_removed_pass = 0 self.total_num_served_pass = 0 self.total_num_longwait_pass = 0 self.charging_station_ids = []
def __init__(self, start_time, timestep): self.reset(start_time, timestep) self.last_vehicle_id = 1 self.vehicle_queue = [] sim_logger.setup_logging(self) self.logger = getLogger(__name__) self.demand_generator = DemandGenerator() self.route_cache = {} self.current_dummyV = 0 self.current_dqnV = 0 # containers as dictionaries self.match_zone_collection = [] self.hex_zone_collection = {} self.vehicle_collection = {} # DQN for getting actions and dumping transitions self.dqn_agent = DeepQNetworkAgent() self.all_transitions = [] self.charging_station_collections = [] self.num_match = 0 self.total_num_arrivals = 0 self.total_num_removed_pass = 0 self.charging_station_ids = []