Skip to content

Commit

Permalink
MOVES3.1 with movesdb20221007
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbizercox committed Dec 9, 2022
2 parents 20a3396 + 2f30391 commit c8e12b4
Show file tree
Hide file tree
Showing 13 changed files with 221 additions and 34 deletions.
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cff-version: 1.2.0
message: "To cite MOVES3, use the metadata from this file."
message: "To cite MOVES3.1, use the metadata from this file."
authors:
- name: "USEPA"
title: "Motor Vehicle Emission Simulator: MOVES3"
title: "Motor Vehicle Emission Simulator: MOVES3.1"
type: software
identifiers:
- type: other
value: "Office of Transportation and Air Quality. US Environmental Protection Agency. Ann Arbor, MI."
description: "Publisher"
url: "https://www.epa.gov/moves"
version: 3.0.4
date-released: 2022-08-05
version: 3.1
date-released: 2022-12-09
2 changes: 1 addition & 1 deletion MOVESConfiguration.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaultServerName = localhost
defaultDatabaseName = movesdb20220802
defaultDatabaseName = movesdb20221007
executionServerName = localhost
executionDatabaseName = MOVESExecution
outputServerName = 127.0.0.1
Expand Down
2 changes: 1 addition & 1 deletion database/Setup/SetupDatabase.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mysql -uroot -pmoves --force < CreateMOVESUser.sql
mysql -uroot -pmoves < movesdb20220802.sql
mysql -uroot -pmoves < movesdb20221007.sql
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/CommandLineMOVES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ While the easiest way to interact with MOVES is via its graphical user interface

## Set up the command environment

The first step to running MOVES from the command line is to set up the shell environment to point to all of the resources it needs to run MOVES. Open the Windows command prompt and navigate to the MOVES directory. By default, the path is `C:\Users\Public\EPA\MOVES\MOVES3.0`. The command to change directories is `cd`:
The first step to running MOVES from the command line is to set up the shell environment to point to all of the resources it needs to run MOVES. Open the Windows command prompt and navigate to the MOVES directory. By default, the path is `C:\Users\Public\EPA\MOVES\MOVES3.1`. The command to change directories is `cd`:

```cmd
C:\> cd C:\Users\Public\EPA\MOVES\MOVES3.0
C:\> cd C:\Users\Public\EPA\MOVES\MOVES3.1
```

Then, enter the name `setenv` to run the setenv.bat script, which will set up your environment for you:

```cmd
C:\Users\Public\EPA\MOVES\MOVES3.0> setenv
C:\Users\Public\EPA\MOVES\MOVES3.1> setenv
```

