How FSX makes decisions
Posted 04 December 2008 - 09:14 AM
In principle, there are two ways to decide. The usual way we do it is to estimate consequences, and our human brain is very powerful to habe a rough estmate of future consequences due to past experience, and we react mostly out of our subconciessness ( that uses 95% of our brain ) than out of our intelligence ( that uses 5% only ).
To bring this onto the computer, the computer would have to calculate what will happen in advance, so not only the current frame, but also the next 10 minutes minimum, at 25 frames per second, 1500 frames per minute, so the next 15000 frames. We know now that current hardware has problems to get one frame done in time - to have a real concept of future our computers would need to be 15000 times as fast as they are now. And if they were, I assume you would want to have more details and not just a better basic logic...
The alternative are weighting algorithms. Let me describe how FS calculates which parking should be used for an AI plane when it has landed and shortly stops on the runway.
FSX loops over all parkings. If they are used, they get the weight 0 and the loop goes over to the next one. Otherwise, from ATC parking code ( airline code, if programmed into the aircraft and the parking ), parking type, parking radius, and distance from the current location a weight is calculated. The detail of this formula I do not know, but every free parking gets a weight - 0 if it is significantly too small for the aircraft. Parking codes have the largest weight.
This weight always is a compromise, it may well be that on a crowded airport ( especially if some parkings are assigned to airlines ) a gate fitting to the aircraft in size nearby gets a higher weight as a far away cargo parking that is larger, despite it is a cargo plane, but it is a rather fast algorithm.
Now, if the maximum weight is 0, there is no solution where to park the aircraft, and it gets deleted. The art of AI programming is to have this to be a rare case with normal traffic settings ( 50% AI density) , and in MyTraffic a lot of work has gone into this optimisation.
It should be mentioned that the same, looping over all aircraft that are on the airport, is done during the fast phase of scenery loading. This means that the first aircraft will get the best fitting places, without looking if other aircraft would fit there better.
Still, on larger airports this loop can go over hundred and more parkings, so we speak about several thousand calculations that have to be done. Each subsystem in FSX only gets a certain amount of CPU time warrented - so if you have no spare CPU time, it will happen that this calculation gets aborted before all the parkings are evaluated, in this case the first best will be used. This is what happens if you have the frame delimiter above your actual frame rate, and especially at unlimited. The loop will terminate after a few parkings have been evaluated, and what happens will be completely random.
Other decisions, like which runway gets used, etc, use similar procedures. Since they do not calculate in advance the consequences, they work astonishingly well, with a low failure rate of a few % only - but these failures will happen, and there is no way around them.
Posted 04 December 2008 - 04:52 PM
Posted 04 December 2008 - 10:37 PM
Posted 11 November 2009 - 09:58 AM
a) The coordinates of the AI/User aircraft
A list of runways for all the world's airports, including:
i) The runway threshold coordinates (AFD "Start" point)
ii) The orientation of the runway
iii) Whether it is open, closed for takeoff, closed for landing
c) The direction of the wind.
So how does FSX determine the runway, especially if there are multiple choices? My guess is the closest available runway is chosen (closest being "as the crow flies") for both an arrival request and a departure request. "Available runways" depend on closed state and wind direction.
Posted 11 November 2009 - 11:26 AM
For each runway, a probabilty is calculated.
Open/close information gives a certain amount of weight ( a big one ), wind direction gives a big weight, and distance from aircraft to start point enters in this. Maybe also length requirements, for sure surface pproperty compared to aircraft requirement, maybe more... All this gets summed up and the one with the smallest weight will be used.
In case of Heathrow, with two runways parallel of same length and surface and width, if both are open this comes down to the distance only, with more complicated layouts this may depend on wind direction, wind speed for two non parallel runways that have similar distance from the aircraft. Usage of runways is not taken into account, so FSX does not try to prefer unused runways.
Posted 19 January 2010 - 10:18 AM
Recently I picked it up again and started browsing some forums again, we'll see what happens.
On topic... I've done a lot of research on how FSX will assign runways. The two most important things to remember:
1) There is a bug in it, related to closed runways. For both the primary and secondary runway start, FSX will check the 'Closed for Take-off' flag for the primary. (There may be bugs in this line as well, since I don't recall exactly what got checked instead of what, but there is a mix up there)
2) The assigning algoritm is (totally) incompatible with the crosswinds/Star technology. The FS algorithm is based upon the fact that it only has to make a decision between true parallel runways. Tying non parallel runways together using the Star technology breaks the algorithm. Ever wondered why you had to taxi to a runway on the other side of the field while you are standing almost next to an available runway? It's a side effect of the Star technology. FSX will send you to the closest available runway. But closest as in: the shortest distance between you and the great circle through the runway (or the centerline of the runway extended all around the world). Now this works ok if all available runways are truly parallel. But if they are not, you could be 300 feet from runway 18, but still be send to runway 27, 5000 feet away, if the extended centerline of that runway passes within 300 feet from your parking position.
The algorithm itself... have to look it up, but it involves the wind (which is only evaluated for the first runway in a group, again since FSX thinks all runways in a group are really parallel) and then the type of engine and the weight of the plane to determine the required length of the runway and, as said, the distance between the plane and the extended centerline of the runway.
Another bug is the distance between the runway start and the plane that is needed before a plane will ask for T/O clearance. This threshold is too small for for instance 18C at Schiphol. Planes will taxi there but just hold short because the T/O request is never triggered.
Disposition Software Development
Posted 20 January 2010 - 02:26 PM
Posted 22 January 2010 - 01:33 PM
Each subsystem in FSX only gets a certain amount of CPU time warrented - so if you have no spare CPU time, it will happen that this calculation gets aborted before all the parkings are evaluated
Is this perhaps documented somewhere? I'd be quite interested the find out a bit more about this.
Disposition Software Development
Posted 23 January 2010 - 08:05 AM
But if you are a programmer, you know this is the fastest way to do things, and if you make realtime programming, that is standard technology...
Posted 02 February 2010 - 07:25 AM
The scoring algorithm is rather complex, the details I have deciphered so far are in a Wiki article over at fsdevelopper: http://www.fsdevelop...dex.passignment
Disposition Software Development
Posted 02 February 2010 - 08:59 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users