def additional_command(self):
    if (not self.activeRequest):
        self.activeRequest = self.checkWaitingPersons()
    if (self.k.kernel_api.trafficlight.getPhase(self.TLSID) == self.VEHICLE_GREEN_PHASE):
        self.greenTimeSoFar += 1
        if (self.greenTimeSoFar > self.MIN_GREEN_TIME):
            if self.activeRequest:
                self.k.kernel_api.trafficlight.setPhase(self.TLSID, (self.VEHICLE_GREEN_PHASE + 1))
                self.activeRequest = False
    for veh_id in (self.leader + self.follower):
        self.k.vehicle.set_observed(veh_id)
    for veh_id in self.k.vehicle.get_ids():
        this_pos = self.k.vehicle.get_x_by_id(veh_id)
        if (this_pos == (- 1001)):
            self.absolute_position[veh_id] = (- 1001)
        else:
            change = (this_pos - self.prev_pos.get(veh_id, this_pos))
            self.absolute_position[veh_id] = ((self.absolute_position.get(veh_id, this_pos) + change) % self.k.network.length())
            self.prev_pos[veh_id] = this_pos
    return
def additional_command(self):
    if (not self.activeRequest):
        self.activeRequest = self.checkWaitingPersons()
    if (self.k.kernel_api.trafficlight.getPhase(self.TLSID) == self.VEHICLE_GREEN_PHASE):
        self.greenTimeSoFar += 1
        if (self.greenTimeSoFar > self.MIN_GREEN_TIME):
            if self.activeRequest:
                self.k.kernel_api.trafficlight.setPhase(self.TLSID, (self.VEHICLE_GREEN_PHASE + 1))
                self.activeRequest = False
    for veh_id in (self.leader + self.follower):
        self.k.vehicle.set_observed(veh_id)
    for veh_id in self.k.vehicle.get_ids():
        this_pos = self.k.vehicle.get_x_by_id(veh_id)
        if (this_pos == (- 1001)):
            self.absolute_position[veh_id] = (- 1001)
        else:
            change = (this_pos - self.prev_pos.get(veh_id, this_pos))
            self.absolute_position[veh_id] = ((self.absolute_position.get(veh_id, this_pos) + change) % self.k.network.length())
            self.prev_pos[veh_id] = this_pos
    return