Skip to content

Commit 5654a97

Browse files
MOVES3.0.2 with movesdb20210726
Merge branch 'dev/v3.0.2'
2 parents 7d86604 + 2addeaf commit 5654a97

39 files changed

+1699
-280
lines changed

MOVESConfiguration.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
defaultServerName = localhost
2-
defaultDatabaseName = movesdb20210209
2+
defaultDatabaseName = movesdb20210726
33
executionServerName = localhost
44
executionDatabaseName = MOVESExecution
55
outputServerName = 127.0.0.1
66
outputDatabaseName = MOVESOutput
7-
nonroadExePath = NONROAD\NR08a\NONROAD.exe
8-
sharedDistributedFolderPath = SharedWork
7+
nonroadExePath = NONROAD/NR08a/NONROAD.exe
8+
sharedDistributedFolderPath = sharedwork
99
computerIDPath =
1010
masterFolderPath = .
1111
saveTODOPath =

NONROAD/NR08a/SOURCE/readme.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
To compile the nonroad executable, install `gfortran` and navigate to this folder in the command prompt. Then type `make`.
2+
3+
`make` will find the makefile and then `gfortran` is used to compile the code.
4+
5+
Note that the location of the nonroad executable is configured in MOVES using 4 files:
6+
7+
1. MOVESConfiguration.txt
8+
2. MOVESWorker.txt
9+
3. maketodo.txt
10+
4. manyworkers.txt
11+
12+
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.

NONROAD/NR08a/SOURCE/readme.txt

-3
This file was deleted.

WorkerConfiguration.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ workFolderPath = WorkerFolder
22
workerDatabaseName = MOVESWorker
33
computerIDPath =
44
workerServerName = localhost
5-
sharedDistributedFolderPath = SharedWork
5+
sharedDistributedFolderPath = sharedwork
66
concurrentStatements = 1
7-
nonroadApplicationPath = NONROAD\NR08a\nonroad.exe
8-
nonroadWorkingFolderPath = NONROAD\NR08a
9-
calculatorApplicationPath = calc\externalcalculatorgo64.exe
7+
nonroadApplicationPath = NONROAD/NR08a/NONROAD.exe
8+
nonroadWorkingFolderPath = NONROAD/NR08a
9+
calculatorApplicationPath = calc/externalcalculatorgo64.exe
1010
workerDebug = False
1111
mysqlUserName = moves
1212
mysqlPassword = 744ff5134053c418265b626f5d7035e3dff3d50c609c548f6f63

build.xml

