Research Article
A Utility Method for the Matching Optimization of Ride-Sharing Based on the E-CARGO Model in Internet of Vehicles
Algorithm 1
Kuhn_Munkres solves the optimal matching problem of ride-sharing (OMPR).
Algorithm 1: Solve OMPR. | Inputs: | the number of driver roles n | the number of passenger agents m | the number of passengers carried by the n-dimensional role range vector L | the passenger transfer vector La | An m x n revenue matrix Q for the drivers to pick up and drop off passengers | Outputs: optimal matching matrix T and time t | begin | (1) While (time < passenger acceptance time && vacant seats < loading) | (2) { | (3) Call the Kuhn_Munkres algorithm to get the matching matrix | (4) } | (4) If (transfer times < La) { | (5) Return optimal matching matrix T, time t} | (6) End if | end |
|