def assignVeh(verbose, vehicles, startVertex, endVertex, edges, AssignedVeh, AssignedTrip, vehID): while AssignedVeh[startVertex][endVertex] < int(round(AssignedTrip[startVertex][endVertex])): vehID += 1 newVehicle = Vehicle(str(vehID)) newVehicle.route = edges vehicles.append(newVehicle) AssignedVeh[startVertex][endVertex] += 1 if verbose: print('vehID:', vehID) print('AssignedTrip[start][end]', AssignedTrip[startVertex][endVertex]) print('AssignedVeh[start][end]', AssignedVeh[startVertex][endVertex]) return vehID
def assignVeh(verbose, vehicles, startVertex, endVertex, edges, AssignedVeh, AssignedTrip, vehID): while AssignedVeh[startVertex][endVertex] < int(round(AssignedTrip[startVertex][endVertex])): vehID += 1 newVehicle = Vehicle(str(vehID)) newVehicle.route = edges vehicles.append(newVehicle) AssignedVeh[startVertex][endVertex] += 1 if verbose: print 'vehID:', vehID print 'AssignedTrip[start][end]', AssignedTrip[startVertex][endVertex] print 'AssignedVeh[start][end]', AssignedVeh[startVertex][endVertex] return vehID