Provide an initial heuristic for airports for which we haven't collected any usage data yet.
This commit is contained in:
parent
f2bca353ad
commit
eb45d524a8
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue