30 likes | 192 Views
Algorithm. An instance of Constrained S hortest P ath (CSP) Inputs : source, destination, flight info., preferences Output : Minimum cost flight satisfying all preferences Common constraints : flow conservation, arrival precedes departure at an intermediate node etc.
E N D
Algorithm An instance of Constrained Shortest Path (CSP) Inputs: source, destination, flight info., preferences Output: Minimum cost flight satisfying all preferences Common constraints: flow conservation, arrival precedes departure at an intermediate node etc. Preferences enforced using constraints e.g. total travel time, number of stops, airline(s), stopover city, departure/arrival time of day, departure day range etc. Any combination of preferences can be specified together e.g. stopover city together with departure day range
Implementation • Implemented in AMPL • Edges: set ARCS within {nodes, nodes, flight_numbers, data_days}; • Variables: itinerary {ARCS} binary; • Objective: minimize opt_cost: sum { (i,j,k,l) in ARCS } itinerary[i,j,k,l]*cost[k,l]; • Constraints: about 20 generalized constraints AA327, 5/6/2013 . . . AA327 5/15/2013 SFO JFK