Rail transport cost function (Grosso)

# See the paper "A study of contestable regions in Europe through the use of new rail cost function: An application to the hinterland of the new container terminal of Leghorn port". Citation: "International transport: a tool for the calculation of the cost function" by M. Grosso. def rail_transport_cost(P, I, RL, n_L, OV, t, SH, n_SH, LUNL, n_ITU, E, MRL, MRW, n_W, RT, d): """ Cost function for rail transport Parameters ---------- P: staff cost (€/h) I: insurance (€/h) RL: cost of renting and leasing locomotives (€/(h*locomotive)) n_L: number of locomotives in the train OV: rail company overhead costs (€/h) (indirect, administrative and operative) t: time (h) taken by the train to travel from the origin to the destination SH: shunting operations costs (€/operation), cost of preparing the train at the rail terminals n_SH: number of shunting operations performed on the train LUNL: loading/unloading costs (€/ITU) costs of the vertical handling of load units to/from wagons at rail terminals n_ITU: number of Intermodal Transport Units (ITU) transported on the train E: energy cost (€/km) - for electric locomotives: electric energy for fraction (€/kWh) * electric energy consumption (kWh/km) - for diesel locomotives: fuel consumption (l/(km*locomotive)) * fuel price (€/l) * number of locomotives MRL: maintenance and repair cost of a locomotive (€/(km*locomotive)) MRW: maintenance and repair cost of a wagon (€/(km*wagon)) n_W: number of wagons RT: rail track costs (€/km) price of rail infrastructure usage (paid by the transport company to the operator) d: distance (km) travelled by the train from the origin to the destination Returns ------- C: transport cost Notes ---------- Does not account for: 1) variation of energy consumption with slope 2) resistance to motion """ C = (P + I + RL*n_L + OV)*t + SH*n_sh + LUNL*n_ITU + (E + MRL*n_L + MRW*n_W + RT)*d return C