Skip to content

Python codes that processes commodity, cost, exceptions, and plots calculated routes to links

Notifications You must be signed in to change notification settings

pnkjmndhl/routing-via-railnet

Repository files navigation

RAILNET

RAILNET is a set of scripts that implements a rail carrier optimization algorithm predicting traffic patterns in a given network. It requires several inputs generated by each folder in this repository.

1. Commodity:

To calculate tons of flow in the network, Carload Waybill Sample (CWS) collected by the Surface Transportation Board (STB) is used. The Origin Railroad (ORR), Origin FIPS Code, Standard Transportation Commodity Code (STCC) and Gross Tons from the CWS, are used to calculate empty rails. After getting base distribution of flows, scenario flows are generated in RAILNET adjusting the CWS for the scenario.

2. Cost:

Cost attributes by Railroad and commodity (including emptys) are implemented in the program. Cost attributes include TrainCost/hr, Cost/gross-ton-mile, terminal-processing-cost/car,fixed, terminal-cost/car-hr, transfer-cost/car, car-payload, car-tare-wt, Gross-Car-Weight, Cars-per-Train, and Gross-Train-Weight.

3. Network:

The geospatial map of US-Railroads with attributes are converted RAILNET readable network.dat here. Any links or nodes are added, Node IDs and Link IDs are generated based on the FIPS they are in. If the network has missing attributes, they are autogenerated and/or flagged.

4. Transfers:

Excel version of transfers are converted to GIS based; nearest nodes with specific railroads are found, additionally manual transfers are added through visual inspection. These plotted points are then converted to transfer.dat.

5. Exceptions:

Link Exception and Transfer Exception are converted to link.exc and transfer.exc here.

6. Netdata:

The FORTRAN optimization program is fed with all the parameters here.

7. Output:

The output (.out) from RAILNET is changed to (.csv) here. The script extracts Gross Tons by Railroad, Delay Time and Actual Travel Time.

Things to consider:

  1. Update the cost attributes before running commodity.py
  2. Update the transfers anytime you change the railroads sufficiently enough to change the snappings of excel transfers.

About

Python codes that processes commodity, cost, exceptions, and plots calculated routes to links

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published