Research Article
NCG-TSM: A Noncooperative Game for the Taxi Sharing Model in Urban Road Networks
Algorithm 1
Candidate vehicle scheduling algorithm based on constraints.
| Input: Passenger requests , vehicle collections ; | | Output: Travel schedule for each vehicle; | | Notations: | | : Grid of the departure point of passenger ; | | : Grid of the location of the vehicle ; | | : Maximum search radius; | | : Passengers’ departure point; | | : Position of the vehicle; | | : Maximum road network distance. | (1) | for each request and do | (2) | Calculate the time from to ; | (3) | if equation (1) is satisfied by the then | (4) | Calculate the gird distance from to ; | (5) | ifthen | (6) | Calculate the road network distance from to ; | (7) | ifthen | (8) | Get a new collection of vehicles ; | (9) | end if | (10) | end if | (11) | end if | (12) | end for | (13) | for each request and do | (14) | if equation (8) is satisfied then | (15) | Insert and into | (16) | if the time constraint is satisfied at any point after the inserted position and the inserted position then | (17) | Calculate the detour ratio by equation (4) or (5)} | (18) | if equation (6) or (7) is satisfied by then | (19) | Update a new schedule ; | (20) | end if | (21) | end if | (22) | end if | (23) | end for | (24) | Return: all vehicle’ travel schedule; |
|