Special Feature: Cargo Concept
Relevant source files
The following files were used as context for generating this wiki page:
The Cargo Concept is a strategic architectural design implemented within Trans AI for OpenTTD. Its primary objective is to optimize logistics by employing a "Many-to-one" transport strategy. Under this concept, the AI attempts to consolidate cargo delivery by using only one type of industry as a destination whenever possible, aiming to streamline routes and increase efficiency.
Sources: README.md:4-7, ROADMAP.md:29-31
Strategy Overview
The core logic of the Cargo Concept focuses on minimizing destination complexity. By targeting a single industry type for specific cargo chains, Trans AI reduces the overhead associated with managing diverse routes across multiple industry destinations. This approach is inspired by the established OpenTTDCoop Cargo Concept methodology.
Sources: README.md:4-7, ROADMAP.md:30-31
Transport Implementation Status
The implementation of the Cargo Concept varies across different transport modes. While the high-level strategy is defined, several routes require ongoing rework to fully align with the Many-to-one model.
| Route Type | Implementation Status | Planned Rework |
|---|---|---|
| Road Route | 50% Complete | Required from current implementation |
| Marine Route | 50% Complete | Required from current implementation |
| Rail Route | Planned/In Progress | Comprehensive implementation needed |
Sources: ROADMAP.md:32-35
Logic and Data Flow
The Cargo Concept influences how the AI selects destinations for its transport network. The following diagram illustrates the decision-making flow when the AI identifies cargo at a source industry or town.
The diagram shows how the AI checks for Cargo Concept logic across different transport modes to determine if it should consolidate destinations.
Sources: ROADMAP.md:10-27, ROADMAP.md:30-35
Architectural Integration
The Cargo Concept is integrated into the broader Trans AI framework, which manages various route types and infrastructure. It interacts with the following systems:
- Road and Tram Tracks: Used for transporting freight cargoes from industries to specific industry/town destinations.
- Marine Routes: Utilizes ships and buoys to find proper routes for freight cargo transport.
- Rail Service: Primarily handles raw cargoes between industries, eventually expanding to secondary/tertiary chains.
Component Relationship
This class relationship diagram demonstrates how the Trans AI core utilizes the Cargo Concept strategy to interact with game industries.
Sources: README.md:4-7, ROADMAP.md:12-24
Summary
The Cargo Concept represents Trans AI's shift toward more organized and centralized logistics. By focusing on Many-to-one industry delivery, the AI seeks to maximize profit and simplify network management. While currently partially implemented for Road and Marine routes at 50%, it remains a central pillar of the project's development roadmap and future strategy for all vehicle types.
Sources: README.md:4-7, ROADMAP.md:30-35