User:Maqifrnswa

From #openttdcoop wiki

Revision as of 09:12, 30 July 2016 by Maqifrnswa (Talk | contribs) (vehicle loading rates)

Jump to: navigation, search

See my New Player Pointers

game mechanics

cargo delivery to stations

Every day is 74 ticks. every 256 ticks cargo is delivered to stations (8 or 9 times a month, every 3.5 days).

vehicle loading rates

When a vehicle is loading, cargo is loaded every: 40 ticks for trains, 20 ticks for planes/road vehicles, or 10 ticks for ships. Each individual train car adds cargo every loading event, so longer trains load more per tick than short trains. The default amount of cargo loaded is seen below:

Default Vehicle Loading Rates
Type Ticks per Load Units Cargo Loaded Per Load
Train 40 5
Road 20 5
Ship 10 10
Air 20 20 for all except mail (5 for mail)

From: (src/economy.cpp "const uint gradual_loading_wait_time[] = { 40, 20, 10, 20 }", order is enumerated in src/vehicle_type.h) src/tables/engines.h. NewGRFs define the loading_speed property which is not visible in the client (maybe it should be?). It is in the item "property" or "graphics" setting. for example, brickwalker in NUTS has a loading_speed=2.


Air Mail is funky, according to src/economy.cpp

/* The default loadamount for mail is 1/4 of the load amount for passengers */
bool air_mail = v->type == VEH_AIRCRAFT && !Aircraft::From(v)->IsNormalAircraft();
if (air_mail) load_amount = CeilDiv(load_amount, 4);

From (src/aircraft_cmd.cpp), mail is carried by the airplane's shadow! that's why you need to check if it is not a normal aircraft (but its shadow!)


1 unit of cargo is defined in the default OpenGRF as:

Cargo Multiplier Meaning
PASS 4 A vehicle carrying 1 ton of coal, can carry 4 passengers.
MAIL 2 A vehicle carrying 1 ton of coal, can carry 2 bags of mail.
GOOD, SWET 2 A vehicle carrying 1 ton of coal, can carry 2 crates of goods/sweets.
(everything else) 1 All other slots default to 1, i.e. 1 unit of cargo equals 1 ton of coal.

source: https://newgrf-specs.tt-wiki.net/wiki/Action0Cargos and src/table/cargo_const.h

notes

rate equiations

pick up station

  • generation rate
  • loading rate * station size
  • what limits: track capacity, loading rate or generation rate?
    • ideal, limit by generation rate. Generation rate determines min number of station tracks, and number of station tracks determines sideline size

Drop off station size

  • limited by input capacity, which is = number of input tracks * max track capacity
    • min number of stations tracks determined by number of input tracks (make unload capacity = loading capacity)


clearing sideline jams:

  • start with furthest station, make all other stations merge with sideline with priority given to furthest station
  • optimize flow from furthest station (overload with trains such that waiting cargo goes to 0, and overflow is full. wait for steady state
  • when at steady state (i.e., multiple round trips of trains generated on demand) delete excess trains in overflow from furthest station. this station now generates trains on demand. Excess trains mean the total trains servicing the station should be round trip time times industry generation rate. At steady state, a train is returning to station as often as it is being generated, so any train in overflow is excess!
  • move to next closest station, repeat.
  • at end, each station will generate trains on demand. If, in steady state, on track never moves (because it has worst priority) - that means you need a second sideline. Start it from there, and all later stations merge with this new one.
  • repeat
  • if you added sideline out, will also need to add a new sideline in
Powered by MediaWiki