This will execute the setenv.bat script without displaying anything to the command window. The script tells the Windows command shell where to find the Java Runtime Environment (JRE) bundled with MOVES and where to find the Ant utility.
Expand Down Expand Up @@ -84,7 +84,7 @@ Below is a simple MOVES batch script for running multiple RunSpecs sequentially.
set RunSpecDir=%CD%
:: Set MOVES install location
set MOVESDir=C:\Users\Public\EPA\MOVES\MOVES3.0
set MOVESDir=C:\Users\Public\EPA\MOVES\MOVES3.1
:: Set up MOVES environment
cd /d %MOVESDir%
Expand Down Expand Up @@ -112,7 +112,7 @@ The script below is like the previous script, except that this script also launc
set RunSpecDir=%CD%
:: Set MOVES install location
set MOVESDir=C:\Users\Public\EPA\MOVES\MOVES3.0
set MOVESDir=C:\Users\Public\EPA\MOVES\MOVES3.1
:: Set up MOVES environment
cd /d %MOVESDir%
Expand Down
2 changes: 1 addition & 1 deletion gov/epa/otaq/moves/master/gui/AboutAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AboutAction extends JLFAbstractAction {
/** Constant short description text. **/
static final String SHORT_DESCRIPTION_ABOUT = "About MOVES";
/** Constant long description text. **/
static final String LONG_DESCRIPTION_ABOUT = "MOVES3";
static final String LONG_DESCRIPTION_ABOUT = "MOVES3.1";
/** Constant mnemonic key. **/
static final int MNEMONIC_KEY_ABOUT = 'A';

Expand Down
85 changes: 74 additions & 11 deletions gov/epa/otaq/moves/master/gui/MOVESWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,14 @@ public class MOVESWindow extends JFrame implements ActionListener, LogHandler,
ProfileWeightScriptActionNR profileWeightScriptActionNR;
/** Run MySQL Script Action **/
SummaryReportAction summaryReportAction;
/** User Guide menu action. **/
UserGuideAction userGuideAction;
/** Open Website menu action. **/
OpenWebsiteAction openWebsiteAction;
/** Open GitHub menu action. **/
OpenGitHubAction openGitHubAction;
/** Open Onroad CheatSheet menu action. **/
OpenOnroadCheatSheetAction openOnroadCheatSheetAction;
/** Open Nonroad CheatSheet menu action. **/
OpenNonroadCheatSheetAction openNonroadCheatSheetAction;
/** About menu action. **/
AboutAction aboutAction;
/** Configure menu action. **/
Expand Down Expand Up @@ -221,7 +227,7 @@ public class MOVESWindow extends JFrame implements ActionListener, LogHandler,
/** Name of output file that performance profiles are written to **/
static final String PERFORMANCE_PROFILER_FILE_NAME = "guiprofile.txt";
/** Date of the Current Release **/
public static final String MOVES_VERSION = "MOVES3.0.4";
public static final String MOVES_VERSION = "MOVES3.1.0";
/** directory where output db processing scripts are located **/
static final String DB_SCRIPTS_DIR = "database" + File.separator + "OutputProcessingScripts";
static final String DB_NONROAD_SCRIPTS_DIR = "database" + File.separator + "NonroadProcessingScripts";
Expand Down Expand Up @@ -528,8 +534,14 @@ void initActions() {
profileWeightScriptActionNR.addActionListener(this);
summaryReportAction = new SummaryReportAction();
summaryReportAction.addActionListener(this);
userGuideAction = new UserGuideAction();
userGuideAction.addActionListener(this);
openWebsiteAction = new OpenWebsiteAction();
openWebsiteAction.addActionListener(this);
openGitHubAction = new OpenGitHubAction();
openGitHubAction.addActionListener(this);
openOnroadCheatSheetAction = new OpenOnroadCheatSheetAction();
openOnroadCheatSheetAction.addActionListener(this);
openNonroadCheatSheetAction = new OpenNonroadCheatSheetAction();
openNonroadCheatSheetAction.addActionListener(this);
aboutAction = new AboutAction();
aboutAction.addActionListener(this);
configureAction = new ConfigureAction();
Expand Down Expand Up @@ -688,7 +700,13 @@ public void menuCanceled(MenuEvent e) {}
menuItem.setName("configureMenuItem");
JMenu helpMenu = new JMenu("Help");
helpMenu.setMnemonic('H');
menuItem = helpMenu.add(userGuideAction);
menuItem = helpMenu.add(openWebsiteAction);
menuItem.addMouseListener(mouseHandler);
menuItem = helpMenu.add(openGitHubAction);
menuItem.addMouseListener(mouseHandler);
menuItem = helpMenu.add(openOnroadCheatSheetAction);
menuItem.addMouseListener(mouseHandler);
menuItem = helpMenu.add(openNonroadCheatSheetAction);
menuItem.addMouseListener(mouseHandler);
helpMenu.addSeparator();
menuItem = helpMenu.add(aboutAction);
Expand Down Expand Up @@ -792,8 +810,14 @@ public void actionPerformed(ActionEvent evt) {
handleProfileWeightScriptActionNR();
} else if (command.equals(summaryReportAction.getActionCommand())) {
handleSummaryReportAction();
} else if (command.equals(userGuideAction.getActionCommand())) {
handleUserGuideAction();
} else if (command.equals(openWebsiteAction.getActionCommand())) {
handleOpenWebsiteAction();
} else if (command.equals(openGitHubAction.getActionCommand())) {
handleOpenGitHubAction();
} else if (command.equals(openOnroadCheatSheetAction.getActionCommand())) {
handleOpenOnroadCheatSheetAction();
} else if (command.equals(openNonroadCheatSheetAction.getActionCommand())) {
handleOpenNonroadCheatSheetAction();
} else if (command.equals(aboutAction.getActionCommand())) {
handleAboutAction(false);
} else if (command.equals(configureAction.getActionCommand())) {
Expand Down Expand Up @@ -1520,9 +1544,48 @@ void handleConfigureAction() {
c.showModal();
}

/** Handles the User Guide menu action. **/
void handleUserGuideAction() {
showURL("http://www.epa.gov/otaq/models/moves/");
/** Handles the open website menu action. **/
void handleOpenWebsiteAction() {
showURL("https://www.epa.gov/moves");
}

/** Handles the Open GitHub menu action. **/
void handleOpenGitHubAction() {
showURL("https://github.com/USEPA/EPA_MOVES_Model");
}

/** Handles the Open Onroad CheatSheet menu action. **/
void handleOpenOnroadCheatSheetAction() {
try {
File file = new File("docs/MOVES3CheatsheetOnroad.pdf");
if(!file.exists()) {
Logger.log(LogMessageCategory.ERROR, "Could not find the onroad cheatsheet file at: " + file.getAbsolutePath());
return;
}
if(!OpenFile.open(file)) {
return;
}
} catch(Exception e) {
Logger.log(LogMessageCategory.ERROR, "Could not open the onroad cheatsheet file: " + e);
return;
}
}

/** Handles the Open Website menu action. **/
void handleOpenNonroadCheatSheetAction() {
try {
File file = new File("docs/MOVES3CheatsheetNonroad.pdf");
if(!file.exists()) {
Logger.log(LogMessageCategory.ERROR, "Could not find the nonroad cheatsheet file at: " + file.getAbsolutePath());
return;
}
if(!OpenFile.open(file)) {
return;
}
} catch(Exception e) {
Logger.log(LogMessageCategory.ERROR, "Could not open the nonroad cheatsheet file: " + e);
return;
}
}

/**
Expand Down
41 changes: 41 additions & 0 deletions gov/epa/otaq/moves/master/gui/OpenGitHubAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**************************************************************************************************
* @(#)ConverterAction.java
*
*
*
*************************************************************************************************/
package gov.epa.otaq.moves.master.gui;

import javax.swing.Action;

/**
* Class for Open GitHub menu option.
**/
public class OpenGitHubAction extends JLFAbstractAction {
/** Constant command key text. **/
static final String ACTION_COMMAND_KEY =
"openGitHub";
/** Constant action name. **/
static final String NAME =
"Open MOVES GitHub";
/** Constant short description text. **/
static final String SHORT_DESCRIPTION =
"Open MOVES GitHub";
/** Constant long description text. **/
static final String LONG_DESCRIPTION =
"Open MOVES GitHub";
/** Constant mnemonic key. **/
static final int MNEMONIC_KEY = 'G';

/**
* Implements the menu option UI, including command keys,
* name, descriptions, and icons.
**/
public OpenGitHubAction() {
putValue(Action.NAME, NAME);
putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION);
putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION);
putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY));
putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY);
}
}
41 changes: 41 additions & 0 deletions gov/epa/otaq/moves/master/gui/OpenNonroadCheatSheetAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**************************************************************************************************
* @(#)ConverterAction.java
*
*
*
*************************************************************************************************/
package gov.epa.otaq.moves.master.gui;

import javax.swing.Action;

/**
* Class for Open Nonroad Cheatsheet menu option.
**/
public class OpenNonroadCheatSheetAction extends JLFAbstractAction {
/** Constant command key text. **/
static final String ACTION_COMMAND_KEY =
"openNonroadCheatsheet";
/** Constant action name. **/
static final String NAME =
"Open Nonroad Cheat Sheet";
/** Constant short description text. **/
static final String SHORT_DESCRIPTION =
"Open Nonroad Cheat Sheet";
/** Constant long description text. **/
static final String LONG_DESCRIPTION =
"Open Nonroad Cheat Sheet";
/** Constant mnemonic key. **/
static final int MNEMONIC_KEY = 'N';

/**
* Implements the menu option UI, including command keys,
* name, descriptions, and icons.
**/
public OpenNonroadCheatSheetAction() {
putValue(Action.NAME, NAME);
putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION);
putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION);
putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY));
putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY);
}
}
41 changes: 41 additions & 0 deletions gov/epa/otaq/moves/master/gui/OpenOnroadCheatSheetAction.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**************************************************************************************************
* @(#)ConverterAction.java
*
*
*
*************************************************************************************************/
package gov.epa.otaq.moves.master.gui;

import javax.swing.Action;

/**
* Class for Open Onroad Cheatsheet menu option.
**/
public class OpenOnroadCheatSheetAction extends JLFAbstractAction {
/** Constant command key text. **/
static final String ACTION_COMMAND_KEY =
"openOnroadCheatsheet";
/** Constant action name. **/
static final String NAME =
"Open Onroad Cheat Sheet";
/** Constant short description text. **/
static final String SHORT_DESCRIPTION =
"Open Onroad Cheat Sheet";
/** Constant long description text. **/
static final String LONG_DESCRIPTION =
"Open Onroad Cheat Sheet";
/** Constant mnemonic key. **/
static final int MNEMONIC_KEY = 'O';

/**
* Implements the menu option UI, including command keys,
* name, descriptions, and icons.
**/
public OpenOnroadCheatSheetAction() {
putValue(Action.NAME, NAME);
putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION);
putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION);
putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY));
putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**************************************************************************************************
* @(#)UserGuideAction.java
* @(#)OpenWebsiteAction.java
*
*
*
Expand All @@ -9,14 +9,14 @@
import javax.swing.Action;

/**
* Class for MOVES UserGuide menu option.
* Class for MOVES Open Website menu option.
*
* @author Wesley Faler
* @version 2014-07-27
**/
public class UserGuideAction extends JLFAbstractAction {
public class OpenWebsiteAction extends JLFAbstractAction {
/** Constant command key text. **/
static final String ACTION_COMMAND_KEY_USER_GUIDE = "user-guide-command";
static final String ACTION_COMMAND_KEY_USER_GUIDE = "open-website-command";
/** Constant action name. **/
static final String NAME_USER_GUIDE = "MOVES Website and Documents";
/** Constant small icon file and path. **/
Expand All @@ -30,19 +30,20 @@ public class UserGuideAction extends JLFAbstractAction {
/** Constant long description text. **/
static final String LONG_DESCRIPTION_USER_GUIDE =
"View MOVES web page for help.";
// static final int MNEMONIC_KEY_USER_GUIDE = '1';
/** Constant mnemonic key. **/
static final int MNEMONIC_KEY = 'W';

/**
* Implements the UserGuide menu option UI, including command keys, name,
* descriptions, and icons.
**/
public UserGuideAction() {
public OpenWebsiteAction() {
putValue(Action.NAME, NAME_USER_GUIDE);
putValue(Action.SMALL_ICON, getIcon(SMALL_ICON_USER_GUIDE));
putValue(LARGE_ICON, getIcon(LARGE_ICON_USER_GUIDE));
putValue(Action.SHORT_DESCRIPTION, SHORT_DESCRIPTION_USER_GUIDE);
putValue(Action.LONG_DESCRIPTION, LONG_DESCRIPTION_USER_GUIDE);
// putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY_USER_GUIDE));
putValue(Action.MNEMONIC_KEY, Integer.valueOf(MNEMONIC_KEY));
putValue(Action.ACTION_COMMAND_KEY, ACTION_COMMAND_KEY_USER_GUIDE);
}
}
2 changes: 1 addition & 1 deletion maketodo.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaultServerName = localhost
defaultDatabaseName = movesdb20220802
defaultDatabaseName = movesdb20221007
executionServerName = localhost
executionDatabaseName = *
outputServerName = localhost
Expand Down
Loading

0 comments on commit c8e12b4

Please sign in to comment.