Long and short distance truck model used in North Carolina Statewide Model.
This project includes the following packages:
MPOTrucks
: Disaggregation of statewide flows to MPO regions; used in Metrolina (Charlotte) and the Piedmont Triad (Greensboro).national
: long distance models based on Freight Analysis Frameworkstatewide
: short-distance truck modelsr3logit
: long-distance mode choice model
This project carries an open-source MIT license. See LICENSE
for details.
The source code can be compiled using any java compiler, though build scripts for Apache Ant are provided in the project.
- Install a java developer's kit (JDK) for Java 1.8+ (link to download). Instructions to do this are available from Oracle.
- Set your
JAVA_HOME
system environment variable to point to the JDK you installed. Alternatively, set the "jdk.home" property to the location of the JDK install in order to avoid conflicts with other Java related setups on the machine. - Install Apache Ant.
- Make sure the
ant
command is available on your command line. - Clone this repository (
git clone https://github.com/pbsag/ncstm_truck
). - Open a command window pointed at the cloned working copy.
- Run
ant all
to compile the module and createncstm.jar
, which will be located in therelease/
directory.
[ncstm_truck]$ ant all
Buildfile: /Users/Greg/code/projects/ncstm_truck/build.xml
init:
[echo] ***** JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
clean.module.ncstm:
[delete] Deleting directory /Users/Greg/code/projects/ncstm_truck/build/classes
clean:
compile.module.ncstm:
[mkdir] Created dir: /Users/Greg/code/projects/ncstm_truck/build/classes
[javac] /Users/Greg/code/projects/ncstm_truck/module_ncstm.xml:37: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 15 source files to /Users/Greg/code/projects/ncstm_truck/build/classes
compile:
makejar:
[jar] Building jar: /Users/Greg/code/projects/ncstm_truck/release/ncstm.jar
release:
all:
BUILD SUCCESSFUL
Total time: 8 seconds
The program can also be compiled using ant from within Eclipse. To do so:
- Import the project into Eclipse via the .project file
- Right click on build.xml and select Run As and then Ant Build. Run the "all" target
- Make sure to set your
JAVA_HOME
system environment variable to point to the JDK you installed. Alternatively, set the "jdk.home" property to the location of the JDK install in order to avoid conflicts with other Java related setups on the machine.