1
0
Fork 0

Provide an initial heuristic for airports for which we haven't collected any usage data yet.

This commit is contained in:
Durk Talsma 2010-08-31 13:21:30 +02:00
parent f2bca353ad
commit eb45d524a8

View file

@ -497,6 +497,19 @@ double FGAISchedule::getSpeed()
return speed; return speed;
} }
void FGAISchedule::setScore ()
{
if (runCount) {
score = ((double) hits / (double) runCount);
} else {
if (homePort == fgGetString("/sim/presets/airport-id")) {
score = 0.1;
} else {
score = 0.0;
}
}
}
bool compareSchedules(FGAISchedule*a, FGAISchedule*b) bool compareSchedules(FGAISchedule*a, FGAISchedule*b)
{ {
return (*a) < (*b); return (*a) < (*b);