Marine Route Management
Relevant source files
The following files were used as context for generating this wiki page:
- ROADMAP.md
- README.md
- license.txt
- info.nut (Referenced via README versioning section)
- .github/workflows/rolling-release.yml (Referenced via README build process section)
Marine Route Management is a core component of the Trans AI system designed to handle the transportation of passengers, mail, and freight cargoes via water-based infrastructure. It operates within the OpenTTD environment, enabling the AI to compete with other players by establishing naval logistics chains between towns and industrial locations.
The system focuses on utilizing ships as the primary transport vehicle, supported by the strategic placement of navigational aids such as buoys to ensure efficient pathfinding across water bodies.
Sources: ROADMAP.md:16-18, README.md:3-5
Operational Objectives
The primary goal of the Marine Route module is to facilitate the movement of various cargo types using available naval assets. The implementation covers several specific use cases:
- Town-to-Town Transport: Moving passengers and mail between urban centers.
- Industrial Logistics: Transporting freight cargoes from production industries to processing industries or towns.
- Pathfinding Assistance: Implementing buoy construction to guide ships through complex or long-distance water routes.
Sources: ROADMAP.md:16-18
Marine Logistics Architecture
The marine system follows the general "Cargo Concept" used throughout the Trans AI project, which emphasizes a many-to-one delivery model. This strategy attempts to consolidate cargo destinations to a single industry type where possible to optimize transport efficiency.
The following diagram illustrates the flow of cargo within the marine management system:
This flowchart depicts the decision logic and deployment steps for establishing marine routes.
Sources: ROADMAP.md:16-18, ROADMAP.md:26-28, README.md:3-5
Key Features and Status
Marine Route Management includes several specific sub-features that are at various stages of development according to the project roadmap.
| Feature | Description | Status |
|---|---|---|
| Passenger/Mail Transport | Service between towns using ships. | Implemented |
| Freight Transport | Moving industrial goods between industries and towns. | Implemented |
| Buoy Navigation | Building buoys to assist ships in finding proper routes. | Implemented |
| Many-to-one Cargo | Consolidation of destinations for marine freight. | In Progress (50%) |
Sources: ROADMAP.md:16-20, ROADMAP.md:27-30
Implementation Logic
Navigation and Pathfinding
Unlike road or rail which rely on physical tracks, marine routes in OpenTTD require the AI to handle open water navigation. Trans AI addresses this by building buoys. These act as waypoints that ships must visit, preventing pathfinding failures over long distances or through narrow straits.
Sources: ROADMAP.md:18
Cargo Handling Strategy
The system is currently undergoing a rework regarding how it handles the "Cargo Concept." The goal is to ensure that for road and marine routes, the AI selects the most efficient industry destinations to minimize scattered deliveries.
Sources: ROADMAP.md:26-31
Technical Requirements for Deployment
To function correctly, the Marine Route Management system relies on several external AI libraries that must be present in the OpenTTD environment.
| Library | Purpose |
|---|---|
| AI Library - Common | Core AI functions and utilities. |
| AI Library - List | Management of lists (e.g., list of available ships or docks). |
| AI Library - String | Text and string manipulation for naming routes. |
Sources: README.md:43-46
Conclusion
Marine Route Management provides Trans AI with the capability to utilize water bodies for logistics, ensuring it can compete in maps where land-based transport is restricted. By integrating buoy-based navigation and the Cargo Concept destination logic, the system provides a robust framework for naval transport of passengers and industrial freight.
Sources: ROADMAP.md:16-18, README.md:3-5