diff --git a/aviation_planning/airlineplanning.ipynb b/aviation_planning/airlineplanning.ipynb index 18c8f75..781b2dd 100644 --- a/aviation_planning/airlineplanning.ipynb +++ b/aviation_planning/airlineplanning.ipynb @@ -667,8 +667,8 @@ "deltaminus_flightarcs = {}\n", "for a in aircraft_flights:\n", " aircraft_flights[a] += ['source_%s'%a,'sink_%s'%a]\n", - " flight_origin['source_%s'%a] = aircrafts_startpositions_airc[a]\n", - " flight_dest['source_%s'%a] = aircrafts_endpositions_airc[a]\n", + " flight_origin['source_%s'%a] = aircrafts_endpositions_airc[a]\n", + " flight_dest['source_%s'%a] = aircrafts_startpositions_airc[a]\n", " flight_origin['sink_%s'%a] = aircrafts_endpositions_airc[a]\n", " flight_dest['sink_%s'%a] = aircrafts_startpositions_airc[a]\n", "\n", @@ -687,7 +687,12 @@ " if f1!=f2 and flight_end_time[f1] < flight_start_time[f2] and flight_dest[f1] == flight_origin[f2]: \n", " flight_arcs_for_each_aircraft[a].append((f1,f2))\n", " deltaplus_flightarcs[a][f1].append(f2)\n", - " deltaminus_flightarcs[a][f2].append(f1) \n" + " deltaminus_flightarcs[a][f2].append(f1) \n", + " # allow to connect source and target directly for the case that aircraft is not used at all \n", + " elif str(f1).startswith('source') and str(f2).startswith('sink'):\n", + " flight_arcs_for_each_aircraft[a].append((f1,f2))\n", + " deltaplus_flightarcs[a][f1].append(f2)\n", + " deltaminus_flightarcs[a][f2].append(f1)" ] }, {