Skip to content

Commit

Permalink
Merge pull request #41 from Duzhuoming/patch-1
Browse files Browse the repository at this point in the history
Update airlineplanning.ipynb
  • Loading branch information
Marika-K authored Nov 12, 2024
2 parents 81cb485 + 1e10cff commit 44df818
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions aviation_planning/airlineplanning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)"
]
},
{
Expand Down

0 comments on commit 44df818

Please sign in to comment.