Skip to content

Commit

Permalink
MOVES3.0.2 with movesdb20210726
Browse files Browse the repository at this point in the history
Merge branch 'dev/v3.0.2'
  • Loading branch information
danielbizercox committed Sep 13, 2021
2 parents 7d86604 + 2addeaf commit 5654a97
Show file tree
Hide file tree
Showing 39 changed files with 1,699 additions and 280 deletions.
6 changes: 3 additions & 3 deletions MOVESConfiguration.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
defaultServerName = localhost
defaultDatabaseName = movesdb20210209
defaultDatabaseName = movesdb20210726
executionServerName = localhost
executionDatabaseName = MOVESExecution
outputServerName = 127.0.0.1
outputDatabaseName = MOVESOutput
nonroadExePath = NONROAD\NR08a\NONROAD.exe
sharedDistributedFolderPath = SharedWork
nonroadExePath = NONROAD/NR08a/NONROAD.exe
sharedDistributedFolderPath = sharedwork
computerIDPath =
masterFolderPath = .
saveTODOPath =
Expand Down
12 changes: 12 additions & 0 deletions NONROAD/NR08a/SOURCE/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
To compile the nonroad executable, install `gfortran` and navigate to this folder in the command prompt. Then type `make`.

`make` will find the makefile and then `gfortran` is used to compile the code.

Note that the location of the nonroad executable is configured in MOVES using 4 files:

1. MOVESConfiguration.txt
2. MOVESWorker.txt
3. maketodo.txt
4. manyworkers.txt

Depending on how this is set and which operating system is used, the nonroad executable may need to be moved and/or renamed to match the capitalization set in the configuration files.
3 changes: 0 additions & 3 deletions NONROAD/NR08a/SOURCE/readme.txt

This file was deleted.

8 changes: 4 additions & 4 deletions WorkerConfiguration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ workFolderPath = WorkerFolder
workerDatabaseName = MOVESWorker
computerIDPath =
workerServerName = localhost
sharedDistributedFolderPath = SharedWork
sharedDistributedFolderPath = sharedwork
concurrentStatements = 1
nonroadApplicationPath = NONROAD\NR08a\nonroad.exe
nonroadWorkingFolderPath = NONROAD\NR08a
calculatorApplicationPath = calc\externalcalculatorgo64.exe
nonroadApplicationPath = NONROAD/NR08a/NONROAD.exe
nonroadWorkingFolderPath = NONROAD/NR08a
calculatorApplicationPath = calc/externalcalculatorgo64.exe
workerDebug = False
mysqlUserName = moves
mysqlPassword = 744ff5134053c418265b626f5d7035e3dff3d50c609c548f6f63
Expand Down
66 changes: 52 additions & 14 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,19 @@
<echo message="nonroadNEIQA - run the nonroad NEI QA scripts. Usage has the same arguments" />
<echo message=" as the onroadNEIQA command. " />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="oniTool - run the ONI Tool against one or more input databases. Use" />
<echo message=" -Dinput= argument to provide the name of the database. If" />
<echo message=" providing more than one database, either comma separate the" />
<echo message=" names and quote the whole argument, or list the database" />
<echo message=" names one per line in a text file and supply the path to this" />
<echo message=" file in -Dinput. When running the ONI Tool via the command" />
<echo message=" line, the output is saved to a table called &quot;onitooloutput&quot;" />
<echo message=" in each input database. For additional help, see" />
<echo message=" database\ONITool\InstructionsForONITool.pdf and " />
<echo message=" docs\ONIToolCommandLine.md" />
<echo message=" ant oniTool -Dinput=&quot;cXXXXXyYYYY_in,cZZZZZyYYYY_in&quot;" />
<echo message=" ant oniTool -Dinput=db_list.txt" />
<echo message="-------------------------------------------------------------------------------"/>
<echo message="run - Execute a runspec. " />
<echo message=" Use -Drunspec= to name the one runspec that will be used." />
<echo message=" ant run -Drunspec=c:\myrunspecs\runspec1.mrs" />
Expand Down Expand Up @@ -232,7 +245,7 @@
<target name="go64" depends="">
<!-- Build the 64-bit versions of the Go calculator and generators -->
<echo message="Building the 64-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="true">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -241,7 +254,7 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 64-bit version of the Go generator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="true">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -256,7 +269,7 @@
<target name="go32" depends="">
<!-- Build the 32-bit versions of the Go calculator and generators -->
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -265,7 +278,7 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go generator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -280,7 +293,7 @@
<target name="go32local" depends="">
<!-- Build the 32-bit versions of the Go calculator and generators using the local \go32 compiler -->
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="true">
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="true">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
Expand All @@ -291,7 +304,7 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="true">
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="true">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
Expand All @@ -316,15 +329,15 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the default 32/64 version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalcdefaultoutput.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalcdefaultoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-o" />
<arg value="externalcalculatorgo.exe" />
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 64-bit version of the Go calculator with the system-wide Go compiler. Expect errors if on a 32-bit system."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="false">
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="false">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -333,7 +346,7 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -342,7 +355,7 @@
<arg value="externalcalculatorgo.go" />
</exec>
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="false">
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="false">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
Expand All @@ -363,7 +376,7 @@
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the default 32/64 version of the Go generators with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogeneratorsdefaultoutput.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogeneratorsdefaultoutput.txt" failifexecutionfails="true">
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
<arg value="-mod" />
Expand All @@ -373,7 +386,7 @@
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 64-bit version of the Go generators with the system-wide Go compiler. Expect errors if on a 32-bit system."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="false">
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="false">
<env key="GOARCH" value="amd64"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -384,7 +397,7 @@
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the system-wide Go compiler."/>
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
<arg value="build" />
Expand All @@ -395,7 +408,7 @@
<arg value="externalgenerator.go" />
</exec>
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="false">
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="false">
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
<env key="GOARCH" value="386"/>
<env key="GOMAXPROCS" value="4"/>
Expand Down Expand Up @@ -1191,6 +1204,31 @@
</if>
</target>