+52-14
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@
144144
<echo message="nonroadNEIQA - run the nonroad NEI QA scripts. Usage has the same arguments" />
145145
<echo message=" as the onroadNEIQA command. " />
146146
<echo message="-------------------------------------------------------------------------------"/>
147+
<echo message="oniTool - run the ONI Tool against one or more input databases. Use" />
148+
<echo message=" -Dinput= argument to provide the name of the database. If" />
149+
<echo message=" providing more than one database, either comma separate the" />
150+
<echo message=" names and quote the whole argument, or list the database" />
151+
<echo message=" names one per line in a text file and supply the path to this" />
152+
<echo message=" file in -Dinput. When running the ONI Tool via the command" />
153+
<echo message=" line, the output is saved to a table called &quot;onitooloutput&quot;" />
154+
<echo message=" in each input database. For additional help, see" />
155+
<echo message=" database\ONITool\InstructionsForONITool.pdf and " />
156+
<echo message=" docs\ONIToolCommandLine.md" />
157+
<echo message=" ant oniTool -Dinput=&quot;cXXXXXyYYYY_in,cZZZZZyYYYY_in&quot;" />
158+
<echo message=" ant oniTool -Dinput=db_list.txt" />
159+
<echo message="-------------------------------------------------------------------------------"/>
147160
<echo message="run - Execute a runspec. " />
148161
<echo message=" Use -Drunspec= to name the one runspec that will be used." />
149162
<echo message=" ant run -Drunspec=c:\myrunspecs\runspec1.mrs" />
@@ -232,7 +245,7 @@
232245
<target name="go64" depends="">
233246
<!-- Build the 64-bit versions of the Go calculator and generators -->
234247
<echo message="Building the 64-bit version of the Go calculator with the system-wide Go compiler."/>
235-
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="true">
248+
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="true">
236249
<env key="GOARCH" value="amd64"/>
237250
<env key="GOMAXPROCS" value="4"/>
238251
<arg value="build" />
@@ -241,7 +254,7 @@
241254
<arg value="externalcalculatorgo.go" />
242255
</exec>
243256
<echo message="Building the 64-bit version of the Go generator with the system-wide Go compiler."/>
244-
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="true">
257+
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="true">
245258
<env key="GOARCH" value="amd64"/>
246259
<env key="GOMAXPROCS" value="4"/>
247260
<arg value="build" />
@@ -256,7 +269,7 @@
256269
<target name="go32" depends="">
257270
<!-- Build the 32-bit versions of the Go calculator and generators -->
258271
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
259-
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
272+
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
260273
<env key="GOARCH" value="386"/>
261274
<env key="GOMAXPROCS" value="4"/>
262275
<arg value="build" />
@@ -265,7 +278,7 @@
265278
<arg value="externalcalculatorgo.go" />
266279
</exec>
267280
<echo message="Building the 32-bit version of the Go generator with the system-wide Go compiler."/>
268-
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
281+
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
269282
<env key="GOARCH" value="386"/>
270283
<env key="GOMAXPROCS" value="4"/>
271284
<arg value="build" />
@@ -280,7 +293,7 @@
280293
<target name="go32local" depends="">
281294
<!-- Build the 32-bit versions of the Go calculator and generators using the local \go32 compiler -->
282295
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
283-
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="true">
296+
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="true">
284297
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
285298
<env key="GOARCH" value="386"/>
286299
<env key="GOMAXPROCS" value="4"/>
@@ -291,7 +304,7 @@
291304
<arg value="externalcalculatorgo.go" />
292305
</exec>
293306
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
294-
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="true">
307+
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="true">
295308
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
296309
<env key="GOARCH" value="386"/>
297310
<env key="GOMAXPROCS" value="4"/>
@@ -316,15 +329,15 @@
316329
<arg value="externalcalculatorgo.go" />
317330
</exec>
318331
<echo message="Building the default 32/64 version of the Go calculator with the system-wide Go compiler."/>
319-
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalcdefaultoutput.txt" failifexecutionfails="true">
332+
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalcdefaultoutput.txt" failifexecutionfails="true">
320333
<env key="GOMAXPROCS" value="4"/>
321334
<arg value="build" />
322335
<arg value="-o" />
323336
<arg value="externalcalculatorgo.exe" />
324337
<arg value="externalcalculatorgo.go" />
325338
</exec>
326339
<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."/>
327-
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="false">
340+
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc64output.txt" failifexecutionfails="false">
328341
<env key="GOARCH" value="amd64"/>
329342
<env key="GOMAXPROCS" value="4"/>
330343
<arg value="build" />
@@ -333,7 +346,7 @@
333346
<arg value="externalcalculatorgo.go" />
334347
</exec>
335348
<echo message="Building the 32-bit version of the Go calculator with the system-wide Go compiler."/>
336-
<exec executable="go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
349+
<exec executable="go" spawn="false" dir="${user.dir}/calc/" output="gocalc32output.txt" failifexecutionfails="true">
337350
<env key="GOARCH" value="386"/>
338351
<env key="GOMAXPROCS" value="4"/>
339352
<arg value="build" />
@@ -342,7 +355,7 @@
342355
<arg value="externalcalculatorgo.go" />
343356
</exec>
344357
<echo message="Building the 32-bit version of the Go calculator with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
345-
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="false">
358+
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/calc/" output="gocalc32localoutput.txt" failifexecutionfails="false">
346359
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
347360
<env key="GOARCH" value="386"/>
348361
<env key="GOMAXPROCS" value="4"/>
@@ -363,7 +376,7 @@
363376
<arg value="externalgenerator.go" />
364377
</exec>
365378
<echo message="Building the default 32/64 version of the Go generators with the system-wide Go compiler."/>
366-
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogeneratorsdefaultoutput.txt" failifexecutionfails="true">
379+
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogeneratorsdefaultoutput.txt" failifexecutionfails="true">
367380
<env key="GOMAXPROCS" value="4"/>
368381
<arg value="build" />
369382
<arg value="-mod" />
@@ -373,7 +386,7 @@
373386
<arg value="externalgenerator.go" />
374387
</exec>
375388
<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."/>
376-
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="false">
389+
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators64output.txt" failifexecutionfails="false">
377390
<env key="GOARCH" value="amd64"/>
378391
<env key="GOMAXPROCS" value="4"/>
379392
<arg value="build" />
@@ -384,7 +397,7 @@
384397
<arg value="externalgenerator.go" />
385398
</exec>
386399
<echo message="Building the 32-bit version of the Go generators with the system-wide Go compiler."/>
387-
<exec executable="go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
400+
<exec executable="go" spawn="false" dir="${user.dir}/generators/" output="gogenerators32output.txt" failifexecutionfails="true">
388401
<env key="GOARCH" value="386"/>
389402
<env key="GOMAXPROCS" value="4"/>
390403
<arg value="build" />
@@ -395,7 +408,7 @@
395408
<arg value="externalgenerator.go" />
396409
</exec>
397410
<echo message="Building the 32-bit version of the Go generators with the local \go32 compiler. Expect errors if no \go32 directory exists."/>
398-
<exec executable="${user.dir}\go32\bin\go.exe" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="false">
411+
<exec executable="${user.dir}\go32\bin\go" spawn="false" dir="${user.dir}/generators/" output="gogenerator32localoutput.txt" failifexecutionfails="false">
399412
<env key="Path" value="${user.dir}\go32\bin\;${env.Path}" />
400413
<env key="GOARCH" value="386"/>
401414
<env key="GOMAXPROCS" value="4"/>
@@ -1191,6 +1204,31 @@
11911204
</if>
11921205
</target>
11931206

