def checkWaitingPersons(self):
    'check whether a person has requested to cross the street'
    for edge in self.WALKINGAREAS:
        peds = self.k.kernel_api.edge.getLastStepPersonIDs(edge)
        for ped in peds:
            if ((self.k.kernel_api.person.getWaitingTime(ped) == 1) and (self.k.kernel_api.person.getNextEdge(ped) in self.CROSSINGS)):
                numWaiting = self.k.kernel_api.trafficlight.getServedPersonCount(self.TLSID, self.PEDESTRIAN_GREEN_PHASE)
                print(('%s: pedestrian %s pushes the button (waiting: %s)' % (self.k.kernel_api.simulation.getTime(), ped, numWaiting)))
                return True
    return False
check whether a person has requested to cross the street
def checkWaitingPersons(self):
    
    for edge in self.WALKINGAREAS:
        peds = self.k.kernel_api.edge.getLastStepPersonIDs(edge)
        for ped in peds:
            if ((self.k.kernel_api.person.getWaitingTime(ped) == 1) and (self.k.kernel_api.person.getNextEdge(ped) in self.CROSSINGS)):
                numWaiting = self.k.kernel_api.trafficlight.getServedPersonCount(self.TLSID, self.PEDESTRIAN_GREEN_PHASE)
                print(('%s: pedestrian %s pushes the button (waiting: %s)' % (self.k.kernel_api.simulation.getTime(), ped, numWaiting)))
                return True
    return False