Hi Charly -
The data is all in the flightplanner I uploaded to Flightsim.com, at
https://www.flightsim.com/vbfs/fslib.php?do=copyright&fid=214972 where there are 5 example spreadsheets that all contain the data. It can be stripped out of the Excel tabs and used in text form, or left in the spreadsheet.
Since you want the "algorithm" - which is actually a large VBA macro - it's best to be in the spreadsheet to look around. Obviously you would need access to MS Excel or another program that can read spreadsheets created in Excel 2007 (the version I used).
The data isn't changed by the algorithm, it's used to verify or autofill other data fields and as a read-only source for the algorithm.
The spreadsheet is for FS9, as already said, but FSX and later airport lists could be used to generate plans, although the database might then need some adaptation for new airports. There were many airports from the Open Source website that had aspects missing such as runway surface type, which is important for my generator program (built on a basis of the RPP flightplan generator that Rysiek was fine with me adapting for my own purposes and for releasing). If a runway type is missing, aircraft expecting to land on hard runways would not visit, for example. So the planner needs to know runway lengths, aircraft performance (takeoff distance) to see whether it could land/depart the airport. I've done a lot to ensure that the Open Source data is improved for the planner, but there will still be holes in the data, for example in the Australian outback and in China.
The VBA code is not as nice as I would like. I developed from Rysiek's code for a small project that I completed 2 years ago (!), stripping his program down to do just what I wanted, and then I had an idea for a new project that meant building it back up and expanding it hugely (52-week flightplans, of which I have about 400 operators in my setup now).
If I had sat down and designed it properly rather than discovering ideas as I went, it would have been neater.
It is basically a random flightplan generator that gives us a lot of options to take the randomness away, such as favoring countries and denying access to others, weighting countries as to how likely they are to be visited, and also subtle factors like "the further an aircraft flies, the larger the airport it must use on arrival" (done by artificially shortening the runway length in accordance to distance flown). This stops a bizjet from Munich arriving at a deserted airport in the USA that just happens to have a long enough runway. So there are lots of ideas hidden in there.
It also does TNG flights, and since it can be used to make plans for large fleets (or even multiple fleets in the same batch) there is a system for TNG where you give each individual aircraft a percentage chance of asking for a TNG detail, and an airport is given a percentage chance of accepting the request. If the aircraft gets a random percentage below the threshold (for example 25% - once in four flights it will request to fly TNGs) it will be asking to fly some TNGs, if the airport has a TNG percentage of 50% it will accept TNG requests 50% of the time. So if the aircraft percentage in this case was 12% and the airport random number was 75%, the aircraft would request TNGs but the airport would "refuse". Balancing these two thresholds can get you a realistic level of TNG activity for FTOs (flight training organizations). You might want an operator of Cessnas to have C150s performing TNG trips 70% of the time, C172s performing TNGs 15% of the time, and C182s performing TNGS only 3% of the flights that they make. You can then select the airports where they will perform these TNGS by opening up the TNG percentage from zero (closed to TNGs - default) to some value such as 33%, accepting TNGs 1/3 of the time.
Entire airport categories can also be given the option of accepting TNGs, although this is a bad idea for large airports! For example all small airfields could be given a global percentage chance of accepting TNGs of perhaps 25%, but you only allow TNGs at a few selected medium airports. For example in England there is TNG traffic allowed at places like Exeter, Bournemouth, Cardiff, Oxford, and Biggin Hill, all of which are quite busy airports, some with commercial services. So you could set all small airports to allow TNGs 50% of the time, and these larger airports individually have values such as 25% or 10%, so that they get TNG flights less often.
The whole thing about this planner is that the destinations are randomly chosen, but are then rejected according to the values we put into the controlling factors, such as runway length, or country status (nobody wants to fly to Iran in general, and Cessna 150s are not generally allowed into large airports like Heathrow). What we get eventually is a set of hopefully plausible destinations and a more realistic aircraft behavior. For example regarding behavor of the AI, you can increase or lower a "base factor" that extends the aircraft's sit-time on the ground if it is at its base. If it lands away it might be allowed to sit there for 100 minutes, but at base you can make it sit on the ground for longer times. This is very useful for Air Ambulance operations, where the aircraft sits at base for a long time and then gets called out to a destination where it makes a very fast turn-around. You set the maximum sit-time to 30 minutes and then set a base bias of 6, and when it gets back to base it will potentially sit there for 3 hours (30 minutes x 6). Other aircraft will also tend to rest at base for longer times than at destinations.
The planner also copes with timezones. Each AI can use a profile for flying that dictates the hours it is allowed to fly in each day. This was devised by Rysiek Winawer and is a great idea. The problems are that FS9 flightplans are using GMT/UTC when compiled but local times are when we want the AI to operate. In the planner, I've made the AI "aware of where it is" and slip the timings to reflect this from a timezone database that I created from various bits of Wiki data and a lot of hard work! In countries with multiple timezones but no way of telling which one an airport is in (USA and Canada, and China, that uses one official timezone but actually spans five), I use longitude instead (1hr = 15 degrees of longitude) to make the AI land and depart within reasonable hours (as specified in the profile that the aircraft uses). So if an AI bizjet departs Chicago on a flight that will see it arrive in Bratislava at 2am, the planner will slip the departure on by an hour until the arrival is also within a correct local time in Bratislava. This reflects the reality of late departures from the USA arriving into Europe early in the morning and landing after curfews are lifted.
I have attached some 52-week plans made in the last 24 hours so that you can see the output.
There is a value on the MyProject page (at the upper right in a hidden field) that governs how many flightplans are created. If you clear this from the default value of 52 (weeks) it will create a single week's flightplan. When I was making a package for Air Force One (USA) I set the planner to create several hundred flight plans so tha tI could extract suitable flights from a large numebr and stitch them together to make better weeks. Air Force One flies with an entourage of other aircraft and the planner won't allow me too much discretion in getting an entire fleet to travel around in a cohesive group to a variety of airports close to the destination. Air Force One might fly into Heathrow, but the support aircraft are likely to go into Farnborough, Northolt, and Stansted. I can't really automate that!
Hopefully you can at least use the data. The algorithm might have some useful features in there that can be used, but it is Open Source, and anything built from it would also need to be Open Source.