Easy Python tools for EPA MOVES project-level analysis
Project description
movespy simplifies interaction with MOVES and traffic microsimulation for project-level analysis.
Dependencies
movespy depends on:
Installation
Download the installer and run it.
Also edit the movespy_settings.py file:
moves_dir: a string that is the path to you MOVES installation directory
moves_db: a string that is the name of your MOVES database (assumed to be local)
Usage
The following code executes a complete MOVES run and calculates the total CO emissions:
>>> links = {1: {'grade': -1.2, ... 'length': 0.25, ... 'road_type': 5, ... 'source_distr': {21: 1.0}, ... 'speed': 34, ... 'volume': 400}} >>> activity = {'age_distr': {21: {5: 1.0}}, ... 'county': 50027, ... 'day_type': 5, ... 'hour': 16, ... 'month': 6, ... 'year': 2015, ... 'links': links} >>> options = {'detail': 'average'} >>> import movespy.moves >>> moves = movespy.moves.Moves(activity, options) >>> emissions_out = moves.run() running MOVES ... >>> total_CO = sum([row['quantity'] for row in emissions_out if row['pollutant'] == 2]) >>> print total_CO 102.772
This code calculates VSP and operating mode for a vehicle trajectory dataset:
>>> veh = [1,1,1,1,2,2,2,3,3,3,3,3] >>> speed = [3.,6.,1.,3.,8.,5.,6.,3.,9.,1.,3.,9.] >>> grade = [1.,2.,-3.,1.,2.,1.,3.,1.,-2.,3.,-4.,-2.] >>> mass, mass_factor, alpha, beta, gamma = 2., 1.5, 0.16, 0.0020, 0.00049 >>> import movespy.trajectory >>> vsp, opmode = movespy.trajectory.getVSPOpMode(veh, speed, grade, mass, ... mass_factor, alpha, beta, gamma) >>> print vsp[:3] [ 0.1462389 5.79980985 -1.45965811] >>> print opmode[:3] [12 13 0]
For detailed instructions and examples see the user manual.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file movespy-0.1.7.zip
.
File metadata
- Download URL: movespy-0.1.7.zip
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae0b29e32d2118bef430b0179aaf23aa1395a50b6cf82520eeb5bf5068943ed |
|
MD5 | 1c16fe5d90755efcb49c92cabdabb7ec |
|
BLAKE2b-256 | 26a3b1c02e81cb19ddcdfb3e8d52b86a0f9840a4c737684d13a1dc4e7c192cf5 |
Provenance
File details
Details for the file movespy-0.1.7.win-amd64.exe
.
File metadata
- Download URL: movespy-0.1.7.win-amd64.exe
- Upload date:
- Size: 255.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c69f87418a34052733881f87a20790748ac512741ba1676fff5f7aadfd74c2dc |
|
MD5 | c9965e025e1c8c2e083a9e6af506e39a |
|
BLAKE2b-256 | 26a8e5c2b8f16d3d588f8bd83430c3f695c040083be6886e9e5296fc44350e1f |