Air Route Management
Relevant source files
The following files were used as context for generating this wiki page:
The Air Route Management system in Trans AI is responsible for coordinating aerial transportation of passengers between locations. This module handles the construction of aviation infrastructure, including airports, and manages different aircraft types, such as standard airplanes and helicopters (choppers), to facilitate inter-town travel.
As part of the broader Trans AI strategy, the air route logic follows the Cargo Concept, attempting to use specific industries or towns as consolidated destinations to optimize logistics. The system is designed to operate within the OpenTTD environment, utilizing specific AI libraries for common operations, list management, and string handling.
Sources: README.md:3-8, ROADMAP.md:4-8
Aircraft Services and Types
Trans AI implements air transport primarily to move passengers between towns. The system is designed to support a variety of aviation hardware to meet different geographical and demand requirements.
Fixed-Wing Aircraft
The AI is capable of building any available airport type and standard airplane models. These are used for the primary "town to town" transport service. The implementation for these basic aircraft services is marked as completed in the development roadmap.
Helicopter (Chopper) Services
Choppers represent a specialized segment of air route management. While standard aircraft handle town-to-town routes, helicopters are specifically designated for transporting passengers from towns to oil rigs. This feature is currently listed as a planned addition to the air route logic.
Sources: ROADMAP.md:5-10
Infrastructure and Maintenance
The management of air routes includes the physical placement of airports and the ongoing oversight of the infrastructure.
Dynamic Infrastructure Maintenance
Trans AI includes a detection mechanism for "infrastructure maintenance" settings within the game. If this setting is activated, the AI adjusts its behavior to ensure the financial viability of its air routes. This is particularly critical for air routes due to the high cost of airport maintenance and aircraft operation.
The following flowchart illustrates how the AI evaluates and implements an air route based on infrastructure settings:
The diagram shows the decision logic for air route deployment, emphasizing the role of maintenance settings.
Sources: ROADMAP.md:42-44
Technical Components and Dependencies
The Air Route Management module relies on several external libraries and internal configuration files to function within the OpenTTD AI framework.
Required Libraries
To process lists of potential airport locations and handle aircraft naming or categorization, the following dependencies must be present in the ../ai/library folder:
| Library | Purpose |
|---|---|
AILibCommon | Core AI utility functions |
AILibList | Managing lists of towns, airports, and vehicles |
AILib.String | Formatting and parsing vehicle or station names |
Sources: README.md:41-44
Versioning and Development
The air route logic is part of a rolling release model. The versioning is handled automatically via dates (YYMMDD) to ensure that development builds do not conflict with stable releases.
This sequence shows how updates to the air route logic are deployed through the automated build process.
Sources: README.md:46-55, .github/workflows/rolling-release.yml
Integration with Cargo Strategy
Air routes are not managed in isolation but are integrated into the "Many-to-one" Cargo Concept. Trans AI attempts to consolidate passenger or cargo delivery to minimize the number of distinct destinations, though this is primarily highlighted for road and marine routes in the current roadmap.
| Feature | Air Route Status | Description |
|---|---|---|
| Town-to-Town | Completed | Passenger transport via airplanes. |
| Town-to-Oil Rig | Planned | Specialized transport via choppers. |
| Maintenance Logic | Completed | Adjusts builds based on game settings. |
| CargoDist Support | Planned | Future integration with CargoDist API. |
Sources: ROADMAP.md:5-10, ROADMAP.md:42-47, README.md:5-8
Conclusion
Air Route Management in Trans AI provides a robust framework for high-speed passenger transport. By balancing infrastructure costs against maintenance settings and utilizing both fixed-wing aircraft and helicopters, the AI maintains a competitive transport network. Future developments aim to refine chopper deployment for industrial targets like oil rigs and integrate more deeply with the game's CargoDist mechanics.