1
0
Fork 0

-Revert to the original design. It still appearch to yield the best scheduling results.

This commit is contained in:
Durk Talsma 2011-10-10 23:03:57 +02:00
parent 835334bd4f
commit 020d6a6363
2 changed files with 2 additions and 15 deletions

View file

@ -379,20 +379,11 @@ void FGAISchedule::scheduleFlights(time_t now)
SG_LOG(SG_GENERAL, SG_BULK, "Scheduling Flights for : " << modelPath << " " << registration << " " << homePort);
FGScheduledFlight *flight = NULL;
do {
if (currentDestination.empty()) {
//flight = findAvailableFlight(userPort, flightIdentifier, now, (now+1800));
if (!flight)
flight = findAvailableFlight(currentDestination, flightIdentifier);
} else {
flight = findAvailableFlight(currentDestination, flightIdentifier);
}
flight = findAvailableFlight(currentDestination, flightIdentifier);
if (!flight) {
break;
}
if (startingPort.empty()) {
startingPort = flight->getDepartureAirport()->getId();
}
currentDestination = flight->getArrivalAirport()->getId();
@ -423,7 +414,7 @@ void FGAISchedule::scheduleFlights(time_t now)
<< " " << arrT << ":");
flights.push_back(flight);
} while (currentDestination != startingPort);
} while (currentDestination != homePort);
SG_LOG(SG_GENERAL, SG_BULK, " Done ");
}

View file

@ -270,10 +270,6 @@ void FGTrafficManager::update(double /*dt */ )
//cerr << "Processing << " << (*currAircraft)->getRegistration() << " with score " << (*currAircraft)->getScore() << endl;
if (!((*currAircraft)->update(now, userCart))) {
(*currAircraft)->taint();
// NOTE: With traffic manager II, this statement below is no longer true
// after proper initialization, we shouldnt get here.
// But let's make sure
//SG_LOG( SG_GENERAL, SG_ALERT, "Failed to update aircraft schedule in traffic manager");
}
currAircraft++;
}