When I am learning tutorial 9, I am confusing the rl_actions. Because on the program, the rl_actions is not initialized and definition. Why there is a 'rl_actions' parameter of the _apply_rl_actions function and compute_reward function? I also check the vehicle kernel code, about apply_acceleration function. The original one is:
def apply_acceleration(self, veh_ids, acc):
"""See parent class."""
# to hand the case of a single vehicle
if type(veh_ids) == str:
veh_ids = [veh_ids]
acc = [acc]
for i, vid in enumerate(veh_ids):
if acc[i] is not None and vid in self.get_ids():
this_vel = self.get_speed(vid)
next_vel = max([this_vel + acc[i] * self.sim_step, 0])
self.kernel_api.vehicle.slowDown(vid, next_vel, 1e-3)