<target name="oniTool" depends="">
<if>
<or>
<not>
<isset property="input" />
</not>
<equals arg1="${input}" arg2="" />
</or>
<then>
<echo>ERROR: The -Dinput= argument was not provided. Type ANT for more information.</echo>
</then>
<else>
<java classname="gov.epa.otaq.moves.master.commandline.ONIToolRunner" fork="yes" maxmemory="512m">
<classpath>
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="classpath" />
<arg value="-input=${input}" />
<arg value="-output=${output}" />
<arg value="-script=database\ONITool\ONITool.sql" />
</java>
</else>
</if>
</target>

<target name="setlogin" depends="">
<java classname="gov.epa.otaq.moves.master.commandline.SetLogin" fork="yes" maxmemory="512m">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion database/ActivityCalculator.sql
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ inner join hotellingActivityDistribution ha on (
-- End Section hotellingHours

-- Section ONI
-- 16, "shi", "Source Hours Idling" -- changed to sho (4)
-- 4, "SHO", "Source Hours Operating" on roadTypeID 1

-- Section WithRegClassID
-- @algorithm shi = sho[roadTypeID=1,sourceTypeID,hourDayID,monthID,yearID,ageID,linkID]*fuelFraction[sourceTypeID,modelYearID,fuelTypeID]*regClassFraction[fuelTypeID,modelYearID,sourceTypeID,regClassID]
Expand Down
3 changes: 0 additions & 3 deletions database/CreateOutput.sql
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
VALUES (14, "hotellingElectric", "Hotelling Battery or AC");
INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
VALUES (15, "hotellingOff", "Hotelling All Engines Off");
INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
VALUES (16, "shi", "Source Hours Idle");



CREATE TABLE MOVESWorkersUsed (
Expand Down
Loading

0 comments on commit 5654a97

Please sign in to comment.