diff --git a/CITATION.cff b/CITATION.cff index fc05c79..9f8b9ef 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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 diff --git a/MOVESConfiguration.txt b/MOVESConfiguration.txt index 2c36e62..befe029 100644 --- a/MOVESConfiguration.txt +++ b/MOVESConfiguration.txt @@ -1,5 +1,5 @@ defaultServerName = localhost -defaultDatabaseName = movesdb20220802 +defaultDatabaseName = movesdb20221007 executionServerName = localhost executionDatabaseName = MOVESExecution outputServerName = 127.0.0.1 diff --git a/database/Setup/SetupDatabase.bat b/database/Setup/SetupDatabase.bat index ca13505..8d6315f 100644 --- a/database/Setup/SetupDatabase.bat +++ b/database/Setup/SetupDatabase.bat @@ -1,2 +1,2 @@ mysql -uroot -pmoves --force < CreateMOVESUser.sql -mysql -uroot -pmoves < movesdb20220802.sql \ No newline at end of file +mysql -uroot -pmoves < movesdb20221007.sql \ No newline at end of file diff --git a/database/Setup/movesdb20220802.zip b/database/Setup/movesdb20221007.zip similarity index 72% rename from database/Setup/movesdb20220802.zip rename to database/Setup/movesdb20221007.zip index 995aa1a..a4190e1 100644 Binary files a/database/Setup/movesdb20220802.zip and b/database/Setup/movesdb20221007.zip differ diff --git a/docs/CommandLineMOVES.md b/docs/CommandLineMOVES.md index 87f86b9..ab8e64c 100644 --- a/docs/CommandLineMOVES.md +++ b/docs/CommandLineMOVES.md @@ -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. @@ -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% @@ -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% diff --git a/gov/epa/otaq/moves/master/gui/AboutAction.java b/gov/epa/otaq/moves/master/gui/AboutAction.java index fdf9b9c..a67130c 100644 --- a/gov/epa/otaq/moves/master/gui/AboutAction.java +++ b/gov/epa/otaq/moves/master/gui/AboutAction.java @@ -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'; diff --git a/gov/epa/otaq/moves/master/gui/MOVESWindow.java b/gov/epa/otaq/moves/master/gui/MOVESWindow.java index 7fc5a04..12790e1 100644 --- a/gov/epa/otaq/moves/master/gui/MOVESWindow.java +++ b/gov/epa/otaq/moves/master/gui/MOVESWindow.java @@ -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. **/ @@ -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"; @@ -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(); @@ -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); @@ -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())) { @@ -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; + } } /** diff --git a/gov/epa/otaq/moves/master/gui/OpenGitHubAction.java b/gov/epa/otaq/moves/master/gui/OpenGitHubAction.java new file mode 100644 index 0000000..4065369 --- /dev/null +++ b/gov/epa/otaq/moves/master/gui/OpenGitHubAction.java @@ -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); + } +} diff --git a/gov/epa/otaq/moves/master/gui/OpenNonroadCheatSheetAction.java b/gov/epa/otaq/moves/master/gui/OpenNonroadCheatSheetAction.java new file mode 100644 index 0000000..f931779 --- /dev/null +++ b/gov/epa/otaq/moves/master/gui/OpenNonroadCheatSheetAction.java @@ -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); + } +} diff --git a/gov/epa/otaq/moves/master/gui/OpenOnroadCheatSheetAction.java b/gov/epa/otaq/moves/master/gui/OpenOnroadCheatSheetAction.java new file mode 100644 index 0000000..bc1888a --- /dev/null +++ b/gov/epa/otaq/moves/master/gui/OpenOnroadCheatSheetAction.java @@ -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); + } +} diff --git a/gov/epa/otaq/moves/master/gui/UserGuideAction.java b/gov/epa/otaq/moves/master/gui/OpenWebsiteAction.java similarity index 79% rename from gov/epa/otaq/moves/master/gui/UserGuideAction.java rename to gov/epa/otaq/moves/master/gui/OpenWebsiteAction.java index 4566928..3e52ba5 100644 --- a/gov/epa/otaq/moves/master/gui/UserGuideAction.java +++ b/gov/epa/otaq/moves/master/gui/OpenWebsiteAction.java @@ -1,5 +1,5 @@ /************************************************************************************************** - * @(#)UserGuideAction.java + * @(#)OpenWebsiteAction.java * * * @@ -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. **/ @@ -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); } } diff --git a/maketodo.txt b/maketodo.txt index ef27eda..21f0ffd 100644 --- a/maketodo.txt +++ b/maketodo.txt @@ -1,5 +1,5 @@ defaultServerName = localhost -defaultDatabaseName = movesdb20220802 +defaultDatabaseName = movesdb20221007 executionServerName = localhost executionDatabaseName = * outputServerName = localhost diff --git a/readme.md b/readme.md index c479a4a..b5765a1 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,8 @@ -# MOVES3.0.4 +# MOVES3.1 EPA's MOtor Vehicle Emission Simulator (MOVES) is a state-of-the-science emission modeling system that estimates emissions for mobile sources at the national, county, and project level for criteria air pollutants, greenhouse gases, and air toxics, available under EPA's Open Source Software policy. -MOVES3.0 (available at https://github.com/USEPA/EPA_MOVES_Model and https://www.epa.gov/moves/latest-version-motor-vehicle-emission-simulator-moves) is the latest version of MOVES available for regulatory purposes. For more information, see [Policy Guidance on the Use of MOVES3 for State Implementation Plan Development, Transportation Conformity, General Conformity, and Other Purposes (EPA-420-B-20-044)](https://www.epa.gov/moves/latest-version-motor-vehicle-emission-simulator-moves#sip). +MOVES3.1 (available at https://github.com/USEPA/EPA_MOVES_Model and https://www.epa.gov/moves/latest-version-motor-vehicle-emission-simulator-moves) is the latest version of MOVES available for regulatory purposes. For more information, see [Policy Guidance on the Use of MOVES3 for State Implementation Plan Development, Transportation Conformity, General Conformity, and Other Purposes (EPA-420-B-20-044)](https://www.epa.gov/moves/latest-version-motor-vehicle-emission-simulator-moves#sip). For additional information on MOVES, visit EPA's [MOVES website](https://www.epa.gov/moves). A standard installer for MOVES is available [here](https://www.epa.gov/moves/latest-version-motor-vehicle-emission-simulator-moves#download). Or, to compile and MOVES from source, follow the instructions below. @@ -10,7 +10,7 @@ For additional information on MOVES, visit EPA's [MOVES website](https://www.epa This repository contains all of the source code and data required to compile and run MOVES. -MOVES uses MariaDB, Java, and Go. At minimum, you will need the following: +MOVES uses MariaDB, Java, and Go. To run MOVES from the source code (i.e., without running the installer), you will need the following: * [MariaDB](https://mariadb.org/download/?t=mariadb&p=mariadb&r=10.4.23) (version 10.4 or later) * [Java JDK](https://docs.microsoft.com/en-us/java/openjdk/download#openjdk-11) (version 11 or version 17)