RUBMRIO CODES

C++  &  Visual Basic

   

Documentation:

Texas Application

U.S. Application

Codes

Papers

Data

Home

 

Click here to download all codes.

Click here to download all ReadMe files.

The RUBMRIO application file (exe) is located in folder:

        VB\Rubmrio-tradeequilibrium\RUBMRIO

DIRECTIONS FILE
Codes\VB\TradeEq\ReadMe 
This file provides basic information on the RUBMRIO program. 
To run the RUBMRIO model (VB version), the following items need to be input, via the user interface: 
1. Maximum Number of generation zones: 254

2. Maximum Number of export zones: 18

3. Maximum Number of production sectors: 18

4. Sector of household: 17

5. Sector of Mining: 2

6. Tolerance: I am not sure how small it can be; however, from 1 to 50 are all acceptable.

7. Maximum iterations: will run regardless of value, but will not converge if not high enough.  

The main output file is written to C:\Output.txt. It is best to open this file in excel as a tab delineated spreadsheet.  
Though the program can allow for non-fixed sectors and zones, but since it can not automatically update the input parameters, it can not allow for change of the first five input numbers. Therefore, the step of load input (A) is actually not necessarily needed. Just load all the parameters (B) from the "all parameters.txt". However, the program is less likely to crash when inputs are loaded separately. The parameters can be found in Codes\VB\InputParameters. To create your own input, VB\Rubmrio-DUE\Trial Region Input\SampleRegionLabelled.txt provides a template.  

Also, this program does not realize the "Run to network equilibrium". It currently can only run to trade equilibrium without congestion feedback. We need to go back to TransCAD to get congestion feedback.  Finally, the program only realizes part of the model.  

The RUBMRIO model:

The current model is driven by foreign & domestic exports (to other countries & other US states), using a nested logit of model to allocate trade flows (across Texas' 254 counties) and input-output tables for inter-industry interactions/productive relationships. An iterative process (illustrated by the flowchart shown at these websites and in associated research papers) seeks equilibration of interzonal, inter-industry flows (on the basis of transport costs).

In each iteration of trade flow computations, monetary flows are converted to vehicle trips, which are loaded onto the highway and railway networks, to appreciate congestive feedbacks (presently only on the highway network, since rail link performance is less well understood). A network equilibration updates travel times and costs. (Note: Original RUBMRIO formulations are based on a distance metric, which is modified to reflect congestion levels on each network link.  Newer versions separate time and cost parameters to more transparently reflect congestive delays, while offering more obvious opportunities for toll policy implementations.)  RUBMRIO uses the new impedance matrices to reallocate inter-county trade flows, until equilibrium is achieved (in trade flows and network loading patterns).  
 
Codes\C\Dynamic Due\ReadMe 

Currently, the dynamic RUBMRIO model is composed of two subprograms: longrun.cpp and shortrun.cpp. 

This version recognizes that current land use/population patterns can significantly affect system adaptation and that long-run equilibrium may never be achieved. This version does not yet have the network equilibration process embedded.  Instead, it requires that one rely on TransCAD (or other software) for traffic assignment with each (sequentially equilibrated) trade flow pattern, to obtain new estimates of link performance. One then must re-estimate the trade flows, in an interative fashion, until equilibrium in flows and costs/performance is achieved. 

The following process runs the dynamic model: 
1. Run the longrun.cpp using longrun input file; 2. Run the shortrun.cpp using shortrun input file; 3. To get a series of results, one can simply change the names of input and output files for each time period.  The labor supply rate change can be done by changing the evolverate value at the general variable declaration. 

Make sure to change file directories consistently, including the following:

1. The code directory;

2. Input file directory;

3. Output file directory;

7. Labor demand input and output directory;

4. Intermediate congestion feedback input and output file directory;

5. Network file directory;

6. Initial.txt file directory (it is the general declaration for DUE) 
 
To obtain the current trade pattern prediction, users should set evolverate=0, & the shortrun.cpp program file should provide the results.

Please note that longrundist.cpp and shortrundist.cpp are similar to longrun.cpp and shortrun.cpp. The differences are as follows: (1) In longrun.cpp and shortrun.cpp, the congestion factors only affect the distance from Texas to Texas's five neighboring states. (2) In longrundist.cpp and shortrun.cpp, the congestion factors affect the total distance from Texas to every continental state. 

   
Visit Dr. Kockelman's Homepage