Implementation of YAPF for cargo routing. More...
#include "../../stdafx.h"
#include "../../cargodest_base.h"
#include "../../station_base.h"
#include "../../town.h"
#include "yapf.hpp"
Go to the source code of this file.
Data Structures | |
struct | CYapfRouteLinkNodeKeyT |
YAPF node key for cargo routing. More... | |
struct | CYapfRouteLinkNodeT |
YAPF node class for cargo routing. More... | |
struct | CFollowRouteLinkT |
Route link follower. More... | |
class | CYapfCostRouteLinkT< Types > |
YAPF cost provider for route links. More... | |
class | CYapfOriginRouteLinkT< Types > |
YAPF origin provider for route links. More... | |
class | CYapfDestinationRouteLinkT< Types > |
YAPF destination provider for route links. More... | |
class | CYapfFollowRouteLinkT< Types > |
Main route finding class. More... | |
struct | CYapfRouteLink_TypesT< Tpf_ > |
Config struct for route link finding. More... | |
struct | CYapfRouteLink |
Typedefs | |
typedef CNodeList_HashTableT < CYapfRouteLinkNodeT, 8, 10, 2048 > | CRouteLinkNodeList |
Functions | |
RouteLink * | YapfChooseRouteLink (CargoID cid, const StationList *stations, TileIndex src, const TileArea &dest, StationID *start_station, StationID *next_unload, byte flags, bool *found, OrderID order, int max_cost) |
Find the best cargo routing from a station to a destination. |
Implementation of YAPF for cargo routing.
Definition in file yapf_cargo.cpp.
RouteLink* YapfChooseRouteLink | ( | CargoID | cid, | |
const StationList * | stations, | |||
TileIndex | src, | |||
const TileArea & | dest, | |||
StationID * | start_station, | |||
StationID * | next_unload, | |||
byte | flags, | |||
bool * | found, | |||
OrderID | order, | |||
int | max_cost | |||
) |
Find the best cargo routing from a station to a destination.
cid | Cargo type to route. | |
stations | Set of possible originating stations. | |
dest | Destination tile area. | |
[out] | start_station | Station the best route link originates from. |
[out] | next_unload | Next station the cargo should be unloaded from the vehicle. |
flags | Routing flags of the cargo. | |
[out] | found | True if a link was found. |
order | Order the vehicle arrived at the origin station. | |
max_cost | Maxmimum allowed node cost. |
Definition at line 426 of file yapf_cargo.cpp.
References CYapfFollowRouteLinkT< Types >::ChooseRouteLink().
Referenced by FindRouteLinkForCargo(), and MoveCargoWithDestinationToStationWorker().