1

Draft MOVES2009

Miscellaneous Topics

FHWA Resource Center

EPA Office of Transportation and Air Quality

EPA-420-B-09-031
2

2

Miscellaneous Topics

z MOVES from the DOS Prompt

– Setenv

– ANT Commands

z RunGUI

z Compileall

z MOVES Batch File Processing
3
4
5

MOVES Batch File Example 1

z @echo off

z rem -----------------------------------------------------------

z rem Command Line Notes:

z rem "-e DEBUG" logs all types of messages to MOVESbatch.log

z rem -----------------------------------------------------------

z echo Changing to the MOVES folder and compiling code...

z C:

z cd "C:\EPA\MOVES\MOVESGHGSource"

z call setenv.bat

z call ant compile

z rem -----------------------------------------------------------

z echo Running Test_26161_2009_Washtenaw.mrs

z java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e DEBUG -r 

"C:\EPA\MOVES\MOVESGHGSource\Task910LoopingTool\Test_26161_2009_Washtenaw.mrs"

z echo Running Test_26163_2009_Wayne.mrs

z java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e DEBUG -r 

"C:\EPA\MOVES\MOVESGHGSource\Task910LoopingTool\Test_26163_2009_Wayne.mrs"

z echo Running Test_26161_2010_Washtenaw.mrs

z java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e DEBUG -r 

"C:\EPA\MOVES\MOVESGHGSource\Task910LoopingTool\Test_26161_2010_Washtenaw.mrs"

java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e DEBUG

-i importAllFromTemplates.xml

Be sure to place all of this on one line. The “-e DEBUG” portion ensures that all

messages will be captured, even if they are just informational. The “-i” option directs 

MOVES

to the XML file that describes the import actions to occur. Note that this XML file 

essentially

contains a RunSpec within it, thus allowing wildcards even when importing via the 

command

line.
6

MOVES Batch File Example 2

z @echo off

z rem -----------------------------------------------------------

z rem Command Line Notes:

z rem "-e DEBUG" logs all types of messages to MOVESbatch.log

z rem -----------------------------------------------------------

z echo Changing to the MOVES folder and compiling code...

z C:

z cd "C:\EPA\MOVES\MOVESGHGSource"

z call setenv.bat

z call ant compile

z rem -----------------------------------------------------------

z echo load project data

z java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e 

DEBUG -i "C:\EPA\MOVES\MOVESGHGSource\ProjectData.xml"

Once the GUI is used to create an importer XML file, it can be edited and executed 

via the command line. Remember that when using the command line, text output is 

not sent to the screen but instead stored in MOVESBatch.log.

An example command line is:

java gov.epa.otaq.moves.master.commandline.MOVESCommandLine -e DEBUG

-i importAllFromTemplates.xml

Be sure to place all of this on one line. The “-e DEBUG” portion ensures that all 

messages will be captured, even if just informational. The “-i” option directs 

MOVES to the XML file that describes the import actions to occur. Note that this 

XML file essentially contains a RunSpec within it, thus allowing wildcards even 

when done via the command line.
7

<runspec> 

 <description><![CDATA[heavy -duty diesel project example. trucks entering and 

existing an over-night rest station. Only one hour 11 PM is modeled for total PM2.5 

emissions.]]></description> 

 <modelscale value="MACRO"/> 

 <modeldomain value="PROJECT"/> 

 <geographicselections> 

 <geographicselection type="COUNTY" key="26161" 

description="MICHIGAN - Washtenaw County"/> 

 </geographicselections> 

 <timespan> 

 <year key="2009"/> 

 <month id="1"/> 

 <day id="5"/> 

 <beginhour id="24"/> 

 <endhour id="24"/> 

 <aggregateBy key="Hour"/> 

 </timespan> 

 <onroadvehicleselections> 

 <onroadvehicleselection fueltypeid="2" fueltypedesc="Diesel Fuel" 

sourcetypeid="62" sourcetypename="Combination Long-haul Truck"/> 

 </onroadvehicleselections> 

 <offroadvehicleselections> 

 </offroadvehicleselections> 

 <offroadvehiclesccs> 

 </offroadvehiclesccs> 

 <roadtypes> 

 <roadtype roadtypeid="1" roadtypename="Off-Network"/> 

 <roadtype roadtypeid="3" roadtypename="Rural Unrestricted Access"/> 

 </roadtypes> 

 <pollutantprocessassociations> 

 <pollutantprocessassociation pollutantkey="110" pollutantname="Primary 

Exhaust PM2.5 - Total" processkey="1" processname="Running Exhaust"/> 

 <pollutantprocessassociation pollutantkey="110" pollutantname="Primary 

Exhaust PM2.5 - Total" processkey="2" processname="Start Exhaust"/> 

 <pollutantprocessassociation pollutantkey="110" pollutantname="Primary 

Exhaust PM2.5 - Total" processkey="90" processname="Extended Idle Exhaust"/> 

 <pollutantprocessassociation pollutantkey="112" pollutantname="Primary 

PM2.5 - Elemental Carbon" processkey="1" processname="Running Exhaust"/> 

 <pollutantprocessassociation pollutantkey="112" pollutantname="Primary 

PM2.5 - Elemental Carbon" processkey="2" processname="Start Exhaust"/> 

 <pollutantprocessassociation pollutantkey="112" pollutantname="Primary 

PM2.5 - Elemental Carbon" processkey="90" processname="Extended Idle Exhaust"/> 

 <pollutantprocessassociation pollutantkey="111" pollutantname="Primary 

PM2.5 - Organic Carbon" processkey="1" processname="Running Exhaust"/>

MOVES Runspec Example