RouteGenerator
Table of Contents
Constants
-
EXP_ROUTE
= 0
-
MONEY_ROUTE
= 1
Properties
-
$dontAddWorseThan
: array<int, numeric-string|int>
-
$expRoutes
: array<numeric-string, array<string|int, MultiplePortRoute>>
-
$moneyRoutes
: array<numeric-string, array<string|int, MultiplePortRoute>>
Methods
-
generateMultiPortRoutes()
: array<int, array<numeric-string, array<string|int, MultiplePortRoute>>>
-
addExpRoute()
: void
-
addMoneyRoute()
: void
-
findOneWayRoutes()
: array<int, array<string|int, OneWayRoute>>
-
getContinueRoutes()
: void
-
initialize()
: void
-
startRoutesToContinue()
: void
-
trimRoutes()
: void
EXP_ROUTE
public
mixed
EXP_ROUTE
= 0
MONEY_ROUTE
public
mixed
MONEY_ROUTE
= 1
$dontAddWorseThan
private
static array<int, numeric-string|int>
$dontAddWorseThan
$expRoutes
private
static array<numeric-string, array<string|int, MultiplePortRoute>>
$expRoutes
$moneyRoutes
private
static array<numeric-string, array<string|int, MultiplePortRoute>>
$moneyRoutes
generateMultiPortRoutes()
public
static generateMultiPortRoutes(int $maxNumPorts, array<int, Port> $ports, array<int, bool> $goods, array<int, bool> $races, array<int, array<int, Path>> $distances, int $routesForPort, int $numberOfRoutes) : array<int, array<numeric-string, array<string|int, MultiplePortRoute>>>
Parameters
-
$maxNumPorts
: int
-
-
$ports
: array<int, Port>
-
-
$goods
: array<int, bool>
-
-
$races
: array<int, bool>
-
-
$distances
: array<int, array<int, Path>>
-
-
$routesForPort
: int
-
-
$numberOfRoutes
: int
-
Return values
array<int, array<numeric-string, array<string|int, MultiplePortRoute>>>
addExpRoute()
private
static addExpRoute(MultiplePortRoute $r) : void
Parameters
-
$r
: MultiplePortRoute
-
addMoneyRoute()
private
static addMoneyRoute(MultiplePortRoute $r) : void
Parameters
-
$r
: MultiplePortRoute
-
findOneWayRoutes()
private
static findOneWayRoutes(array<int, Port> $ports, array<int, array<int, Path>> $distances, int $routesForPort, array<int, bool> $goods, array<int, bool> $races) : array<int, array<string|int, OneWayRoute>>
Parameters
-
$ports
: array<int, Port>
-
-
$distances
: array<int, array<int, Path>>
-
-
$routesForPort
: int
-
-
$goods
: array<int, bool>
-
-
$races
: array<int, bool>
-
Return values
array<int, array<string|int, OneWayRoute>>
getContinueRoutes()
private
static getContinueRoutes(int $maxNumPorts, int $startSectorId, Route $routeToContinue, array<string|int, OneWayRoute> $forwardRoutes, array<int, array<string|int, OneWayRoute>> $routeLists, bool $lastGoodIsNothing) : void
Parameters
-
$maxNumPorts
: int
-
-
$startSectorId
: int
-
-
$routeToContinue
: Route
-
-
$forwardRoutes
: array<string|int, OneWayRoute>
-
-
$routeLists
: array<int, array<string|int, OneWayRoute>>
-
-
$lastGoodIsNothing
: bool
-
initialize()
private
static initialize() : void
startRoutesToContinue()
private
static startRoutesToContinue(int $maxNumPorts, int $startSectorId, array<string|int, OneWayRoute> $forwardRoutes, array<int, array<string|int, OneWayRoute>> $routeLists) : void
Parameters
-
$maxNumPorts
: int
-
-
$startSectorId
: int
-
-
$forwardRoutes
: array<string|int, OneWayRoute>
-
-
$routeLists
: array<int, array<string|int, OneWayRoute>>
-
trimRoutes()
private
static trimRoutes(int $trimToBestXRoutes) : void
Parameters
-
$trimToBestXRoutes
: int
-