1207+
<target name="oniTool" depends="">
1208+
<if>
1209+
<or>
1210+
<not>
1211+
<isset property="input" />
1212+
</not>
1213+
<equals arg1="${input}" arg2="" />
1214+
</or>
1215+
<then>
1216+
<echo>ERROR: The -Dinput= argument was not provided. Type ANT for more information.</echo>
1217+
</then>
1218+
<else>
1219+
<java classname="gov.epa.otaq.moves.master.commandline.ONIToolRunner" fork="yes" maxmemory="512m">
1220+
<classpath>
1221+
<pathelement path="${java.class.path}" />
1222+
</classpath>
1223+
<classpath refid="classpath" />
1224+
<arg value="-input=${input}" />
1225+
<arg value="-output=${output}" />
1226+
<arg value="-script=database\ONITool\ONITool.sql" />
1227+
</java>
1228+
</else>
1229+
</if>
1230+
</target>
1231+
11941232
<target name="setlogin" depends="">
11951233
<java classname="gov.epa.otaq.moves.master.commandline.SetLogin" fork="yes" maxmemory="512m">
11961234
<classpath>

database/ActivityCalculator.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ inner join hotellingActivityDistribution ha on (
885885
-- End Section hotellingHours
886886

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

890890
-- Section WithRegClassID
891891
-- @algorithm shi = sho[roadTypeID=1,sourceTypeID,hourDayID,monthID,yearID,ageID,linkID]*fuelFraction[sourceTypeID,modelYearID,fuelTypeID]*regClassFraction[fuelTypeID,modelYearID,sourceTypeID,regClassID]

database/CreateOutput.sql

-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,6 @@ INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
257257
VALUES (14, "hotellingElectric", "Hotelling Battery or AC");
258258
INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
259259
VALUES (15, "hotellingOff", "Hotelling All Engines Off");
260-
INSERT IGNORE INTO ActivityType (activityTypeID, activityType, activityTypeDesc)
261-
VALUES (16, "shi", "Source Hours Idle");
262-
263260

264261

265262
CREATE TABLE MOVESWorkersUsed (

0 commit comments

Comments
 (0)