positions on the edge, for each vehicle.
vel = self.vehicles.get_speed(self.sorted_ids)
pos = self.sorted_extra_data[0]
edge = self.sorted_extra_data[1]
max_speed = self.max_speed
is_rl = [int(veh_id in self.vehicles.get_rl_ids())
for veh_id in self.sorted_ids]
// divide the values by the maximum attainable speed
After Change
// return np.mean(self.vehicles.get_speed())
return rewards.desired_velocity(self, fail=kwargs["fail"])
def get_state(self, **kwargs):
See parent class.
The state is an array the velocities, edge counts, and relative
positions on the edge, for each vehicle.
vel = self.vehicles.get_speed(self.sorted_ids)
pos = [self.get_x_by_id(veh_id) for veh_id in self.sorted_ids]
// is_rl = [int(veh_id in self.rl_ids) for veh_id in self.sorted_ids]
// // normalize the speed