Schedule optimization program

Started by radu.poenaru, February 24, 2012, 10:57:20 AM

radu.poenaru

I can't imagine if this is against the T&A of the game, but I was constantly worried that I could get better performance on my routes with better scheduling so I cropped up this optimization program where you input your route list & details, and it comes up with a nice schedule for maximizing flight time on my airplanes.
Now brute force & backtracking will not work here (possible route combinations for my airline is around 1.3e80 ), but I think I came up with a decent enough algorithm that will come up with some decent plans. It still takes 5 - 8 hours to compute basic optimum routes, so testing is not for the impatient.

Anyone interested in giving it a beta-test and letting me know if it produces good results for his airline?

JumboShrimp

What is your objective?  Is it something like: I am at this airport, I have 100 aircraft, I am in this game world alone, how do I this aircraft in optimal way?

- generally you have somewhere between 1 and 10 aircraft that is not scheduled
- a route may already supplied by 3 carriers supplying the route to a rate of 300%, killing themselves with ATRs, do I really want to pile on?
- a route is already supplied 100% by an ally, I want to leave it alone
- I can't get a slot at this airport

There are just so many variables that I don't think you can beat an experienced player taking into account all these variables...

radu.poenaru

Hi!
No, it's not working at the "what routes should I fly/not fly " level.

It's working at the "on what airplane and at what hour should I fly each route given this list of routes that I MUST fly".

Goals are defined as:
1) Keep airplanes flying as much as possible (have flights nicely packed into 24h groups)
2) Keep a minimum of flights taking off/landing between 0:00 and 5:00
3) Try to keep a reasonable amount of turnaround time. Reduce it by 5 - 10 min if the resulting schedule "is worth it"
4) I also have the option to "freeze" certain flights to specific takeoff hours for airports that are low on slots
5) Working on adding penalty for flying to same airport at same hours (as competition).


It probably won't beat an experienced player, but it will help him find the best plane to squeeze in that new 1h35m route in his 65 airplane fleet.

alexgv1

I'd love to help you test this it sounds like an amazing program. I have quite a powerful computer which should run it quite quickly. I have some programming experience if it helps.

Is it all entered data into Excel or Access?

Please get back to me on PM I'd love to hear about this.
CEO of South Where Airlines (SWA|WH)

JumboShrimp

One thing that can be challenging is 7 day schedules for international LH destinations, taking into account time zones etc.   I would be interested in trying your program.

Bruizer

I'd love to beta test if you're still looking for help!

radu.poenaru

#6
Ok, link is away for beta testing.
You'll need to provide it with a .csv file containing the list of routes you want optimized. Just copy them from the list of routes from the game area.
Each flight is on one line and the format is:
FlightName, Distance in KM, Time Of Takeoff, Time Of Landing, Time Of Takeoff, Time Of Landing, (0/1) Fixed

All times are in local times (ie. same as you would see them in the game area's route list)
Last 0 or 1 in the row is a flag signaling (if 1) that the actual time of takeoff and landing are FIXED because of airport slot availability.It means
this flight will not be moved to another timeslot.

Usage instructions:
1. Click 'Start' then select your .csv file.
2. Click 'Stop' when you've had enough. Select a file where the schedules will be saved.
3. Hopefully the rest of the controls are selfexplanatory.

Edit:
Oh, and the resulting solutions are described as
1. Number of planes required to fly this solution .. Lower is better
2. "Empty time" .. average unscheduled time (in minutes) for each airplane (w/out turnaround) .. Lower is better
3. A score from 10 to -10 describing the general quality of the schedule. Lots of night flights or tightly packed turnarrounds will drop this number. Higher is better

Let me know how it works out !

radu.poenaru

Well, I'm finally starting to get better results from the program then I can work out by hand. The sad part of it, is that it took me a few attempts to find blatant omissions in the resultant solutions, and scheduling and re-scheduling my entire fleet of 20 airplanes took a couple of game-weeks and over 12 mills in slot fees. Just when fuel prices where spiking up,oh well, at least I'm schedule-proof now.

A link to the current version:
http://www.2shared.com/file/BNU54D1D/AirwayScheduler.html

Kazari

I successfully downloaded and ran the program with sample data.

I am uncertain where to gather the real data from.

https://www.airwaysim.com/game/Routes/Manage/  ?

Am I to copy and paste the entire schedule into Excel, then edit it a lot and then add the distances? I can do it, I just don't want to if there's an easier way.

radu.poenaru

Yep, from the Manage routes pages. Just copy the data from there.

The only info you don't have on that page (and need to click on details to see it) is flight distance in km (the second column in the input). It will work just the same if you put a "1" for each flight instead.

Kazari

This is really neat. I think there is something here and I praise you for the work you have put into it. I think with a few tweaks you could really improve the efficiency of an airline! Good for you.



* In addition to the 0/1 in the G field that you put the curfew times in G and H and the 0/1 in I. I have some flights that could move, but only within certain time values.

* Next, I would suggest that you allow it to sort by best score. Related to that, it would be helpful to output above a certain score or add a larger number of items than you have here. My "best" was like number 200 and I wasn't able to see it because of the output limitation.

* I am not sure, but it would be helpful to know what the existing schedule's score is so you can know if it's worth it to change or not.

* A better explanation of the variables would be helpful. I THINK that the planes thing on the right is the number of planes you have to work with, but I'm not sure.

This is great work!