diff --git a/README.md b/README.md index 9afd5d0e0..4082d1543 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,119 @@ Any other branches are exploratory and not used in our planning work. Please find a detailed User's Guide [here](https://github.com/BayAreaMetro/modeling-website/wiki/UsersGuide). +# Running advanced air mobility (AAM) models on a new machine +I. Installations + +1. Make sure anaconda2 or 3 scripts folder is in path + +set path=%PATH%;C:\ProgramData\Anaconda3\Scripts + +2. create new conda environment in python 2.7 for dependencies: + +conda create --prefix=C:\ProgramData\Anaconda3\envs\py27tm1 python=2.7 + +if encountering errors, try copying +1)libcrypto-1_1-x64.dll +2)libssl-1_1-x64.dll +from ...\Anaconda3\Library\bin to ...\Anaconda3\DLLs + +3. Activate the environment. + +activate py27tm1 + +4. Install packages + +Follow MTC recommendation to download .whl file and install +https://github.com/BayAreaMetro/modeling-website/wiki/ComputingEnvironment +https://www.lfd.uci.edu/~gohlke/pythonlibs/ + +pip install E:\Projects\Clients\gm\models\python_packages\Shapely-1.6.4.post2-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\numpy-1.16.6+mkl-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\pandas-0.24.2-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\SimpleParse-2.2.0-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\xlrd-2.0.1-py2.py3-none-any.whl +pip install E:\Projects\Clients\gm\models\python_packages\xlwt-1.3.0-py2.py3-none-any.whl +pip install E:\Projects\Clients\gm\models\python_packages\xlutils-2.0.0-py2.py3-none-any.whl +pip install E:\Projects\Clients\gm\models\python_packages\pywin32-228-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\rpy2-2.7.8-cp27-none-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\Rtree-0.9.3-cp27-cp27m-win_amd64.whl +pip install E:\Projects\Clients\gm\models\python_packages\XlsxWriter-1.2.7-py2.py3-none-any.whl + +conda install geopandas +pip install dbfpy + +if getting this error ImportError: Missing required dependencies ['pytz'], try +pip install python-dateutil pytz --force-reinstall --upgrade + +5. make sure that the VoyagerAPI is installed + +https://communities.bentley.com/products/mobility-simulation-analytics/m/cube-files/275055 +path is set in \ctramp\runtime\SetPath.bat + +6. make sure that network-wrangler is in your path. First clone network-wrangler to your repository using tortoise git: + +https://github.com/BayAreaMetro/NetworkWrangler.git + +then make sure it is added to the PYTHONPATH in SetPath.bat + +7. make sure utils directory is on machine and point to gawk executable in SetPath.bat + +8. make sure COMPATH, R_LIB, PYTHON_PATH, RUNTIME, PATH, and M_DIR in SetPath.bat are updated + +SET COMMPATH=%MODEL_DIR% +set PYTHON_PATH=C:\ProgramData\Anaconda3 +set RUNTIME=%CD%\CTRAMP\runtime +set PATH=%RUNTIME%;%JAVA_PATH%\bin;%TPP_PATH%;%GAWK_PATH%\bin;%PYTHON_PATH%\envs\py27tm1;%PYTHON_PATH%\condabin;%PYTHON_PATH%\envs +set M_DIR=E:\Projects\Clients\gm\models\2035_TM152_FBP_Plus_24 + +9. import NetworkWrangler + +https://github.com/BayAreaMetro/modeling-website/wiki/Network-Building-with-NetworkWrangler#build-a-future + +II. Steps for Results Summary (not necessary for model run) + +1. Install R packages scales, dplyr, shapes, tidyr + +2. If running RunResults.py (currently commented), update travel-model-one-master path to E:\\Projects\\Clients\\gm\\models\\travel-model-one\\ + +3. pip install these packages +pip install simpledbf +pip install xlwings +pip install openpyxl +If getting ImportError: No module named win32api, try pip install --upgrade pywin32==224 + +III. Set up and run base model without AAM + +1. Create a new folder named 2035_TM152_FBP_Plus_24 +2. Run the following command (conda env is activated in RunModel.bat, so it's not necessary to activate env prior to the model run) + +cd /d E:\Projects\Clients\gm\models\2035_TM152_FBP_Plus_24 +SetUpModel_2035_TM152_FBP_Plus_24.bat +RunModel.bat + +IV. Set up AAM model run +1. update path and run Num_tours_sorted.ipynb +2. update path and run k-means.ipynb +3. update path and run generate_transitLines.ipynb +4. Open freeflow.net in Cube -> Play Edit Log -> AAM_nodes.log in INPUT\2035_TM152_FBP_Plus_24_aam_50v\hwy, Save +5. create a new folder 2035_TM152_FBP_Plus_24_aam_50v_500cpm (50 vertiports, AAM fare 500 cents per mile) in E:\Projects\Clients\gm\models +6. Copy SetUpModel_2035_TM152_FBP_Plus_24_aam_50v.bat from a previous run to this folder and update AAM_INPUT path + +V. Run AAM model +1. Run the following command +cd /d E:\Projects\Clients\gm\models\2035_TM152_FBP_Plus_24_aam_50v_500cpm +SetUpModel_2035_TM152_FBP_Plus_24_aam_50v.bat (copies all files and add AAM input files) +RunModel.bat + +VI. Set up and run fare sensitivity scenario on the same AAM network (only runs the final iteration) +1. Copy AAM full run, remove output folder, metrics folder, extractor folder, iter0 and iter1 folder in hwy and trn folder, and nonres\airport_by_mode_TOD.csv +2. Change the folder name based on naming convention 2035_TM152_FBP_Plus_24_aam_50v_800cpm +3. Copy RunCoreSummariesShortRun.bat, RunLogsumsShortRun.bat, RunMetricsShortRun.bat, RunScenarioMetricsShortRun.bat and CTRAMP\RunIterationShortRun.bat +4. Update Project.Directory and AAM.cost.per.mile in accessibilities.properties, logsums.properties, and mtcTourBased.properties in CTRAMP\runtime + -AAM.cost.per.mile is in year 2000 cents (496), while fare in folder name (800) is in year 2019 cents +5. Update AAM.costPerMile in CTRAMP\scripts\block\AirportModeChoice.block (4.96, unit: year 2000 dollars per mile) +6. Copy and run RunAAMModel.bat + +VII. Results Summary +1. Save dist_list_50v.csv and taz-superdistrict-county.csv in analysis\Inputs +2. Run Summarize_trips_TM1.5_AAM_50v_500cpm.ipynb diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/HouseholdDataWriter.java b/core/models/ctramp/src/java/com/pb/models/ctramp/HouseholdDataWriter.java index e7b292362..ebe72e1c4 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/HouseholdDataWriter.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/HouseholdDataWriter.java @@ -53,7 +53,8 @@ public class HouseholdDataWriter { private final String databaseStringFormat = "'%s'"; private String stringFormat = fileStringFormat; - private boolean saveUtilsProbsFlag = false; + private boolean saveTourUtilsProbsFlag = false; + private boolean saveTripUtilsProbsFlag = false; private ResourceBundle resourceBundle; private ModelStructure modelStructure; @@ -77,12 +78,18 @@ public HouseholdDataWriter( ResourceBundle resourceBundle, ModelStructure modelS this.iteration = iteration; // default is to not save the tour mode choice utils and probs for each tour - String saveUtilsProbsString = resourceBundle.getString( CtrampApplication.PROPERTIES_SAVE_TOUR_MODE_CHOICE_UTILS ); - if ( saveUtilsProbsString != null ) { - if ( saveUtilsProbsString.equalsIgnoreCase( "true" ) ) - saveUtilsProbsFlag = true; + String saveTourUtilsProbsString = resourceBundle.getString( CtrampApplication.PROPERTIES_SAVE_TOUR_MODE_CHOICE_UTILS ); + if ( saveTourUtilsProbsString != null ) { + if ( saveTourUtilsProbsString.equalsIgnoreCase( "true" ) ) + saveTourUtilsProbsFlag = true; } + // default is to not save the trip mode choice utils and probs for each trip + String saveTripUtilsProbsString = resourceBundle.getString( CtrampApplication.PROPERTIES_SAVE_TRIP_MODE_CHOICE_UTILS ); + if ( saveTripUtilsProbsString != null ) { + if ( saveTripUtilsProbsString.equalsIgnoreCase( "true" ) ) + saveTripUtilsProbsFlag = true; + } } //NOTE - this method should not be called simultaneously with the file one one as the string format is changed @@ -474,7 +481,7 @@ private List formIndivTourColumnNames() { data.add("origSharedTNCWait"); data.add("destSharedTNCWait"); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); for ( int i=1; i <= numModeAlts; i++ ) { String colName = String.format( "util_%d", i ); @@ -517,7 +524,7 @@ private List formJointTourColumnNames() { data.add("origSharedTNCWait"); data.add("destSharedTNCWait"); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); for ( int i=1; i <= numModeAlts; i++ ) { String colName = String.format( "util_%d", i ); @@ -563,7 +570,7 @@ private List formIndivTourColumnTypes() { data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); for ( int i=1; i <= numModeAlts; i++ ) { data.add( SqliteDataTypes.REAL ); @@ -604,7 +611,7 @@ private List formJointTourColumnTypes() { data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); for ( int i=1; i <= numModeAlts; i++ ) { data.add( SqliteDataTypes.REAL ); @@ -649,7 +656,7 @@ private List formIndivTourDataEntry(Tour t) { data.add(string(t.getOrigTNCSharedWait())); data.add(string(t.getDestTNCSharedWait())); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); float[] utils = t.getTourModalUtilities(); for ( int i=0; i < utils.length; i++ ) @@ -695,7 +702,7 @@ private List formJointTourDataEntry(Tour t) { data.add(string(t.getOrigTNCSharedWait())); data.add(string(t.getDestTNCSharedWait())); - if ( saveUtilsProbsFlag ) { + if ( saveTourUtilsProbsFlag ) { int numModeAlts = modelStructure.getMaxTourModeIndex(); float[] utils = t.getTourModalUtilities(); for ( int i=0; i < utils.length; i++ ) @@ -791,6 +798,20 @@ private List formIndivTripColumnNames() { data.add("taxiWait"); data.add("singleTNCWait"); data.add("sharedTNCWait"); + + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + for ( int i=1; i <= numModeAlts; i++ ) { + String colName = String.format( "util_%d", i ); + data.add( colName ); + } + + for ( int i=1; i <= numModeAlts; i++ ) { + String colName = String.format( "prob_%d", i ); + data.add( colName ); + } + } + return data; } @@ -818,6 +839,18 @@ private List formJointTripColumnNames() { data.add("taxiWait"); data.add("singleTNCWait"); data.add("sharedTNCWait"); + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + for ( int i=1; i <= numModeAlts; i++ ) { + String colName = String.format( "util_%d", i ); + data.add( colName ); + } + + for ( int i=1; i <= numModeAlts; i++ ) { + String colName = String.format( "prob_%d", i ); + data.add( colName ); + } + } return data; } @@ -905,6 +938,18 @@ private List formIndivTripColumnTypes() { data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); + + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + for ( int i=1; i <= numModeAlts; i++ ) { + data.add( SqliteDataTypes.REAL ); + } + + for ( int i=1; i <= numModeAlts; i++ ) { + data.add( SqliteDataTypes.REAL ); + } + } + return data; } @@ -932,6 +977,18 @@ private List formJointTripColumnTypes() { data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); data.add(SqliteDataTypes.REAL); + + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + for ( int i=1; i <= numModeAlts; i++ ) { + data.add( SqliteDataTypes.REAL ); + } + + for ( int i=1; i <= numModeAlts; i++ ) { + data.add( SqliteDataTypes.REAL ); + } + } + return data; } @@ -1006,6 +1063,22 @@ else if ( ! s.isInboundStop() && s.getStopId() == t.getNumOutboundStops() ) { data.add(string(s.getOrigSingleTNCWait())); data.add(string(s.getOrigSharedTNCWait())); + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + float[] utils = s.getTripModalUtilities(); + for ( int i=0; i < utils.length; i++ ) + data.add(string(utils[i])); + for ( int i=utils.length; i < numModeAlts; i++ ) + data.add( "-999" ); + + float[] probs = s.getTripModalProbabilities(); + for ( int i=0; i < probs.length; i++ ) + data.add(string(probs[i])); + for ( int i=probs.length; i < numModeAlts; i++ ) + data.add( "0.0" ); + } + + return data; } @@ -1091,7 +1164,21 @@ else if ( ! s.isInboundStop() && s.getStopId() == t.getNumOutboundStops() ) { data.add(string(s.getOrigSingleTNCWait())); data.add(string(s.getOrigSharedTNCWait())); - + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + float[] utils = s.getTripModalUtilities(); + for ( int i=0; i < utils.length; i++ ) + data.add(string(utils[i])); + for ( int i=utils.length; i < numModeAlts; i++ ) + data.add( "-999" ); + + float[] probs = s.getTripModalProbabilities(); + for ( int i=0; i < probs.length; i++ ) + data.add(string(probs[i])); + for ( int i=probs.length; i < numModeAlts; i++ ) + data.add( "0.0" ); + } + return data; } @@ -1144,7 +1231,21 @@ private List formTourAsIndivTripDataEntry(Tour t, boolean inbound) { data.add(string((inbound ? t.getDestTNCSingleWait() : t.getOrigTNCSingleWait()))); data.add(string((inbound ? t.getDestTNCSharedWait() : t.getOrigTNCSharedWait()))); - + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + float[] utils = t.getTourModalUtilities(); + for ( int i=0; i < utils.length; i++ ) + data.add(string(utils[i])); + for ( int i=utils.length; i < numModeAlts; i++ ) + data.add( "-999" ); + + float[] probs = t.getTourModalProbabilities(); + for ( int i=0; i < probs.length; i++ ) + data.add(string(probs[i])); + for ( int i=probs.length; i < numModeAlts; i++ ) + data.add( "0.0" ); + } + return data; } @@ -1206,6 +1307,21 @@ private List formTourAsJointTripDataEntry(Tour t, boolean inbound) { data.add(string((inbound ? t.getDestTNCSingleWait() : t.getOrigTNCSingleWait()))); data.add(string((inbound ? t.getDestTNCSharedWait() : t.getOrigTNCSharedWait()))); + if ( saveTripUtilsProbsFlag ) { + int numModeAlts = modelStructure.getMaxTourModeIndex(); + float[] utils = t.getTourModalUtilities(); + for ( int i=0; i < utils.length; i++ ) + data.add(string(utils[i])); + for ( int i=utils.length; i < numModeAlts; i++ ) + data.add( "-999" ); + + float[] probs = t.getTourModalProbabilities(); + for ( int i=0; i < probs.length; i++ ) + data.add(string(probs[i])); + for ( int i=probs.length; i < numModeAlts; i++ ) + data.add( "0.0" ); + } + return data; } diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/Stop.java b/core/models/ctramp/src/java/com/pb/models/ctramp/Stop.java index 86cf1a9da..65c26bcdd 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/Stop.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/Stop.java @@ -22,6 +22,8 @@ public class Stop implements Serializable { float origTaxiWait; float origSingleTNCWait; float origSharedTNCWait; + private float[] tripModalProbabilities; + private float[] tripModalUtilities; Tour parentTour; @@ -192,5 +194,22 @@ public void setOrigSharedTNCWait(float origSharedTNCWait) { this.origSharedTNCWait = origSharedTNCWait; } + public void setTripModalUtilities( float[] utils ) { + tripModalUtilities = utils; + } + + public float[] getTripModalUtilities() { + return tripModalUtilities; + } + + public void setTripModalProbabilities( float[] probs ) { + tripModalProbabilities = probs; + } + + public float[] getTripModalProbabilities() { + return tripModalProbabilities; + } + + } diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/TripModeChoiceDMU.java b/core/models/ctramp/src/java/com/pb/models/ctramp/TripModeChoiceDMU.java index 4c7fe9c23..e53de7830 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/TripModeChoiceDMU.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/TripModeChoiceDMU.java @@ -33,6 +33,8 @@ public class TripModeChoiceDMU implements Serializable, VariableTable { protected float waitTimeSingleTNC; protected float waitTimeSharedTNC; + protected int origCounty; + private ModelStructure modelStructure; @@ -325,6 +327,14 @@ public int getUseOwnedAV(){ return (tour.getUseOwnedAV() ? 1: 0); } + public float getOrigCounty() { + return origCounty; + } + + public void setOrigCounty(int origCounty) { + this.origCounty = origCounty; + } + diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/CtrampApplication.java b/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/CtrampApplication.java index 553a06590..3dceb12ac 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/CtrampApplication.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/CtrampApplication.java @@ -240,7 +240,8 @@ public class CtrampApplication implements Serializable { public static final String PROPERTIES_WRITE_DATA_TO_DATABASE = "Results.WriteDataToDatabase"; public static final String PROPERTIES_SAVE_TOUR_MODE_CHOICE_UTILS = "TourModeChoice.Save.UtilsAndProbs"; - + public static final String PROPERTIES_SAVE_TRIP_MODE_CHOICE_UTILS = "TripModeChoice.Save.UtilsAndProbs"; + public static final String PROPERTIES_WORK_SCHOOL_LOCATION_CHOICE_SHADOW_PRICE_INPUT_FILE = "UsualWorkAndSchoolLocationChoice.ShadowPrice.Input.File"; public static final String PROPERTIES_NUMBER_OF_GLOBAL_ITERATIONS = "Global.iterations"; diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/StopLocationModeChoiceModel.java b/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/StopLocationModeChoiceModel.java index ac3c240a1..7dadb3063 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/StopLocationModeChoiceModel.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/jppf/StopLocationModeChoiceModel.java @@ -109,7 +109,8 @@ public class StopLocationModeChoiceModel implements Serializable { private long[][] hhTimes = new long[7][2]; private TNCAndTaxiWaitTimeCalculator tncTaxiWaitTimeCalculator; - + private boolean saveUtilsProbsFlag=false; + /** * Constructor that will be used to set up the ChoiceModelApplications for each * type of tour @@ -213,6 +214,14 @@ private void setupTripModeChoiceModels( HashMap propertyMap, Ctr tncTaxiWaitTimeCalculator = new TNCAndTaxiWaitTimeCalculator(); tncTaxiWaitTimeCalculator.createWaitTimeDistributions(propertyMap); + + // default is to not save the tour mode choice utils and probs for each tour + String saveUtilsProbsString = propertyMap.get( CtrampApplication.PROPERTIES_SAVE_TRIP_MODE_CHOICE_UTILS ); + if ( saveUtilsProbsString != null ) { + if ( saveUtilsProbsString.equalsIgnoreCase( "true" ) ) + saveUtilsProbsFlag = true; + } + } @@ -442,7 +451,7 @@ private void applyTripChoiceModels ( Household household, Person person, Tour to tripModeChoiceDmuObj.setWaitTimeSingleTNC(waitTimeSingleTNC); tripModeChoiceDmuObj.setWaitTimeSharedTNC(waitTimeSharedTNC); tripModeChoiceDmuObj.setWaitTimeTaxi(waitTimeTaxi); - + stop.setOrigTaxiWait(waitTimeTaxi); stop.setOrigSingleTNCWait(waitTimeSingleTNC); stop.setOrigSharedTNCWait(waitTimeSharedTNC); @@ -483,7 +492,8 @@ private void applyTripChoiceModels ( Household household, Person person, Tour to stop.setDest(zone); stop.setDestWalkSegment(subzone); tripModeChoiceDmuObj.setDmuIndexValues( household.getHhId(), origin, zone ); - + tripModeChoiceDmuObj.setOrigCounty(tazDataManager.getZoneCounty(origin)); + long check = System.nanoTime(); //select trip depart hour int choosenHour = -1; @@ -585,7 +595,8 @@ private void applyTripChoiceModels ( Household household, Person person, Tour to stopLocDmuObj.setStopNumber( 1 ); stopLocDmuObj.setDmuIndexValues( household.getHhId(), household.getHhTaz(), origin, dest ); - + tripModeChoiceDmuObj.setOrigCounty(tazDataManager.getZoneCounty(origin)); + int zone = dest; int subzone = destWalkSegment; if ( stopLocDmuObj.getInboundStop() == 1 ) { @@ -1041,7 +1052,24 @@ private int selectMode ( Household household, Tour tour, Stop stop ) { } - + if ( saveUtilsProbsFlag ) { + + // get the utilities and probabilities arrays for the tour mode choice model for this tour and save them to the tour object + double[] utilities = choiceModel.getUtilities(); + double[] probabilities = choiceModel.getProbabilities(); + + float[] utils = new float[utilities.length]; + float[] probs = new float[probabilities.length]; + for ( int k=0; k < utilities.length; k++ ) { + utils[k] = (float)utilities[k]; + probs[k] = (float)probabilities[k]; + } + + stop.setTripModalUtilities(utils); + stop.setTripModalProbabilities(probs); + + } + if ( chosen > 0 ) return chosen; @@ -1059,6 +1087,8 @@ private double calculateTripModeChoiceLogsum( Household household, Person person //determine the trip mode choice logsum for the sampled dest alt and store in stop location dmu tripModeChoiceDmuObj.setDmuIndexValues( household.getHhId(), stop.getOrig(), stop.getDest() ); + tripModeChoiceDmuObj.setOrigCounty(tazDataManager.getZoneCounty(stop.getOrig())); + tripModeChoiceDmuObj.setIntStopParkRate( parkRate[stop.getDest()-1] ); int mcModelIndex = modelStructure.getTripModeChoiceModelIndex( tour.getTourPrimaryPurpose().toLowerCase() ); diff --git a/core/models/ctramp/src/java/com/pb/models/ctramp/old/StopLocationModel.java b/core/models/ctramp/src/java/com/pb/models/ctramp/old/StopLocationModel.java index 0198bab76..43058d470 100644 --- a/core/models/ctramp/src/java/com/pb/models/ctramp/old/StopLocationModel.java +++ b/core/models/ctramp/src/java/com/pb/models/ctramp/old/StopLocationModel.java @@ -254,7 +254,8 @@ public void applyModel(HouseholdDataManagerIf householdDataManager){ tripModeChoiceDmuObj.setDestType( INT_STOP_TYPE_INDEX ); tripModeChoiceDmuObj.setIntStopParkRate( parkRate[zone] ); tripModeChoiceDmuObj.setDmuIndexValues( household.getHhId(), origin, zone ); - + tripModeChoiceDmuObj.setOrigCounty(tazDataManager.getZoneCounty(origin)); + choice = selectMode(household, tour, stop); stop.setMode( choice ); int purposeIndex = tripModeChoicePurposeIndexLookup.get( stop.getDestPurpose( modelStructure ) ); diff --git a/core/projects/mtc/release/mtc.jar b/core/projects/mtc/release/mtc.jar index 50d5fb5fa..4dc720ef5 100644 Binary files a/core/projects/mtc/release/mtc.jar and b/core/projects/mtc/release/mtc.jar differ diff --git a/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcModelStructure.java b/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcModelStructure.java index d6e134814..8592bcf00 100644 --- a/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcModelStructure.java +++ b/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcModelStructure.java @@ -138,13 +138,13 @@ public class MtcModelStructure extends ModelStructure { public static final int[] WALK_ALTS = { 7 }; public static final int[] BIKE_ALTS = { 8 }; public static final int[] NON_MOTORIZED_ALTS = { 7, 8 }; - public static final int[] TRANSIT_ALTS = { 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 }; + public static final int[] TRANSIT_ALTS = { 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,20 }; public static final int[] WALK_LOCAL_ALTS = { 9 }; - public static final int[] WALK_PREMIUM_ALTS = { 10, 11, 12, 13 }; - public static final int[] DRIVE_TRANSIT_ALTS = { 14, 15, 16, 17, 18 }; + public static final int[] WALK_PREMIUM_ALTS = { 10, 11, 12, 13, 14 }; + public static final int[] DRIVE_TRANSIT_ALTS = { 15, 16, 17, 18, 19, 20 }; public static final int[] SCHOOL_BUS_ALTS = {}; - public static final int[] RIDE_HAIL_ALTS = {19, 20, 21}; - public static final int MAXIMUM_TOUR_MODE_ALT_INDEX = 21; + public static final int[] RIDE_HAIL_ALTS = {21, 22, 23}; + public static final int MAXIMUM_TOUR_MODE_ALT_INDEX = 23; public static final int NUM_INCOME_CATEGORIES = 4; diff --git a/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcTripModeChoiceDMU.java b/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcTripModeChoiceDMU.java index 4c9a9f14b..a7d694925 100644 --- a/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcTripModeChoiceDMU.java +++ b/core/projects/mtc/src/java/com/pb/mtc/ctramp/MtcTripModeChoiceDMU.java @@ -290,6 +290,8 @@ private void setupMethodIndexMap() { methodIndexMap.put("getUseOwnedAV", 41); methodIndexMap.put("getTourModeIsRideHail", 42 ); methodIndexMap.put("getHhIncomeInDollars", 43); + methodIndexMap.put("getOrigCounty", 44); + } @@ -345,6 +347,7 @@ public double getValueForIndex(int variableIndex, int arrayIndex) { case 41: return getUseOwnedAV(); case 42: return getTourModeIsRideHail(); case 43: return getHhIncomeInDollars(); + case 44: return getOrigCounty(); default: logger.error("method number = "+variableIndex+" not found"); diff --git a/model-files/RunIteration.bat b/model-files/RunIteration.bat index 3a2cc4dfd..552927cfa 100644 --- a/model-files/RunIteration.bat +++ b/model-files/RunIteration.bat @@ -112,6 +112,9 @@ if ERRORLEVEL 2 goto done :: If demand models were executed, translate the trip lists to demand matrices if %ITER% GTR 0 ( + :: Add airport mode choice model for airport trips using advanced air mobility mode (RSG) + runtpp CTRAMP\scripts\nonres\AirportModeChoice.job + runtpp CTRAMP\scripts\assign\PrepAssign.job if ERRORLEVEL 2 goto done ) @@ -188,6 +191,6 @@ del hwy\iter%ITER%\x*.net echo FINISHED ITERATION %ITER% %DATE% %TIME% >> logs\feedback.rpt -python "CTRAMP\scripts\notify_slack.py" "Finished iteration %ITER% in %MODEL_DIR%" +::python "CTRAMP\scripts\notify_slack.py" "Finished iteration %ITER% in %MODEL_DIR%" :done diff --git a/model-files/RunModel.bat b/model-files/RunModel.bat index 4721772d9..28a7fc7ad 100644 --- a/model-files/RunModel.bat +++ b/model-files/RunModel.bat @@ -18,8 +18,12 @@ :: ------------------------------------------------------------------------------------------------------ :: Set the path +set MODEL_DIR=%CD% call CTRAMP\runtime\SetPath.bat +:: activate conda environment +call conda activate py27tm1 + :: Start the cube cluster Cluster "%COMMPATH%\CTRAMP" 1-48 Starthide Exit @@ -31,6 +35,7 @@ if %computername%==MODEL2-D set HOST_IP_ADDRESS=192.168.1.209 if %computername%==PORMDLPPW01 set HOST_IP_ADDRESS=172.24.0.101 if %computername%==PORMDLPPW02 set HOST_IP_ADDRESS=172.24.0.102 if %computername%==WIN-FK0E96C8BNI set HOST_IP_ADDRESS=10.0.0.154 +if %computername%==WRJMDLPPW05 set HOST_IP_ADDRESS=10.0.0.134 rem if %computername%==WIN-A4SJP19GCV5 set HOST_IP_ADDRESS=10.0.0.70 rem for aws machines, HOST_IP_ADDRESS is set in SetUpModel.bat @@ -43,7 +48,6 @@ if "%COMPUTER_PREFIX%" == "WIN-" ( ) :: Figure out the model year -set MODEL_DIR=%CD% set PROJECT_DIR=%~p0 set PROJECT_DIR2=%PROJECT_DIR:~0,-1% :: get the base dir only @@ -104,7 +108,8 @@ if %FUTURE%==X ( echo on echo turn echo back on -python "CTRAMP\scripts\notify_slack.py" "Starting *%MODEL_DIR%*" +::commenting out slack +::python "CTRAMP\scripts\notify_slack.py" "Starting *%MODEL_DIR%*" set MAXITERATIONS=3 :: --------TrnAssignment Setup -- Standard Configuration @@ -201,7 +206,6 @@ runtpp CTRAMP\scripts\skims\NonMotorizedSkims.job if ERRORLEVEL 2 goto done :: Step 4.5: Build initial transit files -set PYTHONPATH=%USERPROFILE%\Documents\GitHub\NetworkWrangler;%USERPROFILE%\Documents\GitHub\NetworkWrangler\_static python CTRAMP\scripts\skims\transitDwellAccess.py NORMAL NoExtraDelay Simple complexDwell %COMPLEXMODES_DWELL% complexAccess %COMPLEXMODES_ACCESS% if ERRORLEVEL 2 goto done @@ -400,6 +404,9 @@ if ERRORLEVEL 2 goto done call RunScenarioMetrics if ERRORLEVEL 2 goto done +call ExportToOMX +if ERRORLEVEL 2 goto done + :: ------------------------------------------------------------------------------------------------------ :: :: Step 17: Directory clean up @@ -409,7 +416,7 @@ if ERRORLEVEL 2 goto done :: Extract key files call extractkeyfiles -c:\windows\system32\Robocopy.exe /E extractor "%M_DIR%\OUTPUT" +c:\windows\system32\Robocopy.exe /E extractor OUTPUT : cleanup @@ -432,7 +439,7 @@ call Run_QAQC :success ECHO FINISHED SUCCESSFULLY! -python "CTRAMP\scripts\notify_slack.py" "Finished *%MODEL_DIR%*" +::python "CTRAMP\scripts\notify_slack.py" "Finished *%MODEL_DIR%*" if "%COMPUTER_PREFIX%" == "WIN-" ( @@ -442,7 +449,7 @@ if "%COMPUTER_PREFIX%" == "WIN-" ( cd %myfolder% rem shutdown - python "CTRAMP\scripts\notify_slack.py" "Finished *%MODEL_DIR%* - shutting down" + ::python "CTRAMP\scripts\notify_slack.py" "Finished *%MODEL_DIR%* - shutting down" C:\Windows\System32\shutdown.exe /s ) @@ -454,6 +461,6 @@ goto donedone ECHO FINISHED. :: if we got here and didn't shutdown -- assume something went wrong -python "CTRAMP\scripts\notify_slack.py" ":exclamation: Error in *%MODEL_DIR%*" +::python "CTRAMP\scripts\notify_slack.py" ":exclamation: Error in *%MODEL_DIR%*" :donedone \ No newline at end of file diff --git a/model-files/model/ModeChoice.xls b/model-files/model/ModeChoice.xls index 214d20048..a08c02457 100644 Binary files a/model-files/model/ModeChoice.xls and b/model-files/model/ModeChoice.xls differ diff --git a/model-files/model/TripModeChoice.xls b/model-files/model/TripModeChoice.xls index 31307be00..20ef2ee1a 100644 Binary files a/model-files/model/TripModeChoice.xls and b/model-files/model/TripModeChoice.xls differ diff --git a/model-files/model/accessibility_utility.xls b/model-files/model/accessibility_utility.xls index 38e9bfcd5..aa95e09ea 100644 Binary files a/model-files/model/accessibility_utility.xls and b/model-files/model/accessibility_utility.xls differ diff --git a/model-files/runtime/SetPath.bat b/model-files/runtime/SetPath.bat index 5cc7d33d0..b7c455c33 100644 --- a/model-files/runtime/SetPath.bat +++ b/model-files/runtime/SetPath.bat @@ -2,25 +2,32 @@ :: Utility to set the path. Used in RunModel as well as RunMain and RunNodeX. :: The commpath -SET COMMPATH=X:\COMMPATH +::SET COMMPATH=X:\COMMPATH +:: NOTE: This has been changed to simply point to the scenario directory +SET COMMPATH=%MODEL_DIR% + if "%COMPUTER_PREFIX%" == "WIN-" ( SET COMMPATH=D:\COMMPATH) if %computername%==MODEL2-A ( set COMMPATH=E:\Model2A-Share\COMMPATH) if %computername%==MODEL2-B ( set COMMPATH=E:\Model2B-Share\COMMPATH) if %computername%==MODEL2-C ( set COMMPATH=E:\Model2C-Share\COMMPATH) if %computername%==MODEL2-D ( set COMMPATH=E:\Model2D-Share\COMMPATH) +if %computername%==WRJMDLPPW05 ( SET COMMPATH=%CD%) +if %computername%==WRJMDLPPW06 ( SET COMMPATH=%CD%) +if %computername%==WRJMDLPPW07 ( SET COMMPATH=%CD%) +if %computername%==WRJMDLPPW08 ( SET COMMPATH=%CD%) :: The location of the 64-bit java development kit -set JAVA_PATH=C:\Program Files\Java\jdk1.8.0_181 +set JAVA_PATH=C:\Program Files\Java\jdk1.8.0_201 :: The location of the GAWK binary executable files -set GAWK_PATH=X:\UTIL\Gawk +set GAWK_PATH=E:\projects\clients\gm\models\util if "%COMPUTER_PREFIX%" == "WIN-" ( set GAWK_PATH=C:\Software\Gawk ) :: The location of R and R libraries -set R_HOME=C:\Program Files\R\R-3.5.2 -set R_LIB=C:/Users/mtcpb/Documents/R/win-library/3.5 +set R_HOME=C:\Program Files\R\R-4.0.2 +set R_LIB=C:\Users\teddy.lin\Documents\R\win-library\4.0 if "%COMPUTER_PREFIX%" == "WIN-" ( set R_LIB=C:/Users/Administrator/Documents/R/win-library/3.5 ) @@ -29,14 +36,16 @@ if "%COMPUTER_PREFIX%" == "WIN-" ( set TPP_PATH=C:\Program Files\Citilabs\CubeVoyager;C:\Program Files\Citilabs\VoyagerFileAPI :: The location of python -set PYTHON_PATH=C:\Python27 +set PYTHON_PATH=C:\ProgramData\Anaconda3 :: The location of the MTC.JAR file set RUNTIME=CTRAMP/runtime :: Add these variables to the PATH environment variable, moving the current path to the back -set PATH=%RUNTIME%;%JAVA_PATH%/bin;%TPP_PATH%;%GAWK_PATH%/bin;%PYTHON_PATH% +set PATH=%RUNTIME%;%JAVA_PATH%\bin;%TPP_PATH%;%GAWK_PATH%\bin;%PYTHON_PATH%\envs\py27tm1;%PYTHON_PATH%\condabin;%PYTHON_PATH%\envs :: Set the Java classpath (locations where Java needs to find configuration and JAR files) set CLASSPATH=%RUNTIME%/config;%RUNTIME%;%RUNTIME%/config/jppf-2.4/jppf-2.4-admin-ui/lib/*;%RUNTIME%/mtc.jar +:: Set the Python Path to network-wrangler (cloned locally as opposed to pip installed) +set PYTHONPATH=E:\Projects\Clients\gm\models\NetworkWrangler;E:\Projects\Clients\gm\models\NetworkWrangler\_static \ No newline at end of file diff --git a/model-files/runtime/mtc.jar b/model-files/runtime/mtc.jar index 50d5fb5fa..4dc720ef5 100644 Binary files a/model-files/runtime/mtc.jar and b/model-files/runtime/mtc.jar differ diff --git a/model-files/runtime/mtcTourBased.properties b/model-files/runtime/mtcTourBased.properties index 3775a118e..84b4c6426 100644 --- a/model-files/runtime/mtcTourBased.properties +++ b/model-files/runtime/mtcTourBased.properties @@ -221,6 +221,15 @@ WaitTimeDistribution.EndPopEmpPerSqMi = 500,2000,5000,15000,9999999999 # TripModeChoice needs to know if the model year is 2015 MODEL_YEAR = 1999 +# AAM settings +AAM.autonomous.indicator=0 +AAM.remote.indicator=0 +AAM.probability.delay=0 +AAM.average.delay=0 +# Units = year 2000 cents per mile, equiv to 500 year 2019 cents per mile +AAM.cost.per.mile=310 + + ##--------------------------## ## F. Model-specific inputs ## ##--------------------------## @@ -286,6 +295,7 @@ Results.JointTripTable = main/joint_trip_data #-- Set to "True" to include mode choice utility and probability values in the tour data file/table #-- This feature may be useful for debugging or computation of logsums TourModeChoice.Save.UtilsAndProbs = False +TripModeChoice.Save.UtilsAndProbs = False #-- File names to which results from individual model components are stored. Results.UsualWorkAndSchoolLocationChoice = main/wsLocResults.csv diff --git a/model-files/scripts/assign/HwyAssign.job b/model-files/scripts/assign/HwyAssign.job index 8ebfff48a..a8c55df9f 100644 --- a/model-files/scripts/assign/HwyAssign.job +++ b/model-files/scripts/assign/HwyAssign.job @@ -171,7 +171,7 @@ loop period = 1, 5 mati[3] = nonres\tripsTrk@token_period@.tpp ; air passenger travel demand - mati[4] = nonres\tripsAirPax@token_period@.tpp + mati[4] = nonres\tripsAirTotal_@token_period@.tpp ; loaded time-specific highway network neto = hwy\load@token_period@.net @@ -275,13 +275,13 @@ loop period = 1, 5 ; no value toll paying classes first ; drive alone, no value toll, exclude drive alone value toll and HOV facilities, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_da, excludegrp = 11, 23, vol[1] = mi.1.da + mi.2.da + mi.4.da + pathload path = lw.gencost_da, excludegrp = 11, 23, vol[1] = mi.1.da + mi.2.da + mi.4.dant ; shared ride 2, no value toll, exclude sr2 value toll and HOV 3+ facilities, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_s2, excludegrp = 12, 3, vol[2] = mi.1.sr2 / 2 + mi.2.sr2 + mi.4.sr2 + pathload path = lw.gencost_s2, excludegrp = 12, 3, vol[2] = mi.1.sr2 / 2 + mi.2.sr2 + mi.4.s2nt/2 - ; shared ride 3+, no value toll, exclude sr3 value toll facilities, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_s3, excludegrp = 13, vol[3] = mi.1.sr3 / 3.25 + mi.2.sr3 + mi.4.sr3 + ; shared ride 3+, no value toll, exclude sr3 value toll facilities, internal demand plus intra-regional demand + pathload path = lw.gencost_s3, excludegrp = 13, vol[3] = mi.1.sr3 / 3.25 + mi.2.sr3 ; very small, small, and medium trucks, no value toll, exclude small truck value toll facilities and HOV facilities pathload path = lw.gencost_sml, excludegrp = 14, 23, vol[4] = mi.3.vstruck + mi.3.struck + mi.3.mtruck @@ -292,13 +292,13 @@ loop period = 1, 5 ; value toll paying classes second ; drive alone, value toll paying, exclude HOV facilities, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_da, excludegrp = 23, vol[6] = mi.1.datoll + mi.2.datoll + mi.4.datoll + pathload path = lw.gencost_da, excludegrp = 23, vol[6] = mi.1.datoll + mi.2.datoll + mi.4.datl ; shared ride 2, value toll paying, exclude HOV 3+ facilities, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_s2, excludegrp = 3, vol[7] = mi.1.sr2toll / 2 + mi.2.sr2toll + mi.4.sr2toll + pathload path = lw.gencost_s2, excludegrp = 3, vol[7] = mi.1.sr2toll / 2 + mi.2.sr2toll + mi.4.s2tl / 2 ; shared ride 3+, value toll paying, no exclusions, internal demand plus intra-regional demand plus air passenger demand - pathload path = lw.gencost_s3, vol[8] = mi.1.sr3toll / 3.25 + mi.2.sr3toll + mi.4.sr3toll + pathload path = lw.gencost_s3, vol[8] = mi.1.sr3toll / 3.25 + mi.2.sr3toll ; very small, small, and medium trucks, value toll paying, excluded from HOV facilities, use the small truck generalized cost pathload path = lw.gencost_sml, excludegrp = 23, vol[9]= mi.3.vstrucktoll + mi.3.strucktoll + mi.3.mtrucktoll diff --git a/model-files/scripts/assign/PrepAssign.job b/model-files/scripts/assign/PrepAssign.job index ae6006ec8..260a92496 100644 --- a/model-files/scripts/assign/PrepAssign.job +++ b/model-files/scripts/assign/PrepAssign.job @@ -1,7 +1,7 @@ ; ---------------------------------------------------------------------------------------------------------------- ; ; PrepAssign.job -; +; RSG 2022-01-21 TM1.5 add advanced air mobility mode ; TP+ script to convert the trip lists written out by the CT-RAMP software into origin/destination matrices that ; can be assigned to highway and transit networks. The first step goes through the individual trip list and stores ; trips, by mode, that are relevant for each time interval. A fixed format file, sorted first by origin zone and @@ -15,7 +15,7 @@ ; represented for a handful of travel purposes as described below. ; ; The third and final step reads in the fixed format data from steps one and two and stores the data as a TP+ matrix -; with 23 tables (see Output below for details). Note that the trips are scaled up by the sampling rate -- if the +; with 26 tables (see Output below for details). Note that the trips are scaled up by the sampling rate -- if the ; model was run on only half the synthetic population, then each resulting trip is counted twice, which allows for ; a fully representative quantity of demand to be assigned to the roadway and transit networks. ; @@ -48,10 +48,10 @@ ; (16) trip_mode - travel mode code, where 1 - "Drive alone free", 2 - "Drive alone pay", 3 - "Shared ride 2 free", ; 4 - "Shared ride 2 pay", 5 - "Shared ride 3+ free", 6 - "Shared ride 3+ pay", 7 - "Walk", ; 8 - "Bike", 9 - "Walk to local bus", 10 - "Walk to light rail or ferry", 11 - "Walk to express bus", -; 12 - "Walk to BART", 13 - "Walk to commuter rail", 14 - "Drive to local bus", -; 15 - "Drive to light rail or ferry", 16 - "Drive to express bus", 17 - "Drive to BART", -; 18 - "Drive to commuter rail" -; new jef 2018-11-10 TM1.5 19 - "Taxi" 20 - "TNC" +; 12 - "Walk to BART", 13 - "Walk to commuter rail", 14 - "Walk to advanced air mobility", +; 15 - "Drive to local bus", 16 - "Drive to light rail or ferry", 17 - "Drive to express bus", +; 18 - "Drive to BART", 19 - "Drive to commuter rail", 20 - "Drive to advanced air mobility", +; new jef 2018-11-10 TM1.5 21 - "Taxi" 22 - "TNC" ; (17) tour_mode - which is not the same as travel mode -- same codes as for trip mode. ; (18) tour_category - Type of tour (MANDATORY, INDIVIDUAL_NON_MANDATORY,AT_WORK) ; (19) avAvailable - new for TM1.5 indicating whether an autonomous vehicle is available for trips on tour @@ -75,10 +75,10 @@ ; (14) trip_mode - travel mode code, where 1 - "Drive alone free", 2 - "Drive alone pay", 3 - "Shared ride 2 free", ; 4 - "Shared ride 2 pay", 5 - "Shared ride 3+ free", 6 - "Shared ride 3+ pay", 7 - "Walk", ; 8 - "Bike", 9 - "Walk to local bus", 10 - "Walk to light rail or ferry", 11 - "Walk to express bus", -; 12 - "Walk to BART", 13 - "Walk to commuter rail", 14 - "Drive to local bus", -; 15 - "Drive to light rail or ferry", 16 - "Drive to express bus", 17 - "Drive to BART", -; 18 - "Drive to commuter rail" -; new jef 2018-11-10 TM1.5 19 - "Taxi" 20 - "TNC" +; 12 - "Walk to BART", 13 - "Walk to commuter rail", 14 - "Walk to advanced air mobility", +; 15 - "Drive to local bus", 16 - "Drive to light rail or ferry", 17 - "Drive to express bus", +; 18 - "Drive to BART", 19 - "Drive to commuter rail", 20 - "Drive to advanced air mobility", +; new jef 2018-11-10 TM1.5 21 - "Taxi" 22 - "TNC" ; (15) num_participants - the number of persons traveling on the joint tour ; (16) tour_mode - which is not necessarily the travel mode -- same codes as for trip mode. ; (17) tour_category - Type of tour (JOINT_NON_MANDATORY) @@ -101,22 +101,25 @@ ; (11) Walk, express bus, walk ; (12) Walk, heavy rail, walk ; (13) Walk, commuter rail, walk -; (14) Drive, local bus, walk -; (15) Drive, light rail/ferry, walk -; (16) Drive, express bus, walk -; (17) Drive, heavy rail, walk -; (18) Drive, commuter rail, walk -; (19) Walk, local bus, drive -; (20) Walk, light rail/ferry, drive -; (21) Walk, express bus, drive -; (22) Walk, heavy rail, drive -; (23) Walk, commuter rail, drive -; (24) Drive alone, TNC (includes zero-passenger deadheading trips) -; (25) Shared ride 2, TNC (includes zero-passenger deadheading trips) -; (26) Shared ride 3+, TNC (includes zero-passenger deadheading trips) -; (27) Drive alone, owned autonomous vehicles (includes zero-passenger deadheading trips) -; (28) Shared ride 2, owned autonomous vehicles (includes zero-passenger deadheading trips) -; (29) Shared ride 3+, owned autonomous vehicles (includes zero-passenger deadheading trips) +; (14) Walk, advanced air mobility, walk +; (15) Drive, local bus, walk +; (16) Drive, light rail/ferry, walk +; (17) Drive, express bus, walk +; (18) Drive, heavy rail, walk +; (19) Drive, commuter rail, walk +; (20) Drive, advanced air mobility, walk +; (21) Walk, local bus, drive +; (22) Walk, light rail/ferry, drive +; (23) Walk, express bus, drive +; (24) Walk, heavy rail, drive +; (25) Walk, commuter rail, drive +; (26) Walk, advanced air mobility, drive +; (27) Drive alone, TNC (includes zero-passenger deadheading trips) +; (28) Shared ride 2, TNC (includes zero-passenger deadheading trips) +; (29) Shared ride 3+, TNC (includes zero-passenger deadheading trips) +; (30) Drive alone, owned autonomous vehicles (includes zero-passenger deadheading trips) +; (31) Shared ride 2, owned autonomous vehicles (includes zero-passenger deadheading trips) +; (32) Shared ride 3+, owned autonomous vehicles (includes zero-passenger deadheading trips) ; ; Notes: (1) ; @@ -244,18 +247,21 @@ loop period = 1, 5 array wlk_exp_wlk = @token_zones_by_zones@ array wlk_hvy_wlk = @token_zones_by_zones@ array wlk_com_wlk = @token_zones_by_zones@ + array wlk_aam_wlk = @token_zones_by_zones@ array drv_loc_wlk = @token_zones_by_zones@ array drv_lrf_wlk = @token_zones_by_zones@ array drv_exp_wlk = @token_zones_by_zones@ array drv_hvy_wlk = @token_zones_by_zones@ array drv_com_wlk = @token_zones_by_zones@ + array drv_aam_wlk = @token_zones_by_zones@ array wlk_loc_drv = @token_zones_by_zones@ array wlk_lrf_drv = @token_zones_by_zones@ array wlk_exp_drv = @token_zones_by_zones@ array wlk_hvy_drv = @token_zones_by_zones@ array wlk_com_drv = @token_zones_by_zones@ + array wlk_aam_drv = @token_zones_by_zones@ array taxi = @token_zones_by_zones@ array single_tnc = @token_zones_by_zones@ @@ -264,6 +270,10 @@ loop period = 1, 5 array s2_av = @token_zones_by_zones@ array s3_av = @token_zones_by_zones@ + + + + ; create a unique index for each origin destination pair od_position = @token_zones@ * (ri.orig_taz-1) + ri.dest_taz @@ -323,55 +333,67 @@ loop period = 1, 5 elseif (ri.trip_mode = 13) wlk_com_wlk[od_position] = wlk_com_wlk[od_position] + (1/ri.sampleRate) + ; - walk, advanced air mobility, walk + elseif (ri.trip_mode = 14) + wlk_aam_wlk[od_position] = wlk_aam_wlk[od_position] + (1/ri.sampleRate) + ; - drive, local, walk (outbound) - elseif (ri.trip_mode = 14 && ri.inbound = 0) + elseif (ri.trip_mode = 15 && ri.inbound = 0) drv_loc_wlk[od_position] = drv_loc_wlk[od_position] + (1/ri.sampleRate) ; - drive, light rail/ferry, walk (outbound) - elseif (ri.trip_mode = 15 && ri.inbound = 0) + elseif (ri.trip_mode = 16 && ri.inbound = 0) drv_lrf_wlk[od_position] = drv_lrf_wlk[od_position] + (1/ri.sampleRate) ; - drive, express bus, walk (outbound) - elseif (ri.trip_mode = 16 && ri.inbound = 0) + elseif (ri.trip_mode = 17 && ri.inbound = 0) drv_exp_wlk[od_position] = drv_exp_wlk[od_position] + (1/ri.sampleRate) ; - drive, heavy rail, walk (outbound) - elseif (ri.trip_mode = 17 && ri.inbound = 0) + elseif (ri.trip_mode = 18 && ri.inbound = 0) drv_hvy_wlk[od_position] = drv_hvy_wlk[od_position] + (1/ri.sampleRate) ; - drive, commuter rail, walk (outbound) - elseif (ri.trip_mode = 18 && ri.inbound = 0) + elseif (ri.trip_mode = 19 && ri.inbound = 0) drv_com_wlk[od_position] = drv_com_wlk[od_position] + (1/ri.sampleRate) + ; - drive, advanced air mobility, walk (outbound) + elseif (ri.trip_mode = 20 && ri.inbound = 0) + drv_aam_wlk[od_position] = drv_aam_wlk[od_position] + (1/ri.sampleRate) + ; - walk, local, drive (inbound) - elseif (ri.trip_mode = 14 && ri.inbound = 1) + elseif (ri.trip_mode = 15 && ri.inbound = 1) wlk_loc_drv[od_position] = wlk_loc_drv[od_position] + (1/ri.sampleRate) ; - walk, light rail/ferry, drive (inbound) - elseif (ri.trip_mode = 15 && ri.inbound = 1) + elseif (ri.trip_mode = 16 && ri.inbound = 1) wlk_lrf_drv[od_position] = wlk_lrf_drv[od_position] + (1/ri.sampleRate) ; - walk, express bus, drive (inbound) - elseif (ri.trip_mode = 16 && ri.inbound = 1) + elseif (ri.trip_mode = 17 && ri.inbound = 1) wlk_exp_drv[od_position] = wlk_exp_drv[od_position] + (1/ri.sampleRate) ; - walk, heavy rail, drive (inbound) - elseif (ri.trip_mode = 17 && ri.inbound = 1) + elseif (ri.trip_mode = 18 && ri.inbound = 1) wlk_hvy_drv[od_position] = wlk_hvy_drv[od_position] + (1/ri.sampleRate) ; - walk, commuter rail, drive (inbound) - elseif (ri.trip_mode = 18 && ri.inbound = 1) + elseif (ri.trip_mode = 19 && ri.inbound = 1) wlk_com_drv[od_position] = wlk_com_drv[od_position] + (1/ri.sampleRate) - ; - taxi - elseif (ri.trip_mode = 19) + ; - walk, advanced air mobility, drive (inbound) + elseif (ri.trip_mode = 20 && ri.inbound = 1) + wlk_aam_drv[od_position] = wlk_aam_drv[od_position] + (1/ri.sampleRate) + + ; - taxi + elseif (ri.trip_mode = 21) taxi[od_position] = taxi[od_position] + (1/ri.sampleRate) - ; - TNC single - elseif (ri.trip_mode = 20) + ; - TNC single + elseif (ri.trip_mode = 22) single_tnc[od_position] = single_tnc[od_position] + (1/ri.sampleRate) - elseif (ri.trip_mode = 21) + elseif (ri.trip_mode = 23) shared_tnc[od_position] = shared_tnc[od_position] + (1/ri.sampleRate) ; - drive alone, no value toll @@ -429,16 +451,19 @@ loop period = 1, 5 wlk_exp_wlk[position](20.4lrs), wlk_hvy_wlk[position](20.4lrs), wlk_com_wlk[position](20.4lrs), + wlk_aam_wlk[position](20.4lrs), drv_loc_wlk[position](20.4lrs), drv_lrf_wlk[position](20.4lrs), drv_exp_wlk[position](20.4lrs), drv_hvy_wlk[position](20.4lrs), drv_com_wlk[position](20.4lrs), + drv_aam_wlk[position](20.4lrs), wlk_loc_drv[position](20.4lrs), wlk_lrf_drv[position](20.4lrs), wlk_exp_drv[position](20.4lrs), wlk_hvy_drv[position](20.4lrs), wlk_com_drv[position](20.4lrs), + wlk_aam_drv[position](20.4lrs), taxi[position](20.4lrs), single_tnc[position](20.4lrs), shared_tnc[position](20.4lrs), @@ -500,18 +525,21 @@ loop period = 1, 5 array wlk_exp_wlk = @token_zones_by_zones@ array wlk_hvy_wlk = @token_zones_by_zones@ array wlk_com_wlk = @token_zones_by_zones@ + array wlk_aam_wlk = @token_zones_by_zones@ array drv_loc_wlk = @token_zones_by_zones@ array drv_lrf_wlk = @token_zones_by_zones@ array drv_exp_wlk = @token_zones_by_zones@ array drv_hvy_wlk = @token_zones_by_zones@ array drv_com_wlk = @token_zones_by_zones@ + array drv_aam_wlk = @token_zones_by_zones@ array wlk_loc_drv = @token_zones_by_zones@ array wlk_lrf_drv = @token_zones_by_zones@ array wlk_exp_drv = @token_zones_by_zones@ array wlk_hvy_drv = @token_zones_by_zones@ array wlk_com_drv = @token_zones_by_zones@ + array wlk_aam_drv = @token_zones_by_zones@ array taxi = @token_zones_by_zones@ array single_tnc = @token_zones_by_zones@ @@ -579,55 +607,67 @@ loop period = 1, 5 elseif (ri.trip_mode = 13) wlk_com_wlk[od_position] = wlk_com_wlk[od_position] + (ri.num_participants/ri.sampleRate) + ; - walk, advanced air mobility, walk + elseif (ri.trip_mode = 14) + wlk_aam_wlk[od_position] = wlk_aam_wlk[od_position] + (ri.num_participants/ri.sampleRate) + ; - drive, local, walk (outbound) - elseif (ri.trip_mode = 14 && ri.inbound = 0) + elseif (ri.trip_mode = 15 && ri.inbound = 0) drv_loc_wlk[od_position] = drv_loc_wlk[od_position] + (ri.num_participants/ri.sampleRate) ; - drive, light rail/ferry, walk (outbound) - elseif (ri.trip_mode = 15 && ri.inbound = 0) + elseif (ri.trip_mode = 16 && ri.inbound = 0) drv_lrf_wlk[od_position] = drv_lrf_wlk[od_position] + (ri.num_participants/ri.sampleRate) ; - drive, express bus, walk (outbound) - elseif (ri.trip_mode = 16 && ri.inbound = 0) + elseif (ri.trip_mode = 17 && ri.inbound = 0) drv_exp_wlk[od_position] = drv_exp_wlk[od_position] + (ri.num_participants/ri.sampleRate) ; - drive, heavy rail, walk (outbound) - elseif (ri.trip_mode = 17 && ri.inbound = 0) + elseif (ri.trip_mode = 18 && ri.inbound = 0) drv_hvy_wlk[od_position] = drv_hvy_wlk[od_position] + (ri.num_participants/ri.sampleRate) ; - drive, commuter rail, walk (outbound) - elseif (ri.trip_mode = 18 && ri.inbound = 0) + elseif (ri.trip_mode = 19 && ri.inbound = 0) drv_com_wlk[od_position] = drv_com_wlk[od_position] + (ri.num_participants/ri.sampleRate) + ; - drive, advanced air mobility, walk (outbound) + elseif (ri.trip_mode = 20 && ri.inbound = 0) + drv_aam_wlk[od_position] = drv_aam_wlk[od_position] + (ri.num_participants/ri.sampleRate) + ; - walk, local, drive (inbound) - elseif (ri.trip_mode = 14 && ri.inbound = 1) + elseif (ri.trip_mode = 15 && ri.inbound = 1) wlk_loc_drv[od_position] = wlk_loc_drv[od_position] + (ri.num_participants/ri.sampleRate) ; - walk, light rail/ferry, drive (inbound) - elseif (ri.trip_mode = 15 && ri.inbound = 1) + elseif (ri.trip_mode = 16 && ri.inbound = 1) wlk_lrf_drv[od_position] = wlk_lrf_drv[od_position] + (ri.num_participants/ri.sampleRate) ; - walk, express bus, drive (inbound) - elseif (ri.trip_mode = 16 && ri.inbound = 1) + elseif (ri.trip_mode = 17 && ri.inbound = 1) wlk_exp_drv[od_position] = wlk_exp_drv[od_position] + (ri.num_participants/ri.sampleRate) ; - walk, heavy rail, drive (inbound) - elseif (ri.trip_mode = 17 && ri.inbound = 1) + elseif (ri.trip_mode = 18 && ri.inbound = 1) wlk_hvy_drv[od_position] = wlk_hvy_drv[od_position] + (ri.num_participants/ri.sampleRate) ; - walk, commuter rail, drive (inbound) - elseif (ri.trip_mode = 18 && ri.inbound = 1) + elseif (ri.trip_mode = 19 && ri.inbound = 1) wlk_com_drv[od_position] = wlk_com_drv[od_position] + (ri.num_participants/ri.sampleRate) + ; - walk, advanced air mobility, drive (inbound) + elseif (ri.trip_mode = 20 && ri.inbound = 1) + wlk_aam_drv[od_position] = wlk_aam_drv[od_position] + (ri.num_participants/ri.sampleRate) + ; - taxi - elseif (ri.trip_mode = 19) + elseif (ri.trip_mode = 21) taxi[od_position] = taxi[od_position] + (ri.num_participants/ri.sampleRate) ; - TNC single - elseif (ri.trip_mode = 20) + elseif (ri.trip_mode = 22) single_tnc[od_position] = single_tnc[od_position] + (ri.num_participants/ri.sampleRate) - elseif (ri.trip_mode = 21) + elseif (ri.trip_mode = 23) shared_tnc[od_position] = shared_tnc[od_position] + (ri.num_participants/ri.sampleRate) ; - drive alone, no value toll @@ -685,16 +725,19 @@ loop period = 1, 5 wlk_exp_wlk[position](20.4lrs), wlk_hvy_wlk[position](20.4lrs), wlk_com_wlk[position](20.4lrs), + wlk_aam_wlk[position](20.4lrs), drv_loc_wlk[position](20.4lrs), drv_lrf_wlk[position](20.4lrs), drv_exp_wlk[position](20.4lrs), drv_hvy_wlk[position](20.4lrs), drv_com_wlk[position](20.4lrs), + drv_aam_wlk[position](20.4lrs), wlk_loc_drv[position](20.4lrs), wlk_lrf_drv[position](20.4lrs), wlk_exp_drv[position](20.4lrs), wlk_hvy_drv[position](20.4lrs), wlk_com_drv[position](20.4lrs), + wlk_aam_drv[position](20.4lrs), taxi[position](20.4lrs), single_tnc[position](20.4lrs), shared_tnc[position](20.4lrs), @@ -729,11 +772,11 @@ loop period = 1, 5 ; write out a matrix that combines the individual and joint trips for assignment - fileo mato[1] = main\trips@token_period@_no_zpv.tpp, mo = 1-29, name = da, datoll, sr2, sr2toll, sr3, sr3toll, + fileo mato[1] = main\trips@token_period@_no_zpv.tpp, mo = 1-32, name = da, datoll, sr2, sr2toll, sr3, sr3toll, walk, bike, - wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, - drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, - wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, + wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, wlk_aam_wlk, + drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, drv_aam_wlk, + wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, wlk_aam_drv, da_tnc, s2_tnc, s3_tnc, da_av, s2_av, s3_av ; load lookup values for factoring taxi and TNC modes @@ -785,53 +828,62 @@ loop period = 1, 5 ; walk, commuter rail, walk mw[13] = (mi.1.13 + mi.2.13) + mi.3.wlk_com_wlk + ; walk, advanced air mobility, walk (no trips to/from HSR) + mw[14] = (mi.1.14 + mi.2.14) + ; drive, local bus, walk - mw[14] = (mi.1.14 + mi.2.14) + mi.3.drv_loc_wlk + mw[15] = (mi.1.15 + mi.2.15) + mi.3.drv_loc_wlk ; drive, light rail/ferry, walk - mw[15] = (mi.1.15 + mi.2.15) + mi.3.drv_lrf_wlk + mw[16] = (mi.1.16 + mi.2.16) + mi.3.drv_lrf_wlk ; drive, express bus, walk - mw[16] = (mi.1.16 + mi.2.16) + mi.3.drv_exp_wlk + mw[17] = (mi.1.17 + mi.2.17) + mi.3.drv_exp_wlk ; drive, heavy rail, walk - mw[17] = (mi.1.17 + mi.2.17) + mi.3.drv_hvy_wlk + mw[18] = (mi.1.18 + mi.2.18) + mi.3.drv_hvy_wlk ; drive, commuter rail, walk - mw[18] = (mi.1.18 + mi.2.18) + mi.3.drv_com_wlk + mw[19] = (mi.1.19 + mi.2.19) + mi.3.drv_com_wlk + + ; drive, advanced air mobility, walk (no trips to/from HSR) + mw[20] = (mi.1.20 + mi.2.20) ; walk, local bus, drive - mw[19] = (mi.1.19 + mi.2.19) + mi.3.wlk_loc_drv + mw[21] = (mi.1.21 + mi.2.21) + mi.3.wlk_loc_drv ; walk, light rail/ferry, drive - mw[20] = (mi.1.20 + mi.2.20) + mi.3.wlk_lrf_drv + mw[22] = (mi.1.22 + mi.2.22) + mi.3.wlk_lrf_drv ; walk, express bus, drive - mw[21] = (mi.1.21 + mi.2.21) + mi.3.wlk_exp_drv + mw[23] = (mi.1.23 + mi.2.23) + mi.3.wlk_exp_drv ; walk, heavy rail, drive - mw[22] = (mi.1.22 + mi.2.22) + mi.3.wlk_hvy_drv + mw[24] = (mi.1.24 + mi.2.24) + mi.3.wlk_hvy_drv ; walk, commuter rail, drive - mw[23] = (mi.1.23 + mi.2.23) + mi.3.wlk_com_drv + mw[25] = (mi.1.25 + mi.2.25) + mi.3.wlk_com_drv + + ; walk, advanced air mobility, drive (no trips to/from HSR) + mw[26] = (mi.1.26 + mi.2.26) ; da_tnc single tnc shared tnc - mw[24] = ((mi.1.25 + mi.2.25) * occ_factors(2, 1) + (mi.1.26 + mi.2.26) * occ_factors(3, 1)) + mw[27] = ((mi.1.28 + mi.2.28) * occ_factors(2, 1) + (mi.1.29 + mi.2.29) * occ_factors(3, 1)) ; s2_tnc single tnc shared tnc - mw[25] = ((mi.1.25 + mi.2.25) * occ_factors(2, 2) + (mi.1.26 + mi.2.26) * occ_factors(3, 2)) + mw[28] = ((mi.1.28 + mi.2.28) * occ_factors(2, 2) + (mi.1.29 + mi.2.29) * occ_factors(3, 2)) ; s3_tnc single tnc shared tnc - mw[26] = ((mi.1.25 + mi.2.25) * occ_factors(2, 3) + (mi.1.26 + mi.2.26) * occ_factors(3, 3)) + mw[29] = ((mi.1.28 + mi.2.28) * occ_factors(2, 3) + (mi.1.29 + mi.2.29) * occ_factors(3, 3)) ; da_av - mw[27] = (mi.1.27+mi.2.27) + mw[30] = (mi.1.30+mi.2.30) ; s2_av - mw[28] = (mi.1.28+mi.2.28) + mw[31] = (mi.1.31+mi.2.31) ; s3_av - mw[29] = (mi.1.29+mi.2.29) + mw[32] = (mi.1.32+mi.2.32) endrun ; step four: create zero passenger trips @@ -848,17 +900,18 @@ loop period = 1, 5 mw[2] = (mi.1.da_av.t + (mi.1.s2_av.t /2.0) + (mi.1.s3_av.t /3.25))*OwnedAV_ZPV_factor endrun - ; step five: add the zero passenger trips + ; step five: add the zero passenger trips, add air transit run pgm = matrix filei mati[1] = main\trips@token_period@_no_zpv.tpp filei mati[2] = main\trips@token_period@_zpv.tpp - - fileo mato[1] = main\trips@token_period@.tpp, mo = 1-29, name = da, datoll, sr2, sr2toll, sr3, sr3toll, + filei mati[3] = nonres\tripsAirTotal_@token_period@.tpp + + fileo mato[1] = main\trips@token_period@.tpp, mo = 1-32, name = da, datoll, sr2, sr2toll, sr3, sr3toll, walk, bike, - wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, - drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, - wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, + wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, wlk_aam_wlk, + drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, drv_aam_wlk, + wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, wlk_aam_drv, da_tnc, s2_tnc, s3_tnc, da_av, s2_av, s3_av @@ -875,22 +928,25 @@ loop period = 1, 5 mw[11] = mi.1.wlk_exp_wlk mw[12] = mi.1.wlk_hvy_wlk mw[13] = mi.1.wlk_com_wlk - mw[14] = mi.1.drv_loc_wlk - mw[15] = mi.1.drv_lrf_wlk - mw[16] = mi.1.drv_exp_wlk - mw[17] = mi.1.drv_hvy_wlk - mw[18] = mi.1.drv_com_wlk - mw[19] = mi.1.wlk_loc_drv - mw[20] = mi.1.wlk_lrf_drv - mw[21] = mi.1.wlk_exp_drv - mw[22] = mi.1.wlk_hvy_drv - mw[23] = mi.1.wlk_com_drv - mw[24] = mi.1.da_tnc + mi.2.zpv_tnc - mw[25] = mi.1.s2_tnc - mw[26] = mi.1.s3_tnc - mw[27] = mi.1.da_av + mi.2.zpv_av - mw[28] = mi.1.s2_av - mw[29] = mi.1.s3_av + mw[14] = mi.1.wlk_aam_wlk + mw[15] = mi.1.drv_loc_wlk + mw[16] = mi.1.drv_lrf_wlk + mw[17] = mi.1.drv_exp_wlk + mw[18] = mi.1.drv_hvy_wlk + mw[19] = mi.1.drv_com_wlk + mw[20] = mi.1.drv_aam_wlk + mi.3.drv_aam_wlk + mw[21] = mi.1.wlk_loc_drv + mw[22] = mi.1.wlk_lrf_drv + mw[23] = mi.1.wlk_exp_drv + mw[24] = mi.1.wlk_hvy_drv + mw[25] = mi.1.wlk_com_drv + mw[26] = mi.1.wlk_aam_drv + mi.3.wlk_aam_drv + mw[27] = mi.1.da_tnc + mi.2.zpv_tnc + mw[28] = mi.1.s2_tnc + mw[29] = mi.1.s3_tnc + mw[30] = mi.1.da_av + mi.2.zpv_av + mw[31] = mi.1.s2_av + mw[32] = mi.1.s3_av endrun diff --git a/model-files/scripts/assign/TransitAssign.job b/model-files/scripts/assign/TransitAssign.job index ba76c0bb8..697114933 100644 --- a/model-files/scripts/assign/TransitAssign.job +++ b/model-files/scripts/assign/TransitAssign.job @@ -1,25 +1,25 @@ ; ---------------------------------------------------------------------------------------------------------------- ; ; TransitAssign.job -; +; RSG 2022-01-21 TM1.5 add advanced air mobility mode ; TP+ script to perform a transit assignment. A total of 75 assignments are performed, accounting for five time ; periods, three access/egress combinations, and five line-haul mode combinations. The script first loops ; through five time periods, which are: (a) early AM, before 6 am; (b) AM peak period, 6 am to 10 am; (c) midday, ; 10 am to 3 pm; (d) PM peak period, 3 pm to 7 pm; and, (e) evening, after 7 pm. Next the script loops through ; three access/egress combinations, which are: walk/transit/walk; drive/transit/walk; and walk/transit/drive. -; Next, the script loops through six line-haul mode combinations, which are: (a) long-haul premium or commuter -; rail; (b) medium-haul premium or heavy rail (BART) (c) medium-haul basic or express bus; (d) short-haul premium -; or light rail; (e) short-haul basic or local bus. +; Next, the script loops through six line-haul mode combinations, which are: (a) long-haul advanced air mobility; +; (b) long-haul premium or commuter rail; (c) medium-haul premium or heavy rail (BART) (d) medium-haul basic or +; express bus; (e) short-haul premium or light rail; (f) short-haul basic or local bus. ; ; Please note that ferry is included in the short-haul premium or light rail line-haul options. This was done to ; reduce the number of skims that need to be created. Because light rail and ferry do not compete with each other, ; travelers in corridors with light rail are presented with the light rail choice and travelers in corridors with ; ferry are presented with the ferry choice. ; -; The hierarchy used to create transit path options is as follows: (1) long-haul premium; (2) medium-haul premium; -; (3) medium-haul basic; (4) short-haul premium; and, (5) short-haul basic. Using more traditional mode names: -; (1) commuter rail; (2) heavy rail; (3) express bus; (4) light rail/ferry; (5) local bus. All modes lower than -; the line-haul mode are made available when assigning the line-haul mode path, in an effort to create a set of +; The hierarchy used to create transit path options is as follows: (1) advanced air mobility; (2) long-haul premium; +; (3) medium-haul premium; (4) medium-haul basic; (5) short-haul premium; and, (6) short-haul basic. Using more traditional mode names: +; (1) advaned air mobility; (2) commuter rail; (3) heavy rail; (4) express bus; (5) light rail/ferry; (6) local bus. +; All modes lower than the line-haul mode are made available when assigning the line-haul mode path, in an effort to create a set of ; reasonable transit paths for the mode choice model to assess for each traveler. ; ; The transit network coding uses the following mode codes: @@ -38,6 +38,7 @@ ; (110) through (119) light rail, coded by provider; ; (120) through (129) heavy rail, coded by provider; ; (130) through (139) commuter rail, coded by provider. +; (140) advanced air mobility. ; ; Input: (A) A trip table with travel segmented into the following origin-destination trips: ; (1) Drive alone non-value-toll paying @@ -53,21 +54,24 @@ ; (11) Walk - light rail/ferry - walk ; (12) Walk - heavy rail - walk ; (13) Walk - commuter rail - walk -; (14) Drive - local bus - walk -; (15) Drive - express bus - walk -; (16) Drive - light rail/ferry - walk -; (17) Drive - heavy rail - walk -; (18) Drive - commuter rail - walk -; (19) Walk - local bus - drive -; (20) Walk - express bus - drive -; (21) Walk - light rail/ferry - drive -; (22) Walk - heavy rail - drive -; (23) Walk - commuter rail - drive +; (14) Walk - advanced air mobility - walk +; (15) Drive - local bus - walk +; (16) Drive - express bus - walk +; (17) Drive - light rail/ferry - walk +; (18) Drive - heavy rail - walk +; (19) Drive - commuter rail - walk +; (20) Drive - advanced air mobility - walk +; (21) Walk - local bus - drive +; (22) Walk - express bus - drive +; (23) Walk - light rail/ferry - drive +; (24) Walk - heavy rail - drive +; (25) Walk - commuter rail - drive +; (26) Walk - advanced air mobility - drive ; (B) A .block file listing all of the origin/destination fare files for transit services that ; charge o/d fares (transit_faremat.block); ; (C) Origin/destination fare files listed in the .block file above (.far files); ; (D) A .far file setting fares to links as necessary to account for all the odd fares in the bay area (Farelinks.far); -; (E) A .far file setting the transfer fares for all the 139 by 139 modal interchanges (xfare.far); +; (E) A .far file setting the transfer fares for all the 140 by 140 modal interchanges (xfare.far); ; (F) A transit line file and a transit link file ; (G) Numerous support link files that connect zones to transit stations via walking or bicycling (*transit_suplinks*.dat); ; (I) A .block file that lists commands to combine headways for all line-haul modes when the difference in path time @@ -171,9 +175,9 @@ loop period = 1, 5 endif ; line haul loop - loop path = 1, 5 - - ; commuter rail or long-haul premium + loop path = 1, 6 + + ; advanced air mobility if (path = 1) ; drive access/egress links to this mode (';' means no) @@ -182,7 +186,8 @@ loop period = 1, 5 token_drivelinks_light_rail = ';' token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ';' - token_drivelinks_commuter_rail = ' ' + token_drivelinks_commuter_rail = ';' + token_drivelinks_advanced_air_mobility = ' ' ; no KNR access links to local bus token_bus_acclinks_KNR = ';' @@ -191,14 +196,39 @@ loop period = 1, 5 token_skipmodes = '; do not skip any modes for this path' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0, 1*1.0' + + ; three-letter path name + token_path = 'aam' + + ; commuter rail or long-haul premium + elseif (path = 2) + + ; drive access/egress links to this mode (';' means no) + ; allow higher-class PNRs to be read in case of shared lots + token_drivelinks_express_bus = ';' + token_drivelinks_light_rail = ';' + token_drivelinks_ferry = ';' + token_drivelinks_heavy_rail = ';' + token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' + + ; no KNR access links to local bus + token_bus_acclinks_KNR = ';' + + ; advanced air mobility and commuter rail excluded from this path + token_skipmodes = 'skipmodes = 140' + + ; mode-specific perceived time factors + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0, 1*1.5' ; three-letter path name token_path = 'com' ; heavy rail or medium-haul premium - elseif (path = 2) + elseif (path = 3) ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -207,22 +237,23 @@ loop period = 1, 5 token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; no KNR access links to local bus token_bus_acclinks_KNR = ';' - ; commuter rail excluded from this path - token_skipmodes = 'skipmodes = 130-139' + ; advanced air mobility and commuter rail excluded from this path + token_skipmodes = 'skipmodes = 140,130-139' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.0, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.0, 10*1.5, 1*1.5' ; three-letter path name token_path = 'hvy' ; express bus or medium-haul basic - elseif (path = 3) + elseif (path = 4) ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -231,23 +262,24 @@ loop period = 1, 5 token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ';' - ; commuter rail and heavy rail excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139' + ; advanced air mobility, commuter rail and heavy rail excluded from this path + token_skipmodes = 'skipmodes = 140,130-139,120-140' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.0, 10*1.5, 10*1.5, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.0, 10*1.5, 10*1.5, 10*1.5, 10*1.5, 1*1.5' ; three-letter path name token_path = 'exp' ; light rail (or ferry) or short-haul premium - elseif (path = 4) + elseif (path = 5) ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -256,22 +288,23 @@ loop period = 1, 5 token_drivelinks_ferry = ' ' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; no KNR access links to local bus token_bus_acclinks_KNR = ';' - ; commuter rail, heavy rail, and express bus excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139,80-99' + ; advanced air mobility, commuter rail, heavy rail, and express bus excluded from this path + token_skipmodes = 'skipmodes = 140-140,130-139,120-139,80-99' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.5, 10*1.0, 10*1.0, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.5, 10*1.0, 10*1.0, 10*1.5, 10*1.5, 1*1.5' ; three-letter path name token_path = 'lrf' ; local bus or short-haul basic - elseif (path = 5) + elseif (path = 6) ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -280,16 +313,17 @@ loop period = 1, 5 token_drivelinks_ferry = ' ' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ' ' - ; commuter rail, heavy rail, express bus, light rail, and ferry excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139,80-99,100-119' + ; advanced air mobility, commuter rail, heavy rail, express bus, light rail, and ferry excluded from this path + token_skipmodes = 'skipmodes = 140-140,130-139,120-139,80-99,100-119' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.5, 10*1.5, 10*1.5, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.5, 10*1.5, 10*1.5, 10*1.5, 10*1.5, 1*1.5' ; three-letter path name token_path = 'loc' @@ -308,7 +342,7 @@ loop period = 1, 5 ; use the highway network with the computed bus times filei neti = @token_period@_transit_background.net - ; read in the 23-table matrix created by prepAssign.job (see header for content details) + ; read in the 26-table matrix created by prepAssign.job (see header for content details) filei mati = "@token_model_dir@\main\trips@token_period@.tpp" ; path parameter: do not list (write out) all of the subsequent input @@ -344,6 +378,7 @@ loop period = 1, 5 @token_drivelinks_ferry@ read file = @token_period@_transit_suplinks_ferry.dat @token_drivelinks_heavy_rail@ read file = @token_period@_transit_suplinks_heavy_rail.dat @token_drivelinks_commuter_rail@ read file = @token_period@_transit_suplinks_commuter_rail.dat + @token_drivelinks_advanced_air_mobility@ read file = @token_period@_transit_suplinks_advanced_air_mobility.dat ; read in the generated KNR links for local bus @token_bus_acclinks_KNR@ READ FILE = @token_period@_bus_acclinks_KNR.DAT @@ -378,10 +413,10 @@ loop period = 1, 5 @token_boardpen@ ; perceived time factors: initial wait time is equivalent to 2.8 minutes of ride time for modes 10 through 255 - factor iwaitfac = 9*0, 130*2.8 + factor iwaitfac = 9*0, 131*2.8 ; perceived time factors: transfer wait time is equivalent to 2.8 minutes of ride time for modes 1 through 255 - factor xwaitfac = 139*2.8 + factor xwaitfac = 140*2.8 ; use token_skipmodes to remove modes from the network per the hierarchy @token_skipmodes@ diff --git a/model-files/scripts/block/AirportModeChoice.block b/model-files/scripts/block/AirportModeChoice.block new file mode 100644 index 000000000..2b1d38c19 --- /dev/null +++ b/model-files/scripts/block/AirportModeChoice.block @@ -0,0 +1,235 @@ +AAM.probability.delay = 0 +AAM.average.delay = 0 +AAM.autonomous.indicator = 0 +AAM.remote.indicator = 0 +AAM.costPerMile = 3.10 +taxi.baseFare = 2.20 +taxi.costPerMile = 2.30 +taxi.costPerMinute = 0.10 +TNC.single.baseFare = 2.20 +TNC.single.costPerMile = 1.33 +TNC.single.costPerMinute = 0.24 +TNC.single.costMinimum = 7.20 + +airport_1 = 'SFO' +airport_1_taz = 239 +airport_1_shtcph = 8.00 +airport_1_lngcpd = 28.00 +airport_1_offcpd = 18.00 +airport_1_res_per_share = 0.31 +airport_1_res_bus_share = 0.15 +airport_1_vis_per_share = 0.32 +airport_1_vis_bus_share = 0.22 +; passengers are for 2035 +airport_1_passengers = 116963 +; average duration of travel in days +airport_1_dur_res_per = 12.0 +airport_1_dur_res_bus = 8.0 +airport_1_dur_vis_per = 12.0 +airport_1_dur_vis_bus = 8.0 + +airport_2 = 'OAK' +airport_2_taz = 874 +airport_2_shtcph = 5.00 +airport_2_lngcpd = 22.00 +airport_2_offcpd = 18.00 +airport_2_res_per_share = 0.40 +airport_2_res_bus_share = 0.18 +airport_2_vis_per_share = 0.26 +airport_2_vis_bus_share = 0.16 +; passengers are for 2035 +airport_2_passengers = 40288 +; average duration of travel in days +airport_2_dur_res_per = 8.0 +airport_2_dur_res_bus = 4.0 +airport_2_dur_vis_per = 8.0 +airport_2_dur_vis_bus = 4.0 + +airport_3 = 'SJC' +airport_3_taz = 434 +airport_3_shtcph = 6.00 +airport_3_lngcpd = 24.00 +airport_3_offcpd = 15.00 +airport_3_res_per_share = 0.40 +airport_3_res_bus_share = 0.18 +airport_3_vis_per_share = 0.26 +airport_3_vis_bus_share = 0.16 +; passengers are for 2035 +airport_3_passengers = 36094 +airport_2_dur_res_per = 8.0 +airport_2_dur_res_bus = 4.0 +airport_2_dur_vis_per = 8.0 +airport_2_dur_vis_bus = 4.0 + +c_ivt_res_per = -0.005 +c_ivt_res_bus = -0.027 +c_ivt_vis_per = -0.013 +c_ivt_vis_bus = -0.013 + +c_cst_res_per = -0.020 +c_cst_res_bus = -0.048 +c_cst_vis_per = -0.022 +c_cst_vis_bus = -0.025 + +c_xfr_res_per = -0.38 +c_xfr_res_bus = -0.46 +c_xfr_vis_per = -0.41 +c_xfr_vis_bus = -0.41 + +; ASCs +;pickup or dropoff private vehicle +asc_pud_res_per = 0 +asc_pud_res_bus = 0 +asc_pud_vis_per = 0 +asc_pud_vis_bus = 0 + +;short-term parking (using domestic constants) +asc_sht_res_per = -0.71 +asc_sht_res_bus = 2.0 +asc_sht_vis_per = -1.68 +asc_sht_vis_bus = -1.81 + +;long-term parking +asc_lgt_res_per = -0.81 +asc_lgt_res_bus = 1.17 +asc_lgt_vis_per = -999 +asc_lgt_vis_bus = -999 + +;off-airport parking +asc_off_res_per = -0.81 +asc_off_res_bus = 1.16 +asc_off_vis_per = -999 +asc_off_vis_bus = -999 + +;Rental car +asc_rnt_res_per = -999 +asc_rnt_res_bus = -999 +asc_rnt_vis_per = 0.73 +asc_rnt_vis_bus = 2.38 + +;Taxi +asc_txi_res_per = -0.37 +asc_txi_res_bus = 2.28 +asc_txi_vis_per = 0.32 +asc_txi_vis_bus = 2.52 + +;TNC +asc_tnc_res_per = -0.63 +asc_tnc_res_bus = 1.56 +asc_tnc_vis_per = -0.66 +asc_tnc_vis_bus = 1.19 + +;Limo +asc_lmo_res_per = -1.27 +asc_lmo_res_bus = 2.27 +asc_lmo_vis_per = -0.66 +asc_lmo_vis_bus = 1.19 + +;Shared-ride van +asc_srv_res_per = -1.46 +asc_srv_res_bus = -0.67 +asc_srv_vis_per = -0.44 +asc_srv_vis_bus = 0.35 + +;Transit +asc_trn_res_per = 0.72 +asc_trn_res_bus = 1.90 +asc_trn_vis_per = 1.00 +asc_trn_vis_bus = 1.81 + +;Other scheduled bus +asc_osb_res_per = -1.99 +asc_osb_res_bus = -1.13 +asc_osb_vis_per = -2.17 +asc_osb_vis_bus = -2.46 + +;Additional transit constant for baggage (assume one bag) +asc_bag_res_per = -0.71 +asc_bag_res_bus = -0.32 +asc_bag_vis_per = -0.45 +asc_bag_vis_bus = -0.29 + +; Additional transit constant for party size (not a solo traveler) - assume for personal +asc_pty_res_per = -0.53 +asc_pty_res_bus = 0 +asc_pty_vis_per = -0.44 +asc_pty_vis_bus = 0 + +; Cost coefficient for AAM +c_cst_aam_res_per = -0.0064 +c_cst_aam_res_bus = -0.0346 +c_cst_aam_vis_per = -0.0167 +c_cst_aam_vis_bus = -0.0167 + +; Reliability coefficient for AAM +c_rel_aam_res_per = -0.0032 +c_rel_aam_res_bus = -0.0173 +c_rel_aam_vis_per = -0.0083 +c_rel_aam_vis_bus = -0.0083 + +; Distance elasticity coefficient for AAM +c_dst_aam_res_per = -0.2936 +c_dst_aam_res_bus = -1.5856 +c_dst_aam_vis_per = -0.7634 +c_dst_aam_vis_bus = -0.7634 + +; Income elasticity coefficient for AAM +c_inc_aam_res_per = -0.0764 +c_inc_aam_res_bus = -0.4124 +c_inc_aam_vis_per = -0.1986 +c_inc_aam_vis_bus = -0.1986 + +; Constants for AAM +asc_aam_res_per = 0.0359 +asc_aam_res_bus = 0.1938 +asc_aam_vis_per = 0.0933 +asc_aam_vis_bus = 0.0933 + +; Business constant for AAM +asc_bus_aam_res_per = 0.0000 +asc_bus_aam_res_bus = 0.6944 +asc_bus_aam_vis_per = 0.0000 +asc_bus_aam_vis_bus = 0.3343 + +; Airport constant for AAM +asc_air_aam_res_per = 0.0421 +asc_air_aam_res_bus = 0.2271 +asc_air_aam_vis_per = 0.1093 +asc_air_aam_vis_bus = 0.1093 + +; Autonomous operation constant for AAM +asc_aut_aam_res_per = -0.0449 +asc_aut_aam_res_bus = -0.2423 +asc_aut_aam_vis_per = -0.1167 +asc_aut_aam_vis_bus = -0.1167 + +; Remote operation constant for AAM +asc_rem_aam_res_per = -0.0474 +asc_rem_aam_res_bus = -0.2562 +asc_rem_aam_vis_per = -0.1233 +asc_rem_aam_vis_bus = -0.1233 + +; Income for AAM +inc_aam_res_per = 87000 +inc_aam_res_bus = 100000 +inc_aam_vis_per = 87000 +inc_aam_vis_bus = 100000 + + +; base income for AAM income elasticity +base_inc = 87000 + +; base distance for AAM distance elasticity +base_dst = 20.10 + +rental_cpd = 35.00 +sharedvan_cost = 15.00 + +; takes into account that model was estimated using 2014 data but skimmed costs are in $2000 +cpi_factor = 1.37 + +percent_EA = 0.04 +percent_AM = 0.17 +percent_MD = 0.31 +percent_PM = 0.20 +percent_EV = 0.28 diff --git a/model-files/scripts/block/SpeedCapacity_1hour.block b/model-files/scripts/block/SpeedCapacity_1hour.block index ffca644b2..6c1c3a25e 100644 --- a/model-files/scripts/block/SpeedCapacity_1hour.block +++ b/model-files/scripts/block/SpeedCapacity_1hour.block @@ -1,3 +1,5 @@ +; modified for Blueprint Vision Zero + SPDCAP CAPACITY[01] = 1850, 2050, 1450, 600, 1450, 0, 900, 2150, 2100, 1500 SPDCAP CAPACITY[11] = 1850, 2050, 1450, 650, 1500, 0, 950, 2150, 2150, 1650 SPDCAP CAPACITY[21] = 1950, 2100, 1600, 700, 1550, 0, 1000, 2200, 2200, 1700 @@ -6,12 +8,12 @@ SPDCAP CAPACITY[41] = 2000, 2150, 1650, 900, 1550, 0, 1050, 2250, 2000, 1050 SPDCAP CAPACITY[51] = 2000, 2150, 1650, 950, 1550, 0, 1050, 2250, 2050, 1100 SPDCAP CAPACITY[61] = 2000, 2150 -SPDCAP SPEED[01] = 40, 55, 40, 10, 30, 18, 20, 55, 55, 40 -SPDCAP SPEED[11] = 40, 55, 40, 15, 30, 18, 25, 55, 60, 45 -SPDCAP SPEED[21] = 45, 60, 45, 20, 35, 18, 30, 60, 65, 55 -SPDCAP SPEED[31] = 45, 60, 45, 25, 35, 18, 30, 60, 50, 25 -SPDCAP SPEED[41] = 50, 65, 50, 30, 40, 18, 35, 65, 45, 30 -SPDCAP SPEED[51] = 50, 65, 55, 35, 40, 18, 40, 65, 50, 40 -SPDCAP SPEED[61] = 50, 75 +SPDCAP SPEED[01]=40,55,40,10,30,18,20,55,55,40 +SPDCAP SPEED[11]=40,55,40,15,30,18,20,55,55,45 +SPDCAP SPEED[21]=45,55,45,20,35,18,20,55,55,55 +SPDCAP SPEED[31]=45,55,45,25,35,18,25,55,50,25 +SPDCAP SPEED[41]=50,55,50,30,40,18,30,55,45,30 +SPDCAP SPEED[51]=50,55,55,35,40,18,35,55,50,30 +SPDCAP SPEED[61]=50,55 REPORT SPEED = YES CAPACITY = YES ;report speed/capacity tables in network diff --git a/model-files/scripts/block/transferProhibitors_DRV_TRN_WLK.block b/model-files/scripts/block/transferProhibitors_DRV_TRN_WLK.block index 6fb986bdb..86fd6fcba 100644 --- a/model-files/scripts/block/transferProhibitors_DRV_TRN_WLK.block +++ b/model-files/scripts/block/transferProhibitors_DRV_TRN_WLK.block @@ -138,3 +138,5 @@ NOX[136]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[137]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[138]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[139]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail +; RSG 2022-01-21 TM1.5 add advanced air mobility mode +NOX[140]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; AdvancedAirMobility diff --git a/model-files/scripts/block/transferProhibitors_WLK_TRN_DRV.block b/model-files/scripts/block/transferProhibitors_WLK_TRN_DRV.block index 8caa8f46c..a4b218330 100644 --- a/model-files/scripts/block/transferProhibitors_WLK_TRN_DRV.block +++ b/model-files/scripts/block/transferProhibitors_WLK_TRN_DRV.block @@ -138,3 +138,5 @@ NOX[136]= Y,Y,N,N,N,Y,N,Y,Y,255*N; CommuterRail NOX[137]= Y,Y,N,N,N,Y,N,Y,Y,255*N; CommuterRail NOX[138]= Y,Y,N,N,N,Y,N,Y,Y,255*N; CommuterRail NOX[139]= Y,Y,N,N,N,Y,N,Y,Y,255*N; CommuterRail +; RSG 2022-01-21 TM1.5 add advanced air mobility mode +NOX[140]= Y,Y,N,N,N,Y,N,Y,Y,255*N; AdvancedAirMobility diff --git a/model-files/scripts/block/transferProhibitors_WLK_TRN_WLK.block b/model-files/scripts/block/transferProhibitors_WLK_TRN_WLK.block index 6313e16e4..736eb5d08 100644 --- a/model-files/scripts/block/transferProhibitors_WLK_TRN_WLK.block +++ b/model-files/scripts/block/transferProhibitors_WLK_TRN_WLK.block @@ -138,3 +138,5 @@ NOX[136]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[137]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[138]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail NOX[139]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; CommuterRail +; RSG 2022-01-21 TM1.5 add advanced air mobility mode +NOX[140]= Y,Y,N,Y,N,N,Y,Y,Y,255*N; AdvancedAirMobility diff --git a/model-files/scripts/core_summaries/ConsolidateLoadedTransit.R b/model-files/scripts/core_summaries/ConsolidateLoadedTransit.R index 30543062a..a60c3924b 100644 --- a/model-files/scripts/core_summaries/ConsolidateLoadedTransit.R +++ b/model-files/scripts/core_summaries/ConsolidateLoadedTransit.R @@ -1,6 +1,6 @@ # # Simple script to consolidate loaded transit files -# +# RSG 2022-01-21 TM1.5 add advanced air mobility mode # Overhead ## Initialization: Set the workspace and load needed libraries @@ -40,7 +40,7 @@ for (timeperiod in c("ea","am","md","pm","ev")) { trnlink_dbf_data <- rbind(trnlink_dbf_data, trndata) print(paste("Read ",fullfile)) - for (submode in c("loc","lrf","exp","hvy","com")) { + for (submode in c("loc","lrf","exp","hvy","com","aam")) { for (acc_egr in list( c("wlk","wlk"), c("drv","wlk"), c("wlk","drv"))) { # line file filename <- paste0("trnline",timeperiod,"_",acc_egr[1],"_",submode,"_",acc_egr[2],".csv") diff --git a/model-files/scripts/core_summaries/TelecommuteByIncome.py b/model-files/scripts/core_summaries/TelecommuteByIncome.py index b7634edf6..3d138553e 100644 --- a/model-files/scripts/core_summaries/TelecommuteByIncome.py +++ b/model-files/scripts/core_summaries/TelecommuteByIncome.py @@ -33,13 +33,13 @@ SizeCoeff_df = pd.read_csv(os.path.join(os.getcwd(), 'ctramp', 'model', 'DestinationChoiceSizeCoefficients.csv'), index_col=False, sep=",") # read in the input on % of jobs that can be performed at home by industry -WFHbyIndustry_df = pd.read_csv(os.path.join('//mainmodel//MainModelShare//travel-model-one-master//utilities//RTP', 'wfh_by_industry.csv'), index_col=False, sep=",", nrows=7) +WFHbyIndustry_df = pd.read_csv(os.path.join('E:\\Projects\\Clients\\gm\\models\\travel-model-one\\utilities\\RTP', 'wfh_by_industry.csv'), index_col=False, sep=",", nrows=7) # for the super district level summary # ------ # read in the taz-superdistrict correspondence -tazSD_df = pd.read_csv(os.path.join('//mainmodel//MainModelShare//travel-model-one-master//utilities//geographies', 'taz-superdistrict-county.csv'), index_col=False, sep=",") +tazSD_df = pd.read_csv(os.path.join('E:\\Projects\\Clients\\gm\\models\\travel-model-one\\utilities\\geographies', 'taz-superdistrict-county.csv'), index_col=False, sep=",") # read in the land use data about job types # The fields are documented here: https://github.com/BayAreaMetro/modeling-website/wiki/TazData diff --git a/model-files/scripts/core_summaries/reference-transit-modes.csv b/model-files/scripts/core_summaries/reference-transit-modes.csv index aaa9f7a00..47e269675 100644 --- a/model-files/scripts/core_summaries/reference-transit-modes.csv +++ b/model-files/scripts/core_summaries/reference-transit-modes.csv @@ -138,3 +138,4 @@ E-BART (Future),136,Commuter Rail,280 High-Speed Rail (Future),137,Commuter Rail,280 Reserved,138,Commuter Rail, Reserved,139,Commuter Rail, +Advanved Air Mobility,140,Advanved Air Mobility,5 diff --git a/model-files/scripts/emfac/emfac_postproc.py b/model-files/scripts/emfac/emfac_postproc.py index 8c384aef6..f16a572e6 100644 --- a/model-files/scripts/emfac/emfac_postproc.py +++ b/model-files/scripts/emfac/emfac_postproc.py @@ -5,9 +5,6 @@ To run this script, start from the model run directory, e.g. A:\Projects\2050_TM152_FBP_PlusCrossing_16 - - Set M_DIR according to the path in setupmodel.bat, so the output will get copied to the right place on the M drive - e.g. set M_DIR=M:\Application\Model One\RTP2021\Blueprint\2050_TM152_FBP_PlusCrossing_16 - - Run this scrpit, with SB375 or EIR as an argument e.g. python ctramp/scripts/emfac/emfac_postproc.py SB375 @@ -106,7 +103,7 @@ print "\nFinished writing out the regional-level EMFAC results to emfac_prep\\emfac_ghg.csv" # copy emfac_ghg.csv back to the metrics folder in the model output directory on M -M_DIR = os.getenv('M_DIR') +M_DIR = os.getenv('MODEL_DIR') M_OUTPUT = os.path.join(M_DIR, "OUTPUT") if not os.path.isdir(M_OUTPUT): diff --git a/model-files/scripts/nonres/AirportModeChoice.job b/model-files/scripts/nonres/AirportModeChoice.job new file mode 100644 index 000000000..f8086dbe4 --- /dev/null +++ b/model-files/scripts/nonres/AirportModeChoice.job @@ -0,0 +1,619 @@ +; Airport mode choice model +; +; This model runs mode choice for input air ground access trips. It uses the input trip tables as a +; fixed distribution but converts them to person trips and scales them to enplanements - transferring +; passengers. It then applies a mode choice model estimated by RSG for ACRP 01-35 using data for SFO. +; +; Simplifications: +; 1. Uses ASCs for domestic short-term parking. Full model includes domestic vs. international constants. +; 2. Using average travel duration by market segment to compute parking costs +; 3. Applying transit constants for one checked bag to all markets +; 4. Applying transit constants for multiple travel party members to personal travel markets +; 5. Applying as multinomial since only one market in the original model had a significant nesting parameter +; +; applied to following airports: +; 1: SFO (TAZ 239) +; 2: OAK (TAZ 874) +; 3: SJC (TAZ 434) + + + +; loop on periods +loop period = 1, 5 + + ; a two letter token is used for each time period + if (period = 1) + token_period = 'EA' + + elseif (period = 2) + token_period = 'AM' + + elseif (period = 3) + token_period = 'MD' + + elseif (period = 4) + token_period = 'PM' + + elseif (period = 5) + token_period = 'EV' + + endif + + run pgm = matrix + + ; input air passenger travel demand; DA, SR2, SR3, DATOLL, SR2TOLL, SR3TOLL + filei mati[1] = nonres\tripsAirPax@token_period@.tpp + + ; output air passenger trips + fileo mato[1] = nonres\TotalTripsAirPax@token_period@.tpp, mo=1-3, name = airport1trips,airport2trips,airport3trips + + ; read in the airport mode choice model block file, contains MC model coefficients and parameters + read file = ctramp\scripts\block\AirportModeChoice.block + + jloop + + ;no intrazonals should be allowed + if(i==j) + continue + endif + + if ((i = airport_1_taz) | (j = airport_1_taz)) + MW[1][J] = MW[1][J] + mi.1.DA[J] + mi.1.SR2[J] + mi.1.SR3[J] + mi.1.DATOLL[J] + mi.1.SR2TOLL[J] + mi.1.SR3TOLL[J] + elseif ((i = airport_2_taz) | (j = airport_2_taz)) + MW[2][J] = MW[2][J] + mi.1.DA[J] + mi.1.SR2[J] + mi.1.SR3[J] + mi.1.DATOLL[J] + mi.1.SR2TOLL[J] + mi.1.SR3TOLL[J] + elseif ((i = airport_3_taz) | (j = airport_3_taz)) + MW[3][J] = MW[3][J] + mi.1.DA[J] + mi.1.SR2[J] + mi.1.SR3[J] + mi.1.DATOLL[J] + mi.1.SR2TOLL[J] + mi.1.SR3TOLL[J] + else + continue + endif + endjloop + + endrun + run pgm matrix + ; input air passenger travel demand; airport1trips,airport2trips,airport3trips + filei mati[1] = nonres\TotalTripsAirPax@token_period@.tpp + + MW[1] = mi.1.airport1trips + MW[2] = mi.1.airport2trips + MW[3] = mi.1.airport3trips + + air1trips = air1trips+ ROWSUM(1) + log VAR=air1trips + air2trips = air2trips+ ROWSUM(2) + log VAR=air2trips + air3trips = air3trips+ ROWSUM(3) + log VAR=air3trips + + endrun + run pgm = matrix + + ; input air passenger travel demand; airport1trips,airport2trips,airport3trips + filei mati[1] = nonres\TotalTripsAirPax@token_period@.tpp + + ; output air passenger percentages + fileo mato[1] = nonres\PercentAirPax@token_period@.tpp, mo=1-3, name = airport1pct,airport2pct,airport3pct, DEC=D,D,D + + ; read in the airport mode choice model block file, contains MC model coefficients and parameters + read file = ctramp\scripts\block\AirportModeChoice.block + + trips1 = @MATRIX.air1trips@ + trips2 = @MATRIX.air2trips@ + trips3 = @MATRIX.air3trips@ + PRINT LIST="airport 1 trips: ", trips1, " airport 2 trips: ", trips2, " airport 3 trips: ", trips3 + + + jloop + + MW[1][J] = mi.1.airport1trips[J]/trips1 + MW[2][J] = mi.1.airport2trips[J]/trips2 + MW[3][J] = mi.1.airport3trips[J]/trips3 + + endjloop + + + endrun + ; loop on segments + loop segment = 1, 4 + + if (segment = 1) + token_segment = 'res_per' + elseif (segment = 2) + token_segment = 'res_bus' + elseif (segment = 3) + token_segment = 'vis_per' + elseif (segment = 4) + token_segment = 'vis_bus' + endif + + + run pgm = matrix + + ; input air passenger travel demand percentages; airport1pct,airport2pct,airport3pct + filei mati[1] = nonres\PercentAirPax@token_period@.tpp + + ; DA skims: TIMEDA, DISTDA, BTOLLDA, TOLLTIMEDA, TOLLDISTDA, TOLLBTOLLDA, TOLLVTOLLDA + filei mati[2] = skims\DA_@token_period@.tpp + + ; S2 skims: TIMES2, DISTS2, BTOLLS2, TOLLTIMES2, TOLLDISTS2, TOLLBTOLLS2, TOLLVTOLLS2 + filei mati[3] = skims\S2_@token_period@.tpp + + ; S3+ skims: TIMES3, DISTS3, BTOLLS3, TOLLTIMES3, TOLLDISTS3, TOLLBTOLLS3, TOLLVTOLLS3 + filei mati[4] = skims\S3_@token_period@.tpp + + ; transit skims: ivt, iwait, xwait, wait, wacc, waux, wegr, dtime, ddist, fare, boards, ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtAAM, ivtFerry, etc. + filei mati[5] = skims\trnskm@token_period@_wlk_aam_drv.tpp + filei mati[6] = skims\trnskm@token_period@_drv_aam_wlk.tpp + + ; read in the highway assignment parameter block + read file = ctramp\scripts\block\hwyparam.block + + ; read in the airport mode choice model block file, contains MC model coefficients and parameters + read file = ctramp\scripts\block\AirportModeChoice.block + + ; write out the time-period and market-specific utilities + fileo mato[1] = nonres\utilitiesAir_@token_period@_@token_segment@.tpp, mo = 1-11, name = u_tran,u_pudo,u_shtp,u_lngp,u_offp,u_rent, + u_taxi,u_tnc,u_limo,u_shrv,u_othb + + ; write out the time-period and market-specific trips collapsed by assignment mode + fileo mato[2] = nonres\tripsAir_@token_period@_@token_segment@.tpp, mo = 12-17, name = dant, datl, s2nt, s2tl, wlk_aam_drv,drv_aam_wlk + + if(@period@=1) + per_pct = percent_EA + elseif(@period@=2) + per_pct = percent_AM + elseif(@period@=3) + per_pct = percent_MD + elseif(@period@=4) + per_pct = percent_PM + elseif(@period@=5) + per_pct = percent_EV + endif + + if (@segment@ = 1) + token_segment = 'res_per' + party_size=2 + c_ivt = c_ivt_res_per + c_cst = c_cst_res_per + c_xfr = c_xfr_res_per + asc_pud = asc_pud_res_per + asc_sht = asc_sht_res_per + asc_lgt = asc_lgt_res_per + asc_off = asc_off_res_per + asc_rnt = asc_rnt_res_per + asc_txi = asc_txi_res_per + asc_tnc = asc_tnc_res_per + asc_lmo = asc_lmo_res_per + asc_srv = asc_srv_res_per + asc_trn = asc_trn_res_per + asc_osb = asc_osb_res_per + asc_bag = asc_bag_res_per + asc_pty = asc_pty_res_per + c_cst_aam = c_cst_aam_res_per + c_rel_aam = c_rel_aam_res_per + c_dst_aam = c_dst_aam_res_per + c_inc_aam = c_inc_aam_res_per + asc_aam = asc_aam_res_per + asc_bus_aam = asc_bus_aam_res_per + asc_air_aam = asc_air_aam_res_per + asc_aut_aam = asc_aut_aam_res_per + asc_rem_aam = asc_rem_aam_res_per + inc_aam = inc_aam_res_per + airport_1_market_factor = airport_1_res_per_share + airport_2_market_factor = airport_2_res_per_share + airport_3_market_factor = airport_3_res_per_share + airport_1_dur = airport_1_dur_res_per + airport_2_dur = airport_1_dur_res_per + airport_3_dur = airport_1_dur_res_per + + elseif (@segment@ = 2) + token_segment = 'res_bus' + party_size=1 + c_ivt = c_ivt_res_bus + c_cst = c_cst_res_bus + c_xfr = c_xfr_res_bus + asc_pud = asc_pud_res_bus + asc_sht = asc_sht_res_bus + asc_lgt = asc_lgt_res_bus + asc_off = asc_off_res_bus + asc_rnt = asc_rnt_res_bus + asc_txi = asc_txi_res_bus + asc_tnc = asc_tnc_res_bus + asc_lmo = asc_lmo_res_bus + asc_srv = asc_srv_res_bus + asc_trn = asc_trn_res_bus + asc_osb = asc_osb_res_bus + asc_bag = asc_bag_res_bus + asc_pty = asc_pty_res_bus + c_cst_aam = c_cst_aam_res_bus + c_rel_aam = c_rel_aam_res_bus + c_dst_aam = c_dst_aam_res_bus + c_inc_aam = c_inc_aam_res_bus + asc_aam = asc_aam_res_bus + asc_bus_aam = asc_bus_aam_res_bus + asc_air_aam = asc_air_aam_res_bus + asc_aut_aam = asc_aut_aam_res_bus + asc_rem_aam = asc_rem_aam_res_bus + inc_aam = inc_aam_res_bus + airport_1_market_factor = airport_1_res_bus_share + airport_2_market_factor = airport_2_res_bus_share + airport_3_market_factor = airport_3_res_bus_share + airport_1_dur = airport_1_dur_res_bus + airport_2_dur = airport_1_dur_res_bus + airport_3_dur = airport_1_dur_res_bus + + elseif (@segment@ = 3) + token_segment = 'vis_per' + party_size=2 + c_ivt = c_ivt_vis_per + c_cst = c_cst_vis_per + c_xfr = c_xfr_vis_per + asc_pud = asc_pud_vis_per + asc_sht = asc_sht_vis_per + asc_lgt = asc_lgt_vis_per + asc_off = asc_off_vis_per + asc_rnt = asc_rnt_vis_per + asc_txi = asc_txi_vis_per + asc_tnc = asc_tnc_vis_per + asc_lmo = asc_lmo_vis_per + asc_srv = asc_srv_vis_per + asc_trn = asc_trn_vis_per + asc_osb = asc_osb_vis_per + asc_bag = asc_bag_vis_per + asc_pty = asc_pty_vis_per + c_cst_aam = c_cst_aam_vis_per + c_rel_aam = c_rel_aam_vis_per + c_dst_aam = c_dst_aam_vis_per + c_inc_aam = c_inc_aam_vis_per + asc_aam = asc_aam_vis_per + asc_bus_aam = asc_bus_aam_vis_per + asc_air_aam = asc_air_aam_vis_per + asc_aut_aam = asc_aut_aam_vis_per + asc_rem_aam = asc_rem_aam_vis_per + inc_aam = inc_aam_vis_per + airport_1_market_factor = airport_1_vis_per_share + airport_2_market_factor = airport_2_vis_per_share + airport_3_market_factor = airport_3_vis_per_share + airport_1_dur = airport_1_dur_vis_per + airport_2_dur = airport_1_dur_vis_per + airport_3_dur = airport_1_dur_vis_per + + elseif (@segment@ = 4) + token_segment = 'vis_bus' + party_size=1 + c_ivt = c_ivt_vis_bus + c_cst = c_cst_vis_bus + c_xfr = c_xfr_vis_bus + asc_pud = asc_pud_vis_bus + asc_sht = asc_sht_vis_bus + asc_lgt = asc_lgt_vis_bus + asc_off = asc_off_vis_bus + asc_rnt = asc_rnt_vis_bus + asc_txi = asc_txi_vis_bus + asc_tnc = asc_tnc_vis_bus + asc_lmo = asc_lmo_vis_bus + asc_srv = asc_srv_vis_bus + asc_trn = asc_trn_vis_bus + asc_osb = asc_osb_vis_bus + asc_bag = asc_bag_vis_bus + asc_pty = asc_pty_vis_bus + c_cst_aam = c_cst_aam_vis_bus + c_rel_aam = c_rel_aam_vis_bus + c_dst_aam = c_dst_aam_vis_bus + c_inc_aam = c_inc_aam_vis_bus + asc_aam = asc_aam_vis_bus + asc_bus_aam = asc_bus_aam_vis_bus + asc_air_aam = asc_air_aam_vis_bus + asc_aut_aam = asc_aut_aam_vis_bus + asc_rem_aam = asc_rem_aam_vis_bus + inc_aam = inc_aam_vis_bus + airport_1_market_factor = airport_1_vis_bus_share + airport_2_market_factor = airport_2_vis_bus_share + airport_3_market_factor = airport_3_vis_bus_share + airport_1_dur = airport_1_dur_vis_bus + airport_2_dur = airport_1_dur_vis_bus + airport_3_dur = airport_1_dur_vis_bus + endif + + jloop + + if ((i = airport_1_taz) | (i = airport_2_taz) | (i = airport_3_taz)) + direction = 'from_airport' + elseif ((j = airport_1_taz) | (j = airport_2_taz) | (j = airport_3_taz)) + direction = 'to_airport' + else + continue + endif + + if ((i = airport_1_taz) | (j = airport_1_taz)) + shtcph = airport_1_shtcph + lngcpd = airport_1_lngcpd + offcpd = airport_1_offcpd + dur = airport_1_dur + trips = airport_1_passengers * airport_1_market_factor * per_pct * mi.1.airport1pct[J] + + elseif ((i = airport_2_taz) | (j = airport_2_taz)) + shtcph = airport_2_shtcph + lngcpd = airport_2_lngcpd + offcpd = airport_2_offcpd + market_factor = airport_2_market_factor + dur = airport_2_dur + passengers = airport_2_passengers + trips = airport_2_passengers * airport_2_market_factor * per_pct * mi.1.airport2pct[J] + + elseif ((i = airport_3_taz) | (j = airport_3_taz)) + shtcph = airport_3_shtcph + lngcpd = airport_3_lngcpd + offcpd = airport_3_offcpd + market_factor = airport_3_market_factor + dur = airport_3_dur + passengers = airport_3_passengers + trips = airport_3_passengers * airport_3_market_factor * per_pct * mi.1.airport3pct[J] + + endif + + u_dant_noaoc = -999 + u_datl_noaoc = -999 + u_s2nt_noaoc = -999 + u_s2tl_noaoc = -999 + u_tran = -999 + u_pudo = -999 + u_shtp = -999 + u_lngp = -999 + u_offp = -999 + u_rent = -999 + u_taxi = -999 + u_tnc = -999 + u_limo = -999 + u_shrv = -999 + u_othb = -999 + + u_dant_noaoc = c_ivt * mi.2.TIMEDA[j] + c_cst * cpi_factor * mi.2.BTOLLDA[j]/100 + + if ( mi.2.TOLLVTOLLDA[j] > 0) + u_datl_noaoc = c_ivt * mi.2.TOLLTIMEDA[j] + c_cst * cpi_factor * (mi.2.TOLLBTOLLDA[j] + mi.2.TOLLVTOLLDA)/100 + else + u_datl_noaoc = -999 + endif + + u_s2nt_noaoc = c_ivt * mi.3.TIMES2[j] + c_cst * cpi_factor * mi.3.BTOLLS2[j]/100 + + if ( mi.3.TOLLVTOLLS2[j] > 0) + u_s2tl_noaoc = c_ivt * mi.3.TOLLTIMES2[j] + c_cst * cpi_factor * (mi.3.TOLLBTOLLS2[j] + mi.3.TOLLVTOLLS2)/100 + else + u_s2tl_noaoc = -999 + endif + + ; compute probability splits between toll and non-toll choices + p_dant = 1.0 + p_datl = 0.0 + + p_s2nt = 1.0 + p_s2tl = 0.0 + + ; calculate toll/non-toll probabilities assuming a nesting coefficient of 0.25 (multiplying utilities by 1/0.25 = 4) + if(u_datl_noaoc > -500) + p_dant = EXP(u_dant_noaoc * 4)/(EXP(u_dant_noaoc * 4) + EXP(u_datl_noaoc * 4)) + p_datl = 1.0 - p_dant + endif + + if(u_s2tl_noaoc > -500) + p_s2nt = EXP(u_s2nt_noaoc * 4)/(EXP(u_s2nt_noaoc *4) + EXP(u_s2tl_noaoc *4)) + p_s2tl = 1.0 - p_s2nt + endif + + ; base transit utility on direction. From airport uses walk-trn-drive, to airport uses drive-transit-walk. Premium mode must be used. + if( direction = 'from_airport') + if((mi.5.ivtLRF[j] + mi.5.ivtHVY[j] + mi.5.ivtCOM[j] + mi.5.ivtAAM[j] ) >0) + + u_tran = c_ivt * (mi.5.ivt[j]/100 + 1.5 *mi.5.iwait[j]/100 + 2.5 * mi.5.xwait[j]/100 + 2.0 * (mi.5.wacc[j] + mi.5.waux[j] + mi.5.wegr[j] + mi.5.dtime[j])/100) + + c_xfr * (mi.5.boards[j] - 1.0) + asc_pty + asc_bag + + ; add AAM utility component if AAM in path + if( mi.5.ivtAAM[j] > 0) + + u_tran = u_tran + c_cst_aam * cpi_factor * (mi.5.fare[j]/100 + round(mi.5.distAAM[j]/100 * AAM.costPerMile)) *POW((mi.2.DISTDA[j]/base_dst),c_dst_aam)*POW((inc_aam/base_inc),c_inc_aam) + + c_rel_aam * AAM.probability.delay * AAM.average.delay + + asc_aut_aam * AAM.autonomous.indicator + + asc_rem_aam * AAM.remote.indicator + + asc_aam + asc_bus_aam + asc_air_aam + else + u_tran = u_tran + c_cst * cpi_factor * mi.5.fare[j]/100 + + endif + endif + else + if((mi.6.ivtLRF[j] + mi.6.ivtHVY[j] + mi.6.ivtCOM[j] + mi.6.ivtAAM[j] ) >0) + + u_tran = c_ivt * (mi.6.ivt[j]/100 + 1.5 *mi.6.iwait[j]/100 + 2.5 * mi.6.xwait[j]/100 + 2.0 * (mi.6.wacc[j] + mi.6.waux[j] + mi.6.wegr[j] + mi.6.dtime[j])/100) + + c_xfr * (mi.5.boards[j] - 1.0) + asc_pty + asc_bag + + ; add AAM utility component if AAM in path + if( mi.6.ivtAAM[j] > 0) + + u_tran = u_tran + c_cst_aam * cpi_factor * (mi.6.fare[j]/100 + round(mi.6.distAAM[j]/100 * AAM.costPerMile)) *POW((mi.2.DISTDA[j]/base_dst),c_dst_aam)*POW((inc_aam/base_inc),c_inc_aam) + + c_rel_aam * AAM.probability.delay * AAM.average.delay + + asc_aut_aam * AAM.autonomous.indicator + + asc_rem_aam * AAM.remote.indicator + + asc_aam + asc_bus_aam + asc_air_aam + else + u_tran = u_tran + c_cst * cpi_factor * mi.6.fare[j]/100 + + endif + endif + endif + + ; pickup/dropoff - use shared ride 2 non-toll OD utility + u_pudo = u_s2nt_noaoc + c_cst * cpi_factor * mi.3.DISTS2[j] * AUTOOPC/100 + asc_pud + + ; short-term parking - use shared ride 2 non-toll OD utility, assume 1 hour duration + u_shtp = u_s2nt_noaoc + c_cst * (cpi_factor * mi.3.DISTS2[j] * AUTOOPC/100 + shtcph * 1.0) + asc_sht + + ; long-term parking - use drive alone non-toll OD utility; assume 15 minutes extra time + u_lngp = u_dant_noaoc + c_ivt * 15.0 + c_cst * (cpi_factor * mi.2.DISTDA[j] * AUTOOPC/100 + lngcpd * dur) + asc_lgt + + ; off-site parking - use drive alone non-toll OD utility; assume 30 minutes extra time + u_offp = u_dant_noaoc + c_ivt * 30.0 + c_cst * (cpi_factor * mi.2.DISTDA[j] * AUTOOPC/100 + offcpd * dur) + asc_off + + ; rental car; don't include AOC since its often included in cost of rental; assume 30 minutes extra time + u_rent = u_dant_noaoc + c_ivt * 30.0 + c_cst * (rental_cpd * dur) + asc_off + + ; taxi; use special cost function + u_taxi = u_s2nt_noaoc + c_cst *(taxi.baseFare + mi.3.DISTS2[j] * taxi.costPerMile + + mi.3.TIMES2[j] * taxi.costPerMinute ) + asc_txi + + ; tnc; use special cost function + u_tnc = u_s2nt_noaoc + c_cst * MAX((TNC.single.baseFare + mi.3.DISTS2[j] * TNC.single.costPerMile + + mi.3.TIMES2[j] * TNC.single.costPerMinute ), TNC.single.costMinimum) + asc_tnc + + ; limo; use special cost function, assume 20% higher cost for limo + u_limo = u_s2nt_noaoc + c_cst *(taxi.baseFare + mi.3.DISTS2[j] * taxi.costPerMile + + mi.3.TIMES2[j] * taxi.costPerMinute )*1.2 + asc_lmo + + ; shared-ride van; assume 30 minute extra time + u_shrv = u_s2nt_noaoc + c_ivt * 30.0 + c_cst * sharedvan_cost + asc_srv + + ; other scheduled bus. Not sure what to make utility. setting to -999 + u_othb = -999 + + ;exponentiated utilities! + e_tran = 0.0 + e_pudo = 0.0 + e_shtp = 0.0 + e_lngp = 0.0 + e_offp = 0.0 + e_rent = 0.0 + e_taxi = 0.0 + e_tnc = 0.0 + e_limo = 0.0 + e_shrv = 0.0 + e_othb = 0.0 + + if(u_tran > -500) + e_tran = EXP(u_tran) + endif + + if(u_pudo > -500) + e_pudo = EXP(u_pudo) + endif + + if(u_shtp > -500) + e_shtp = EXP(u_shtp) + endif + + if(u_lngp > -500) + e_lngp = EXP(u_lngp) + endif + + if(u_offp > -500) + e_offp = EXP(u_offp) + endif + + if(u_rent > -500) + e_rent = EXP(u_rent) + endif + + if(u_taxi > -500) + e_taxi = EXP(u_taxi) + endif + + if(u_tnc > -500) + e_tnc= EXP(u_tnc) + endif + + if(u_limo > -500) + e_limo = EXP(u_limo) + endif + + if(u_shrv > -500) + e_shrv = EXP(u_shrv) + endif + + if(u_othb > -500) + e_othb = EXP(u_othb) + endif + + sum_exp = e_tran + e_pudo + e_shtp + e_lngp + e_offp + e_rent + e_taxi + e_tnc + e_limo + e_shrv + e_othb + + ;probabilities! + p_tran = e_tran/sum_exp + p_pudo = e_pudo/sum_exp + p_shtp = e_shtp/sum_exp + p_lngp = e_lngp/sum_exp + p_offp = e_offp/sum_exp + p_rent = e_rent/sum_exp + p_taxi = e_taxi/sum_exp + p_tnc = e_tnc/sum_exp + p_limo = e_limo/sum_exp + p_shrv = e_shrv/sum_exp + p_othb = e_othb/sum_exp + + ;check here that they sum to 1.0 + + MW[1][J] = u_tran + MW[2][J] = u_pudo + MW[3][J] = u_shtp + MW[4][J] = u_lngp + MW[5][J] = u_offp + MW[6][J] = u_rent + MW[7][J] = u_taxi + MW[8][J] = u_tnc + MW[9][J] = u_limo + MW[10][J] = u_shrv + MW[11][J] = u_othb + + ;da-nt: person arriving to pickup person or leaving after dropping off; plus short-term, taxi, tnc, limo, shared-ride van, other bus + MW[12][J] = trips * p_dant * (p_pudo + p_shtp + p_taxi + p_tnc + p_limo + p_shrv + p_othb) + + ; same for drive-alone toll + MW[13][J] = trips * p_datl * (p_pudo + p_shtp + p_taxi + p_tnc + p_limo + p_shrv + p_othb) + + ; shared-2 non-toll - pickup/dropoff and short-term get added again, plus taxi, tnc, limo, shrv, other bus + MW[14][J] = trips * p_s2nt * (p_pudo + p_shtp + p_taxi + p_tnc + p_limo + p_shrv + p_othb) + + ; same for shared-2 toll + MW[15][J] = trips * p_s2tl * (p_pudo + p_shtp + p_taxi + p_tnc + p_limo + p_shrv + p_othb) + + ; if partysize is 1, add long-term and offsite parking trips to da modes and rental car + if (party_size=1) + MW[12][J] = MW[12][J] + trips * p_dant * (p_lngp + p_offp + p_rent) + MW[13][J] = MW[13][J] + trips * p_datl * (p_lngp + p_offp + p_rent) + elseif (party_size=2) + MW[14][J] = MW[14][J] + trips * p_s2nt * (p_lngp + p_offp + p_rent) + MW[15][J] = MW[15][J] + trips * p_s2tl * (p_lngp + p_offp + p_rent) + endif + + if ((i = airport_1_taz) | (i = airport_2_taz) | (i = airport_3_taz)) ; from airport: walk-trn-drive + MW[16][J] = trips * p_tran + elseif ((j = airport_1_taz) | (j = airport_2_taz) | (j = airport_3_taz)) ; to airport: drive-trn-walk + MW[17][J] = trips * p_tran + endif + + + endjloop + + endrun + + endloop ; market + + ;collapse markets + run pgm = matrix + + ; input air passenger trips: dant, datl, s2nt, s2tl, trn + filei mati[1] = nonres\tripsAir_@token_period@_res_per.tpp + filei mati[2] = nonres\tripsAir_@token_period@_res_bus.tpp + filei mati[3] = nonres\tripsAir_@token_period@_vis_per.tpp + filei mati[4] = nonres\tripsAir_@token_period@_vis_bus.tpp + + ; write out the time-period trips + fileo mato[1] = nonres\tripsAirTotal_@token_period@.tpp, mo = 1-6, name = dant, datl, s2nt, s2tl, wlk_aam_drv, drv_aam_wlk + + MW[1] = mi.1.dant + mi.2.dant + mi.3.dant + mi.4.dant + MW[2] = mi.1.datl + mi.2.datl + mi.3.datl + mi.4.datl + MW[3] = mi.1.s2nt + mi.2.s2nt + mi.3.s2nt + mi.4.s2nt + MW[4] = mi.1.s2tl + mi.2.s2tl + mi.3.s2tl + mi.4.s2tl + MW[5] = mi.1.wlk_aam_drv + mi.2.wlk_aam_drv + mi.3.wlk_aam_drv + mi.4.wlk_aam_drv + MW[6] = mi.1.drv_aam_wlk + mi.2.drv_aam_wlk + mi.3.drv_aam_wlk + mi.4.drv_aam_wlk + + endrun +endloop ; time period + \ No newline at end of file diff --git a/model-files/scripts/preprocess/CreateFiveHighwayNetworks.job b/model-files/scripts/preprocess/CreateFiveHighwayNetworks.job index 1b1766b8a..0d0d95724 100644 --- a/model-files/scripts/preprocess/CreateFiveHighwayNetworks.job +++ b/model-files/scripts/preprocess/CreateFiveHighwayNetworks.job @@ -214,6 +214,25 @@ loop period = 1, 5 endrun + + ; allow buses on shoulders during AM and PM peak + RUN PGM=network + NETI[2] = hwy\avgload@token_period@.net + LINKI[1]= "hwy\mod_links_BRT.csv", VAR=A,B,_PROJECT(C),_PROJ_BRT_EA,_PROJ_BRT_AM,_PROJ_BRT_MD,_PROJ_BRT_PM,_PROJ_BRT_EV START=(substr(record,1,2)='A,B,') + NETO = hwy\avgload_BRT3@token_period@.net, EXCLUDE=_PROJ_BRT_EA,_PROJ_BRT_AM,_PROJ_BRT_MD,_PROJ_BRT_PM,_PROJ_BRT_EV + + PHASE=LINKMERGE + + IF (LI.1._PROJECT == 'US101_BOS' || LI.1._PROJECT == 'BayAreaForward') + PROJ = LI.1._PROJECT + BRT = LI.1._PROJ_BRT_@token_period@ + ENDIF + + ENDPHASE + + ENDRUN + *copy /y hwy\avgload_BRT3@token_period@.net hwy\avgload@token_period@.net + endloop ; token_period diff --git a/model-files/scripts/preprocess/RuntimeConfiguration.py b/model-files/scripts/preprocess/RuntimeConfiguration.py index 10deaff05..256bf721e 100644 --- a/model-files/scripts/preprocess/RuntimeConfiguration.py +++ b/model-files/scripts/preprocess/RuntimeConfiguration.py @@ -571,7 +571,7 @@ def config_distribution(replacements): shutil.copy2(os.path.join("CTRAMP","scripts","block","HwyIntraStep_64.block"), os.path.join("CTRAMP","scripts","block","HwyIntraStep.block")) - elif hostname in ['MODEL2-A','MODEL2-B','MODEL2-C','MODEL2-D','PORMDLPPW01','PORMDLPPW02'] or hostname.startswith("WIN-"): + elif hostname in ['MODEL2-A','MODEL2-B','MODEL2-C','MODEL2-D','PORMDLPPW01','PORMDLPPW02','WRJMDLPPW05','WRJMDLPPW06','WRJMDLPPW07','WRJMDLPPW08'] or hostname.startswith("WIN-"): # accessibilities: 48 logical processors filepath = os.path.join("CTRAMP","runtime","accessibilities.properties") replacements[filepath]["(\nnum.acc.threads[ \t]*=[ \t]*)(\S*)"] = r"\g<1>48" diff --git a/model-files/scripts/skims/BuildTransitNetworks.job b/model-files/scripts/skims/BuildTransitNetworks.job index e61d719ef..629f230c1 100644 --- a/model-files/scripts/skims/BuildTransitNetworks.job +++ b/model-files/scripts/skims/BuildTransitNetworks.job @@ -1,7 +1,7 @@ ; ---------------------------------------------------------------------------------------------------------------- ; ; BuildTransitNetworks.job -; +; RSG 2022-01-21 TM1.5 add advanced air mobility mode ; A TP+ script that creates transit support links in five acts, namely: (1) in the first step, walk access links ; are generated connecting zone centroids to bus stops (on the highway network) and walk access funnel links for ; transit-only infrastructure; (2) in the second step, drive access links are generated connecting zone centroids @@ -26,7 +26,8 @@ ; (100) through (109) ferry service, coded by provider; ; (110) through (119) light rail, coded by provider; ; (120) through (129) heavy rail, coded by provider; -; (130) through (139) commuter rail, coded by provider. +; (130) through (139) commuter rail, coded by provider; +; (140) advanced air mobility. ; ; Input: (1) A transit background network that contains all the walk access funnel links; ; (2) A transit background network that contains all the transfer nodes; @@ -114,11 +115,11 @@ loop period = 1, 5 select accessmodes = 1 ; generate zone access links - ; recall we have 9 support modes, 70 local bus modes, 20 express bus, 10 lrt, 10 ferry, 10 heavy rail, and 10 commuter rail + ; recall we have 9 support modes, 70 local bus modes, 20 express bus, 10 lrt, 10 ferry, 10 heavy rail, 10 commuter rail, and 1 advanced air mobility zoneaccess generate = true, ; allow up to 10 access links per mode - maxstops = 9*10, 70*10, 20*10, 20*10, 10*10, 10*10, + maxstops = 9*10, 70*10, 20*10, 20*10, 10*10, 10*10, 1*10, ; build links from zone to transit node (code 1) direction = 1, @@ -127,7 +128,7 @@ loop period = 1, 5 maxlinks = 30, ; set the maximum distance to be .75 miles, 1.1 miles for express bus and above - maxdist = 9*75, 70*75, 20*110, 20*110, 10*110, 10*110, + maxdist = 9*75, 70*75, 20*110, 20*110, 10*110, 10*110, 1*110, ; generate walk access or mode 1 links mode = 1 @@ -195,6 +196,7 @@ loop period = 1, 5 read file = "%MODEL_DIR%\trn\transitLines_ferry.pnr" read file = "%MODEL_DIR%\trn\transitLines_heavy_rail.pnr" read file = "%MODEL_DIR%\trn\transitLines_commuter_rail.pnr" + read file = "%MODEL_DIR%\trn\transitLines_advanced_air_mobility.pnr" ; trnbuild requires that we read in some transit lines, though we're building ; drive access links to funnel nodes, so no reading of lines are necessary @@ -255,9 +257,9 @@ loop period = 1, 5 zoneaccess generate = n ; generate transfer links - ; recall we have 9 support modes, 70 local bus modes, 20 express bus, 10 lrt, 10 ferry, 10 heavy rail, and 10 commuter rail + ; recall we have 9 support modes, 70 local bus modes, 20 express bus, 10 lrt, 10 ferry, 10 heavy rail, 10 commuter rail, and 1 advanced air mobility ; set the maximum distance to be .75 miles - xfergen mode = 3, maxdist = 9*75, 70*75, 20*75, 20*75, 10*75, 10*75 + xfergen mode = 3, maxdist = 9*75, 70*75, 20*75, 20*75, 10*75, 10*75, 1*75 ; read in walk/drive access and walk egress link files created in the preceeding steps in their script read file = @token_period@_walk_acclinks.dat @@ -277,6 +279,7 @@ loop period = 1, 5 *gawk -f "%MODEL_DIR%\ctramp\scripts\skims\select_pnrs.awk" -v type=ferry -v period=@token_period@ @token_period@_transit_suplinks.dat > @token_period@_transit_suplinks_ferry.dat *gawk -f "%MODEL_DIR%\ctramp\scripts\skims\select_pnrs.awk" -v type=heavy_rail -v period=@token_period@ @token_period@_transit_suplinks.dat > @token_period@_transit_suplinks_heavy_rail.dat *gawk -f "%MODEL_DIR%\ctramp\scripts\skims\select_pnrs.awk" -v type=commuter_rail -v period=@token_period@ @token_period@_transit_suplinks.dat > @token_period@_transit_suplinks_commuter_rail.dat + *gawk -f "%MODEL_DIR%\ctramp\scripts\skims\select_pnrs.awk" -v type=advanced_air_mobility -v period=@token_period@ @token_period@_transit_suplinks.dat > @token_period@_transit_suplinks_advanced_air_mobility.dat ; step 6: create KNR access links for local bus from walk access links *gawk -f "%MODEL_DIR%\ctramp\scripts\skims\createLocalBusKNRs.awk" @token_period@_transit_suplinks_walk.dat > @token_period@_bus_acclinks_KNR.dat diff --git a/model-files/scripts/skims/CreateNonMotorizedNetwork.job b/model-files/scripts/skims/CreateNonMotorizedNetwork.job index 6f9083095..887aa45a3 100644 --- a/model-files/scripts/skims/CreateNonMotorizedNetwork.job +++ b/model-files/scripts/skims/CreateNonMotorizedNetwork.job @@ -172,5 +172,43 @@ run pgm = hwynet if (a = 6973 & b = 2784 ) WALKOK = 1 if (a = 2784 & b = 2802 ) WALKOK = 1 if (a = 2802 & b = 2787 ) WALKOK = 1 - + + ; allow bicycle access on San Rafael Bridge WB (opening year: 2024) + if ( a = 2359 & b= 2360 ) BIKEOK = 1 + if ( a = 2360 & b= 2247 ) BIKEOK = 1 + if ( a = 2374 & b= 2247 ) BIKEOK = 1 + if ( a = 2247 & b= 2477 ) BIKEOK = 1 + if ( a = 2477 & b= 2242 ) BIKEOK = 1 + if ( a = 2242 & b= 2358 ) BIKEOK = 1 + if ( a = 2358 & b= 2342 ) BIKEOK = 1 + if ( a = 2342 & b= 7894 ) BIKEOK = 1 + if ( a = 7894 & b= 7854 ) BIKEOK = 1 + + ; allow walk access on San Rafael Bridge WB (opening year: 2024) + if ( a = 2359 & b= 2360 ) WALKOK = 1 + if ( a = 2360 & b= 2247 ) WALKOK = 1 + if ( a = 2374 & b= 2247 ) WALKOK = 1 + if ( a = 2247 & b= 2477 ) WALKOK = 1 + if ( a = 2477 & b= 2242 ) WALKOK = 1 + if ( a = 2242 & b= 2358 ) WALKOK = 1 + if ( a = 2358 & b= 2342 ) WALKOK = 1 + if ( a = 2342 & b= 7894 ) WALKOK = 1 + if ( a = 7894 & b= 7854 ) WALKOK = 1 + + ; allow bicycle access on San Rafael Bridge EB (opening year: 2024) + if ( a = 7854 & b= 7853 ) BIKEOK = 1 + if ( a = 7853 & b= 2341 ) BIKEOK = 1 + if ( a = 2341 & b= 2357 ) BIKEOK = 1 + if ( a = 2357 & b= 2356 ) BIKEOK = 1 + if ( a = 2356 & b= 2375 ) BIKEOK = 1 + if ( a = 2375 & b= 2474 ) BIKEOK = 1 + + ; allow walk access on San Rafael Bridge EB (opening year: 2024) + if ( a = 7854 & b= 7853 ) WALKOK = 1 + if ( a = 7853 & b= 2341 ) WALKOK = 1 + if ( a = 2341 & b= 2357 ) WALKOK = 1 + if ( a = 2357 & b= 2356 ) WALKOK = 1 + if ( a = 2356 & b= 2375 ) WALKOK = 1 + if ( a = 2375 & b= 2474 ) WALKOK = 1 + endrun diff --git a/model-files/scripts/skims/Select_PNRs.awk b/model-files/scripts/skims/Select_PNRs.awk index 99c38ece7..dfd227a25 100644 --- a/model-files/scripts/skims/Select_PNRs.awk +++ b/model-files/scripts/skims/Select_PNRs.awk @@ -1,4 +1,5 @@ -# usage: gawk -f Select_PNRs.awk [-v type=express_bus|light_rail|ferry|heavy_rail|commuter_rail|all|walk] [-v period=EA|AM|MD|PM|EV] XX_Transit_suplinks.dat > XX_Transit_suplinks_MOD.dat +# RSG 2022-01-21 TM1.5 add advanced air mobility mode +# usage: gawk -f Select_PNRs.awk [-v type=express_bus|light_rail|ferry|heavy_rail|commuter_rail|advanced_air_mobility|all|walk] [-v period=EA|AM|MD|PM|EV] XX_Transit_suplinks.dat > XX_Transit_suplinks_MOD.dat # default type: walk BEGIN{ @@ -20,6 +21,9 @@ BEGIN{ if (type=="commuter_rail" || type=="all") { pnrFiles["../transitLines_commuter_rail.pnr"] = 1 } + if (type=="advanced_air_mobility" || type=="all") { + pnrFiles["../transitLines_advanced_air_mobility.pnr"] = 1 + } if (type=="walk") { # keep all walk links } diff --git a/model-files/scripts/skims/TransitSkims.job b/model-files/scripts/skims/TransitSkims.job index 9f7853cf0..487215e4a 100644 --- a/model-files/scripts/skims/TransitSkims.job +++ b/model-files/scripts/skims/TransitSkims.job @@ -1,25 +1,26 @@ ; ---------------------------------------------------------------------------------------------------------------- ; ; TransitSkims.job -; -; TP+ script to create transit skim tables for five time periods, three access/egress combinations, and six line- +; RSG 2022-01-21 TM1.5 add advanced air mobility mode +; TP+ script to create transit skim tables for five time periods, three access/egress combinations, and seven line- ; haul mode combinations. The script first loops through the five time periods, which are: (a) early AM, before ; 6 am; (b) AM peak period, 6 am to 10 am; (c) midday, 10 am to 3 pm; (d) PM peak period, 3 pm to 7 pm; and, (e) ; evening, after 7 pm. Next the script loops through three access/egress combinations, which are: -; walk/transit/walk; drive/transit/walk; and walk/transit/drive. Next, the script loops through six line-haul -; mode combinations, which are: (a) long-haul premium or commuter rail; (b) medium-haul premium or heavy rail -; (BART) (c) medium-haul basic or express bus; (d) short-haul premium or light rail; (e) short-haul basic -; or local bus; and, (f) a generic transit path used to calculate accessibility that does not weight specific modes -; in an effort to create different, reasonable travel choices. +; walk/transit/walk; drive/transit/walk; and walk/transit/drive. Next, the script loops through seven line-haul +; mode combinations, which are: (a) long-haul advanced air mobility; (b) long-haul premium or commuter rail; +; (c) medium-haul premium or heavy rail (BART) (d) medium-haul basic or express bus; (e) short-haul premium or +; light rail; (f) short-haul basic or local bus; and, (g) a generic transit path used to calculate accessibility +; that does not weight specific modes in an effort to create different, reasonable travel choices. ; ; Please note that ferry is included in the short-haul premium or light rail line-haul options. This was done to ; reduce the number of skims that need to be created. Because light rail and ferry do not compete with each other, ; travelers in corridors with light rail are presented with the light rail choice and travelers in corridors with ; ferry are presented with the ferry choice. ; -; The hierarchy used to create transit path options is as follows: (1) long-haul premium; (2) medium-haul premium; -; (3) medium-haul basic; (4) short-haul premium; and, (5) short-haul basic. Using more traditional mode names: -; (1) commuter rail; (2) heavy rail; (3) express bus; (4) light rail/ferry; (5) local bus. All modes lower than +; The hierarchy used to create transit path options is as follows: (1) long-haul advanced air mobility; +; (2) long-haul premium; (3) medium-haul premium; (4) medium-haul basic; (5) short-haul premium; and, +; (6) short-haul basic. Using more traditional mode names: (1) advanced air mobility, (2)) commuter rail; +; (3) heavy rail; (4) express bus; (5) light rail/ferry; (6) local bus. All modes lower than ; the line-haul mode are made available when skimming the line-haul mode path, in an effort to create a set of ; reasonable transit paths for the mode choice model to assess for each traveler. ; @@ -38,7 +39,8 @@ ; (100) through (109) ferry service, coded by provider; ; (110) through (119) light rail, coded by provider; ; (120) through (129) heavy rail, coded by provider; -; (130) through (139) commuter rail, coded by provider. +; (130) through (139) commuter rail, coded by provider; +; (140) advanced air mobility. ; ; Input: (1) A highway network with the variable BUS_TIME that represents link bus times; ; (2) A .block file listing all of the origin/destination fare files that contain the o/d fares (transit_faremat.block); @@ -51,7 +53,7 @@ ; is less than plus or minus five minutes (transit_combined_headways.block); ; (9) A .block file containing access- and egress-mode-specific transfer prohibitor tables (transferprohibitors*.block); -; Output: (A) A 16-table skim for each time-of-day, access/egress, and line-haul mode combination, containing the following: +; Output: (A) A 17-table skim for each time-of-day, access/egress, and line-haul mode combination, containing the following: ; (1) Transit in-vehicle time, time (minutes x 100), ivt; ; (2) Initial wait time, time (minutes x 100), iwait; ; (3) Transfer wait time, time (minutes x 100), xwait; @@ -67,7 +69,8 @@ ; (13) Express bus in-vehicle time (modes 80 through 99), time (minutes x 100), ivtEXP; ; (14) Heavy rail in-vehicle time (modes 120 trhough 129), time (minutes x 100), ivtHVY; ; (15) Commuter rail in-vehicle time (modes 130 through 139), time (minutes x 100), ivtCOM, -; (16) Ferry in-vehicle time (modes 100 through 109), time (minutes x 100), ivtFerry. +; (16) Advanced air mobility in-vehicle time (mode 140), time (minutes x 100), ivtAAM, +; (17) Ferry in-vehicle time (modes 100 through 109), time (minutes x 100), ivtFerry, ; ; Notes: (1) Script modified to use a single computer ; @@ -130,19 +133,42 @@ loop period = 1,5 DistributeMultistep processid = "ctramp", processnum = counter, commpath = '%COMMPATH%' ; line haul loop - loop path = 1,6 + loop path = 1,7 - ; commuter rail or long-haul premium + ; advanced air mobility if (path = 1) + token_path = 'aam' + token_ivt = 'ivtAAM' + token_real_path = 'aam' + ; no transit modes are excluded from this path + token_skipmodes = '; do not skip any modes for this path' + + ; mode-specific perceived time factors + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0, 1*1.0' + + ; drive access/egress links to this mode (';' means no) + ; allow higher-class PNRs to be read in case of shared lots + token_drivelinks_express_bus = ';' + token_drivelinks_light_rail = ';' + token_drivelinks_ferry = ';' + token_drivelinks_heavy_rail = ';' + token_drivelinks_commuter_rail = ';' + token_drivelinks_advanced_air_mobility = ' ' + + ; KNR access links to local bus + token_bus_acclinks_KNR = ';' + + elseif (path = 2) token_path = 'com' token_ivt = 'ivtCOM' token_real_path = 'com' ; no transit modes are excluded from this path - token_skipmodes = '; do not skip any modes for this path' + token_skipmodes = 'skipmodes = 140' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.1, 10*1.0, 1*1.5' ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -151,21 +177,22 @@ loop period = 1,5 token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ';' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ';' ; heavy rail or medium-haul premium - elseif (path = 2) + elseif (path = 3) token_path = 'hvy' token_ivt = 'ivtHVY' token_real_path = 'hvy' ; commuter rail excluded from this path - token_skipmodes = 'skipmodes = 130-139' + token_skipmodes = 'skipmodes = 140,130-139' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.0, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.2, 10*1.1, 10*1.1, 10*1.0, 10*1.5, 1*1.5' ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -174,21 +201,22 @@ loop period = 1,5 token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ';' ; express bus or medium-haul basic - elseif (path = 3) + elseif (path = 4) token_path = 'exp' token_ivt = 'ivtEXP' token_real_path = 'exp' ; commuter rail and heavy rail excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139' + token_skipmodes = 'skipmodes = 140,130-139,120-139' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.0, 10*1.5, 10*1.5, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.0, 10*1.5, 10*1.5, 10*1.5, 10*1.5, 1*1.5' ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -197,21 +225,22 @@ loop period = 1,5 token_drivelinks_ferry = ';' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ';' ; light rail (or ferry) or short-haul premium - elseif (path = 4) + elseif (path = 5) token_path = 'lrf' token_ivt = 'ivtLRF' token_real_path = 'lrf' ; commuter rail, heavy rail, and express bus excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139,80-99' + token_skipmodes = 'skipmodes = 140,130-139,120-139,80-99' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.5, 10*1.0, 10*1.0, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.5, 20*1.5, 10*1.0, 10*1.0, 10*1.5, 10*1.5, 1*1.5' ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -220,21 +249,22 @@ loop period = 1,5 token_drivelinks_ferry = ' ' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus token_bus_acclinks_KNR = ';' ; local bus or short-haul basic - elseif (path = 5) + elseif (path = 6) token_path = 'loc' token_ivt = 'ivtLOC' token_real_path = 'loc' ; commuter rail, heavy rail, express bus, light rail, and ferry excluded from this path - token_skipmodes = 'skipmodes = 130-139,120-139,80-99,100-119' + token_skipmodes = 'skipmodes = 140,130-139,120-139,80-99,100-119' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.5, 10*1.5, 10*1.5, 10*1.5, 10*1.5' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.5, 10*1.5, 10*1.5, 10*1.5, 10*1.5, 1*1.5' ; drive access/egress links to this mode (';' means no) ; allow higher-class PNRs to be read in case of shared lots @@ -243,12 +273,13 @@ loop period = 1,5 token_drivelinks_ferry = ' ' token_drivelinks_heavy_rail = ' ' token_drivelinks_commuter_rail = ' ' + token_drivelinks_advanced_air_mobility = ' ' ; KNR access links to local bus - token_bus_acclinks_KNR = ' ' + token_bus_acclinks_KNR = ' ' ; all transit treated equally - elseif (path = 6) + elseif (path = 7) token_path = 'trn' token_ivt = 'ivt' token_real_path = 'com' ; this is necessary since cube doesn't seem to like a reference to a nonexistent matrix, even if it's in an unused else code block @@ -256,8 +287,8 @@ loop period = 1,5 token_skipmodes = '; do not skip any modes for this path' ; mode-specific perceived time factors - ; support loc bus exp bus ferry lt rail hvy rail com rail - token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.0, 10*1.0, 10*1.0, 10*1.0, 10*1.0' + ; support loc bus exp bus ferry lt rail hvy rail com rail air mobility + token_modefac = 'modefac = 9*2.0, 70*1.0, 20*1.0, 10*1.0, 10*1.0, 10*1.0, 10*1.0, 1*1.0' ; KNR access links to local bus token_bus_acclinks_KNR = ' ' @@ -294,6 +325,7 @@ loop period = 1,5 @token_drivelinks_ferry@ read file = @token_period@_transit_suplinks_ferry.dat @token_drivelinks_heavy_rail@ read file = @token_period@_transit_suplinks_heavy_rail.dat @token_drivelinks_commuter_rail@ read file = @token_period@_transit_suplinks_commuter_rail.dat + @token_drivelinks_advanced_air_mobility@ read file = @token_period@_transit_suplinks_advanced_air_mobility.dat ; read in the generated KNR links for local bus @token_bus_acclinks_KNR@ READ FILE = @TOKEN_PERIOD@_BUS_ACCLINKS_KNR.DAT @@ -327,10 +359,10 @@ loop period = 1,5 @token_boardpen@ ; perceived time factors: initial wait time is equivalent to 2.0 minutes of ride time for modes 10 through 255 - factor iwaitfac = 9*0, 130*2.0 + factor iwaitfac = 9*0, 131*2.0 ; perceived time factors: transfer wait time is equivalent to 2.0 minutes of ride time for modes 1 through 255 (xxx why not same as above xxx) - factor xwaitfac = 139*2.0 + factor xwaitfac = 140*2.0 ; perceived time factors: use token_skipmodes to remove modes from the network per the hierarchy @token_skipmodes@ @@ -346,8 +378,8 @@ loop period = 1,5 ; set the desired output matrices name = ivt, iwait, xwait, wait, wacc, waux, wegr, dtime, ddist, fare, boards, - ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtFerry, ivtMUNILoc, ivtMUNIMet, - distLOC, distLRF, distEXP, distHVY, distCOM, distFerry, firstMode, + ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtAAM, ivtFerry, ivtMUNILoc, ivtMUNIMet, + distLOC, distLRF, distEXP, distHVY, distCOM, distAAM, distFerry, firstMode, firstAAMv, lastAAMv, ; in-vehicle time for all transit modes, use TP+ code 1001 mw[1] = time(1001), ; initial wait time, use TP+ code 'iwait' @@ -380,26 +412,34 @@ loop period = 1,5 mw[15] = time(120,121,122,123,124,125,126,127,128,129), ; commuter rail in-vehicle time (modes 130 through 139) mw[16] = time(130,131,132,133,134,135,136,137,138,139), + ; advanced air mobility in-vehicle time (mode 140) + mw[17] = time(140), ; capture the ferry in-vehicle time in order to distinguish between ferry paths and light rail paths in the light rail/ferry choice (modes 100 to 109) - mw[17] = time(100,101,102,103,104,105,106,107,108,109), + mw[18] = time(100,101,102,103,104,105,106,107,108,109), ; muni local time - mw[18] = time(20,21), + mw[19] = time(20,21), ; muni metro time - mw[19] = time(110), + mw[20] = time(110), ; local bus distance (modes 10 through 79) - mw[20] = dist(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79), + mw[21] = dist(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79), ; light rail and/or ferry distance (modes 100 through 119) - mw[21] = dist(100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119), + mw[22] = dist(100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119), ; express bus distance (modes 80 through 99) - mw[22] = dist(80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99), + mw[23] = dist(80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99), ; heavy rail (BART) distance (modes 120 through 129) - mw[23] = dist(120,121,122,123,124,125,126,127,128,129), + mw[24] = dist(120,121,122,123,124,125,126,127,128,129), ; commuter rail distance (modes 130 through 139) - mw[24] = dist(130,131,132,133,134,135,136,137,138,139), + mw[25] = dist(130,131,132,133,134,135,136,137,138,139), + ; advanced air mobility distance (mode 140) + mw[26] = dist(140), ; capture the ferry distance in order to distinguish between ferry paths and light rail paths in the light rail/ferry choice (modes 100 to 109) - mw[25] = dist(100,101,102,103,104,105,106,107,108,109), + mw[27] = dist(100,101,102,103,104,105,106,107,108,109), ; first transit mode - mw[26] = modet1 + mw[28] = modet1, + ; first boarding advanced air mobility vertiport + mw[29] = NODE0(140), + ; first boarding advanced air mobility vertiport + mw[30] = NODEL(140) ; trace a selection of o/d pairs for debugging select trace=(i=@token_debug_origin@ && j=@token_debug_destination@) @@ -414,10 +454,12 @@ loop period = 1,5 FILEI MATI[2]=trnskm@token_period@_@token_access@_@token_path@_@token_egress@.iter@token_trnassigniter@.tpp ; current travel times + FILEI MATI[3]=trnskm@token_period@_@token_access@_@token_path@_@token_egress@.avg.iter@token_prevtrnassigniter@.tpp ; bring in averaged travel times - FILEO MATO[1]=trnskm@token_period@_@token_access@_@token_path@_@token_egress@.avg.iter@token_trnassigniter@.tpp, MO=1-26, + FILEO MATO[1]=trnskm@token_period@_@token_access@_@token_path@_@token_egress@.avg.iter@token_trnassigniter@.tpp, MO=1-30, NAME=ivt, iwait, xwait, wait, wacc, waux, wegr, dtime, ddist, fare, boards, - ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtFerry, ivtMUNILoc, ivtMUNIMet, - distLOC, distLRF, distEXP, distHVY, distCOM, distFerry, firstMode + ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtAAM, ivtFerry, ivtMUNILoc, ivtMUNIMet, + distLOC, distLRF, distEXP, distHVY, distCOM, distAAM, distFerry, firstMode, firstAAMv, lastAAMv + FILEO MATO[2]=trnskm@token_period@_@token_access@_@token_path@_@token_egress@_debug.tpp, MO=12,13,50,51,52,10, + NAME=ivtLOC, ivtLRF, ivtNonLoc, dist, fareOrig, fareNew FILEO PRINTO[1]=PHT_total_trnskm@token_period@_@token_access@_@token_path@_@token_egress@.csv, APPEND=T @@ -426,7 +468,7 @@ loop period = 1,5 ; @token_path@ is 'trn', even though the else block isn't executing IF ('@token_path@'='trn') IF (I=1) print LIST='WTF3 @token_path@ @token_real_path@' - MW[50] = MI.1.@token_access@_com_@token_egress@ + MI.1.@token_access@_hvy_@token_egress@ + MI.1.@token_access@_exp_@token_egress@ + MI.1.@token_access@_lrf_@token_egress@ + MI.1.@token_access@_loc_@token_egress@ + MW[50] = MI.1.@token_access@_aam_@token_egress@ + MI.1.@token_access@_com_@token_egress@ + MI.1.@token_access@_hvy_@token_egress@ + MI.1.@token_access@_exp_@token_egress@ + MI.1.@token_access@_lrf_@token_egress@ + MI.1.@token_access@_loc_@token_egress@ ELSE IF (I=1) print LIST='WTF4 @token_path@ @token_real_path@' MW[50] = MI.1.@token_access@_@token_real_path@_@token_egress@ @@ -452,16 +494,20 @@ loop period = 1,5 MW[14] =(MI.2.ivtEXP *LAMBDA)+((1-LAMBDA)*MI.3.ivtEXP ) MW[15] =(MI.2.ivtHVY *LAMBDA)+((1-LAMBDA)*MI.3.ivtHVY ) MW[16] =(MI.2.ivtCOM *LAMBDA)+((1-LAMBDA)*MI.3.ivtCOM ) - MW[17] =(MI.2.ivtFerry *LAMBDA)+((1-LAMBDA)*MI.3.ivtFerry ) - MW[18] =(MI.2.ivtMUNILoc*LAMBDA)+((1-LAMBDA)*MI.3.ivtMUNILoc) - MW[19] =(MI.2.ivtMUNIMet*LAMBDA)+((1-LAMBDA)*MI.3.ivtMUNIMet) - MW[20] =(MI.2.distLOC *LAMBDA)+((1-LAMBDA)*MI.3.distLOC ) - MW[21] =(MI.2.distLRF *LAMBDA)+((1-LAMBDA)*MI.3.distLRF ) - MW[22] =(MI.2.distEXP *LAMBDA)+((1-LAMBDA)*MI.3.distEXP ) - MW[23] =(MI.2.distHVY *LAMBDA)+((1-LAMBDA)*MI.3.distHVY ) - MW[24] =(MI.2.distCOM *LAMBDA)+((1-LAMBDA)*MI.3.distCOM ) - MW[25] =(MI.2.distFerry *LAMBDA)+((1-LAMBDA)*MI.3.distFerry ) - MW[26] =(MI.2.firstMode *LAMBDA)+((1-LAMBDA)*MI.3.firstMode ) + MW[17] =(MI.2.ivtAAM *LAMBDA)+((1-LAMBDA)*MI.3.ivtAAM ) + MW[18] =(MI.2.ivtFerry *LAMBDA)+((1-LAMBDA)*MI.3.ivtFerry ) + MW[19] =(MI.2.ivtMUNILoc*LAMBDA)+((1-LAMBDA)*MI.3.ivtMUNILoc) + MW[20] =(MI.2.ivtMUNIMet*LAMBDA)+((1-LAMBDA)*MI.3.ivtMUNIMet) + MW[21] =(MI.2.distLOC *LAMBDA)+((1-LAMBDA)*MI.3.distLOC ) + MW[22] =(MI.2.distLRF *LAMBDA)+((1-LAMBDA)*MI.3.distLRF ) + MW[23] =(MI.2.distEXP *LAMBDA)+((1-LAMBDA)*MI.3.distEXP ) + MW[24] =(MI.2.distHVY *LAMBDA)+((1-LAMBDA)*MI.3.distHVY ) + MW[25] =(MI.2.distCOM *LAMBDA)+((1-LAMBDA)*MI.3.distCOM ) + MW[26] =(MI.2.distAAM *LAMBDA)+((1-LAMBDA)*MI.3.distAAM ) + MW[27] =(MI.2.distFerry *LAMBDA)+((1-LAMBDA)*MI.3.distFerry ) + MW[28] =(MI.2.firstMode *LAMBDA)+((1-LAMBDA)*MI.3.firstMode ) + MW[29] =(MI.2.firstAAMv *LAMBDA)+((1-LAMBDA)*MI.3.firstAAMv ) + MW[30] =(MI.2.lastAAMv *LAMBDA)+((1-LAMBDA)*MI.3.lastAAMv ) _BOTH = _BOTH+1 ELSEIF (MI.2.@token_ivt@>0) MW[1 ] =MI.2.ivt @@ -480,16 +526,20 @@ loop period = 1,5 MW[14] =MI.2.ivtEXP MW[15] =MI.2.ivtHVY MW[16] =MI.2.ivtCOM - MW[17] =MI.2.ivtFerry - MW[18] =MI.2.ivtMUNILoc - MW[19] =MI.2.ivtMUNIMet - MW[20] =MI.2.distLOC - MW[21] =MI.2.distLRF - MW[22] =MI.2.distEXP - MW[23] =MI.2.distHVY - MW[24] =MI.2.distCOM - MW[25] =MI.2.distFerry - MW[26] =MI.2.firstMode + MW[17] =MI.2.ivtAAM + MW[18] =MI.2.ivtFerry + MW[19] =MI.2.ivtMUNILoc + MW[20] =MI.2.ivtMUNIMet + MW[21] =MI.2.distLOC + MW[22] =MI.2.distLRF + MW[23] =MI.2.distEXP + MW[24] =MI.2.distHVY + MW[25] =MI.2.distCOM + MW[26] =MI.2.distAAM + MW[27] =MI.2.distFerry + MW[28] =MI.2.firstMode + MW[29] =MI.2.firstAAMv + MW[30] =MI.2.lastAAMv _ITERONLY = _ITERONLY+1 ELSEIF (MI.3.@token_ivt@>0) MW[1 ] =MI.3.ivt @@ -507,20 +557,59 @@ loop period = 1,5 MW[13] =MI.3.ivtLRF MW[14] =MI.3.ivtEXP MW[15] =MI.3.ivtHVY - MW[16] =MI.3.ivtCOM - MW[17] =MI.3.ivtFerry - MW[18] =MI.3.ivtMUNILoc - MW[19] =MI.3.ivtMUNIMet - MW[20] =MI.3.distLOC - MW[21] =MI.3.distLRF - MW[22] =MI.3.distEXP - MW[23] =MI.3.distHVY - MW[24] =MI.3.distCOM - MW[25] =MI.3.distFerry - MW[26] =MI.3.firstMode + MW[16] =MI.3.ivtCOM + MW[17] =MI.3.ivtAAM + MW[18] =MI.3.ivtFerry + MW[19] =MI.3.ivtMUNILoc + MW[20] =MI.3.ivtMUNIMet + MW[21] =MI.3.distLOC + MW[22] =MI.3.distLRF + MW[23] =MI.3.distEXP + MW[24] =MI.3.distHVY + MW[25] =MI.3.distCOM + MW[26] =MI.3.distAAM + MW[27] =MI.3.distFerry + MW[28] =MI.3.firstMode + MW[29] =MI.3.firstAAMv + MW[30] =MI.3.lastAAMv _AVGONLY = _AVGONLY+1 ENDIF - + + ; integrated fares + ; => calculate non-loc non-AAM IVT + MW[50] = MW[18] + MW[14] + MW[15] + MW[16]; ivtFerry + ivtEXP + ivtHVY + ivtCOM + ; => calculate non-AAM dist + MW[51] = MW[21] + MW[22] + MW[23] + MW[24] + MW[25] + ; debug: copy of original fares + MW[52] = MW[10] + + ; local/LRT IVT only => flat fare of $2.50 (2019$) = $1.55 ($2000) + if ((MW[12]+MW[13] > 0) & (MW[50] = 0)) + MW[10] = 155 + ELSEIF ((MW[51] > 0) & (MW[51] <= 1000)) + ; $3.50 (2019$) = $2.17 ($2000) + MW[10] = 217 + ELSEIF ((MW[51] > 1000) & (MW[51] <= 2000)) + ; $4.50 (2019$) = $2.80 ($2000) + MW[10] = 280 + ELSEIF ((MW[51] > 2000) & (MW[51] <= 3000)) + ; $5.50 (2019$) = $3.42 ($2000) + MW[10] = 342 + ELSEIF ((MW[51] > 3000) & (MW[51] <= 4000)) + ; $6.50 (2019$) = $4.04 ($2000) + MW[10] = 404 + ELSEIF ((MW[51] > 4000) & (MW[51] <= 5000)) + ; $7.50 (2019$) = $4.66 ($2000) + MW[10] = 466 + ELSEIF (MW[51] > 5000) + ; $8.50 (2019$) = $5.28 ($2000) + MW[10] = 528 + ENDIF + ; AAM fare removed from Cube; max fare of 32767 (cents) allowed too low to model high AAM fare + ; if(MW[17] > 0) ; ivtAAM + ; MW[10]=round(MW[52] * 0.62) + ; ENDIF + IF (MW[3]>0 && MW[50]>0) ; PMT = Person Minutes Travelled MW[32] = (MI.2.ivt + MI.2.iwait + MI.2.xwait + MI.2.wacc + MI.2.waux + MI.2.wegr + MI.2.dtime)/100.0 ; Total Time (min) @@ -567,7 +656,7 @@ loop period = 1,5 list = ' ', file = @token_debug_filename@.@token_period@.@token_access@.@token_path@.@token_egress@.debug list = ' time access egress path ivt iwait xwait wacc waux wegr dtime ddist fare', - ' boards ivtLOC ivtLRF ivtEXP ivtHVY ivtCOM ivtFerry', + ' boards ivtLOC ivtLRF ivtEXP ivtHVY ivtCOM ivtAAM ivtFerry', file = @token_debug_filename@.@token_period@.@token_access@.@token_path@.@token_egress@.debug list = ' ----- ------- ------- ----- ------- ------- ------- ------- ------- ------- ------- ------- -------', ' ------- ------- ------- ------- ------- ------- --------', @@ -581,7 +670,7 @@ loop period = 1,5 list = ' @token_period@ @token_access@ @token_egress@ @token_path@', mi.1.ivt(8.0), mi.1.iwait(8.0), mi.1.xwait(8.0), mi.1.wacc(8.0), mi.1.waux(8.0), mi.1.wegr(8.0), mi.1.dtime(8.0), mi.1.ddist(8.0), mi.1.fare(8.0), - mi.1.boards(8.0),mi.1.ivtLOC(8.0), mi.1.ivtLRF(8.0), mi.1.ivtEXP(8.0), mi.1.ivtHVY(8.0), mi.1.ivtCOM(8.0), mi.1.ivtFerry(9.0), + mi.1.boards(8.0),mi.1.ivtLOC(8.0), mi.1.ivtLRF(8.0), mi.1.ivtEXP(8.0), mi.1.ivtHVY(8.0), mi.1.ivtCOM(8.0), mi.1.ivtAAM(8.0), mi.1.ivtFerry(9.0), file = @token_debug_filename@.@token_period@.@token_access@.@token_path@.@token_egress@.debug endif endjloop @@ -602,23 +691,23 @@ wait4files files = ctramp1.script.end, ctramp2.script.end, ctramp3.script.end, ; combine all the debug output -* copy @token_debug_filename@.ea.wlk.com.wlk.debug+@token_debug_filename@.ea.wlk.hvy.wlk.debug+@token_debug_filename@.ea.wlk.exp.wlk.debug+@token_debug_filename@.ea.wlk.lrf.wlk.debug+@token_debug_filename@.ea.wlk.loc.wlk.debug+@token_debug_filename@.ea.wlk.trn.wlk.debug @token_debug_filename@.ea.wlk.all.wlk.debug -* copy @token_debug_filename@.am.wlk.com.wlk.debug+@token_debug_filename@.am.wlk.hvy.wlk.debug+@token_debug_filename@.am.wlk.exp.wlk.debug+@token_debug_filename@.am.wlk.lrf.wlk.debug+@token_debug_filename@.am.wlk.loc.wlk.debug+@token_debug_filename@.am.wlk.trn.wlk.debug @token_debug_filename@.am.wlk.all.wlk.debug -* copy @token_debug_filename@.md.wlk.com.wlk.debug+@token_debug_filename@.md.wlk.hvy.wlk.debug+@token_debug_filename@.md.wlk.exp.wlk.debug+@token_debug_filename@.md.wlk.lrf.wlk.debug+@token_debug_filename@.md.wlk.loc.wlk.debug+@token_debug_filename@.md.wlk.trn.wlk.debug @token_debug_filename@.md.wlk.all.wlk.debug -* copy @token_debug_filename@.pm.wlk.com.wlk.debug+@token_debug_filename@.pm.wlk.hvy.wlk.debug+@token_debug_filename@.pm.wlk.exp.wlk.debug+@token_debug_filename@.pm.wlk.lrf.wlk.debug+@token_debug_filename@.pm.wlk.loc.wlk.debug+@token_debug_filename@.pm.wlk.trn.wlk.debug @token_debug_filename@.pm.wlk.all.wlk.debug -* copy @token_debug_filename@.ev.wlk.com.wlk.debug+@token_debug_filename@.ev.wlk.hvy.wlk.debug+@token_debug_filename@.ev.wlk.exp.wlk.debug+@token_debug_filename@.ev.wlk.lrf.wlk.debug+@token_debug_filename@.ev.wlk.loc.wlk.debug+@token_debug_filename@.ev.wlk.trn.wlk.debug @token_debug_filename@.ev.wlk.all.wlk.debug +* copy @token_debug_filename@.ea.wlk.aam.wlk.debug+@token_debug_filename@.ea.wlk.com.wlk.debug+@token_debug_filename@.ea.wlk.hvy.wlk.debug+@token_debug_filename@.ea.wlk.exp.wlk.debug+@token_debug_filename@.ea.wlk.lrf.wlk.debug+@token_debug_filename@.ea.wlk.loc.wlk.debug+@token_debug_filename@.ea.wlk.trn.wlk.debug @token_debug_filename@.ea.wlk.all.wlk.debug +* copy @token_debug_filename@.am.wlk.aam.wlk.debug+@token_debug_filename@.am.wlk.com.wlk.debug+@token_debug_filename@.am.wlk.hvy.wlk.debug+@token_debug_filename@.am.wlk.exp.wlk.debug+@token_debug_filename@.am.wlk.lrf.wlk.debug+@token_debug_filename@.am.wlk.loc.wlk.debug+@token_debug_filename@.am.wlk.trn.wlk.debug @token_debug_filename@.am.wlk.all.wlk.debug +* copy @token_debug_filename@.md.wlk.aam.wlk.debug+@token_debug_filename@.md.wlk.com.wlk.debug+@token_debug_filename@.md.wlk.hvy.wlk.debug+@token_debug_filename@.md.wlk.exp.wlk.debug+@token_debug_filename@.md.wlk.lrf.wlk.debug+@token_debug_filename@.md.wlk.loc.wlk.debug+@token_debug_filename@.md.wlk.trn.wlk.debug @token_debug_filename@.md.wlk.all.wlk.debug +* copy @token_debug_filename@.pm.wlk.aam.wlk.debug+@token_debug_filename@.pm.wlk.com.wlk.debug+@token_debug_filename@.pm.wlk.hvy.wlk.debug+@token_debug_filename@.pm.wlk.exp.wlk.debug+@token_debug_filename@.pm.wlk.lrf.wlk.debug+@token_debug_filename@.pm.wlk.loc.wlk.debug+@token_debug_filename@.pm.wlk.trn.wlk.debug @token_debug_filename@.pm.wlk.all.wlk.debug +* copy @token_debug_filename@.ev.wlk.aam.wlk.debug+@token_debug_filename@.ev.wlk.com.wlk.debug+@token_debug_filename@.ev.wlk.hvy.wlk.debug+@token_debug_filename@.ev.wlk.exp.wlk.debug+@token_debug_filename@.ev.wlk.lrf.wlk.debug+@token_debug_filename@.ev.wlk.loc.wlk.debug+@token_debug_filename@.ev.wlk.trn.wlk.debug @token_debug_filename@.ev.wlk.all.wlk.debug -* copy @token_debug_filename@.ea.wlk.com.drv.debug+@token_debug_filename@.ea.wlk.hvy.drv.debug+@token_debug_filename@.ea.wlk.exp.drv.debug+@token_debug_filename@.ea.wlk.lrf.drv.debug+@token_debug_filename@.ea.wlk.loc.drv.debug+@token_debug_filename@.ea.wlk.trn.drv.debug @token_debug_filename@.ea.wlk.all.drv.debug -* copy @token_debug_filename@.am.wlk.com.drv.debug+@token_debug_filename@.am.wlk.hvy.drv.debug+@token_debug_filename@.am.wlk.exp.drv.debug+@token_debug_filename@.am.wlk.lrf.drv.debug+@token_debug_filename@.am.wlk.loc.drv.debug+@token_debug_filename@.am.wlk.trn.drv.debug @token_debug_filename@.am.wlk.all.drv.debug -* copy @token_debug_filename@.md.wlk.com.drv.debug+@token_debug_filename@.md.wlk.hvy.drv.debug+@token_debug_filename@.md.wlk.exp.drv.debug+@token_debug_filename@.md.wlk.lrf.drv.debug+@token_debug_filename@.md.wlk.loc.drv.debug+@token_debug_filename@.md.wlk.trn.drv.debug @token_debug_filename@.md.wlk.all.drv.debug -* copy @token_debug_filename@.pm.wlk.com.drv.debug+@token_debug_filename@.pm.wlk.hvy.drv.debug+@token_debug_filename@.pm.wlk.exp.drv.debug+@token_debug_filename@.pm.wlk.lrf.drv.debug+@token_debug_filename@.pm.wlk.loc.drv.debug+@token_debug_filename@.pm.wlk.trn.drv.debug @token_debug_filename@.pm.wlk.all.drv.debug -* copy @token_debug_filename@.ev.wlk.com.drv.debug+@token_debug_filename@.ev.wlk.hvy.drv.debug+@token_debug_filename@.ev.wlk.exp.drv.debug+@token_debug_filename@.ev.wlk.lrf.drv.debug+@token_debug_filename@.ev.wlk.loc.drv.debug+@token_debug_filename@.ev.wlk.trn.drv.debug @token_debug_filename@.ev.wlk.all.drv.debug +* copy @token_debug_filename@.ea.wlk.aam.drv.debug+@token_debug_filename@.ea.wlk.com.drv.debug+@token_debug_filename@.ea.wlk.hvy.drv.debug+@token_debug_filename@.ea.wlk.exp.drv.debug+@token_debug_filename@.ea.wlk.lrf.drv.debug+@token_debug_filename@.ea.wlk.loc.drv.debug+@token_debug_filename@.ea.wlk.trn.drv.debug @token_debug_filename@.ea.wlk.all.drv.debug +* copy @token_debug_filename@.am.wlk.aam.drv.debug+@token_debug_filename@.am.wlk.com.drv.debug+@token_debug_filename@.am.wlk.hvy.drv.debug+@token_debug_filename@.am.wlk.exp.drv.debug+@token_debug_filename@.am.wlk.lrf.drv.debug+@token_debug_filename@.am.wlk.loc.drv.debug+@token_debug_filename@.am.wlk.trn.drv.debug @token_debug_filename@.am.wlk.all.drv.debug +* copy @token_debug_filename@.md.wlk.aam.drv.debug+@token_debug_filename@.md.wlk.com.drv.debug+@token_debug_filename@.md.wlk.hvy.drv.debug+@token_debug_filename@.md.wlk.exp.drv.debug+@token_debug_filename@.md.wlk.lrf.drv.debug+@token_debug_filename@.md.wlk.loc.drv.debug+@token_debug_filename@.md.wlk.trn.drv.debug @token_debug_filename@.md.wlk.all.drv.debug +* copy @token_debug_filename@.pm.wlk.aam.drv.debug+@token_debug_filename@.pm.wlk.com.drv.debug+@token_debug_filename@.pm.wlk.hvy.drv.debug+@token_debug_filename@.pm.wlk.exp.drv.debug+@token_debug_filename@.pm.wlk.lrf.drv.debug+@token_debug_filename@.pm.wlk.loc.drv.debug+@token_debug_filename@.pm.wlk.trn.drv.debug @token_debug_filename@.pm.wlk.all.drv.debug +* copy @token_debug_filename@.ev.wlk.aam.drv.debug+@token_debug_filename@.ev.wlk.com.drv.debug+@token_debug_filename@.ev.wlk.hvy.drv.debug+@token_debug_filename@.ev.wlk.exp.drv.debug+@token_debug_filename@.ev.wlk.lrf.drv.debug+@token_debug_filename@.ev.wlk.loc.drv.debug+@token_debug_filename@.ev.wlk.trn.drv.debug @token_debug_filename@.ev.wlk.all.drv.debug -* copy @token_debug_filename@.ea.drv.com.wlk.debug+@token_debug_filename@.ea.drv.hvy.wlk.debug+@token_debug_filename@.ea.drv.exp.wlk.debug+@token_debug_filename@.ea.drv.lrf.wlk.debug+@token_debug_filename@.ea.drv.loc.wlk.debug+@token_debug_filename@.ea.drv.trn.wlk.debug @token_debug_filename@.ea.drv.all.wlk.debug -* copy @token_debug_filename@.am.drv.com.wlk.debug+@token_debug_filename@.am.drv.hvy.wlk.debug+@token_debug_filename@.am.drv.exp.wlk.debug+@token_debug_filename@.am.drv.lrf.wlk.debug+@token_debug_filename@.am.drv.loc.wlk.debug+@token_debug_filename@.am.drv.trn.wlk.debug @token_debug_filename@.am.drv.all.wlk.debug -* copy @token_debug_filename@.md.drv.com.wlk.debug+@token_debug_filename@.md.drv.hvy.wlk.debug+@token_debug_filename@.md.drv.exp.wlk.debug+@token_debug_filename@.md.drv.lrf.wlk.debug+@token_debug_filename@.md.drv.loc.wlk.debug+@token_debug_filename@.md.drv.trn.wlk.debug @token_debug_filename@.md.drv.all.wlk.debug -* copy @token_debug_filename@.pm.drv.com.wlk.debug+@token_debug_filename@.pm.drv.hvy.wlk.debug+@token_debug_filename@.pm.drv.exp.wlk.debug+@token_debug_filename@.pm.drv.lrf.wlk.debug+@token_debug_filename@.pm.drv.loc.wlk.debug+@token_debug_filename@.pm.drv.trn.wlk.debug @token_debug_filename@.pm.drv.all.wlk.debug -* copy @token_debug_filename@.ev.drv.com.wlk.debug+@token_debug_filename@.ev.drv.hvy.wlk.debug+@token_debug_filename@.ev.drv.exp.wlk.debug+@token_debug_filename@.ev.drv.lrf.wlk.debug+@token_debug_filename@.ev.drv.loc.wlk.debug+@token_debug_filename@.ev.drv.trn.wlk.debug @token_debug_filename@.ev.drv.all.wlk.debug +* copy @token_debug_filename@.ea.drv.aam.wlk.debug+@token_debug_filename@.ea.drv.com.wlk.debug+@token_debug_filename@.ea.drv.hvy.wlk.debug+@token_debug_filename@.ea.drv.exp.wlk.debug+@token_debug_filename@.ea.drv.lrf.wlk.debug+@token_debug_filename@.ea.drv.loc.wlk.debug+@token_debug_filename@.ea.drv.trn.wlk.debug @token_debug_filename@.ea.drv.all.wlk.debug +* copy @token_debug_filename@.am.drv.aam.wlk.debug+@token_debug_filename@.am.drv.com.wlk.debug+@token_debug_filename@.am.drv.hvy.wlk.debug+@token_debug_filename@.am.drv.exp.wlk.debug+@token_debug_filename@.am.drv.lrf.wlk.debug+@token_debug_filename@.am.drv.loc.wlk.debug+@token_debug_filename@.am.drv.trn.wlk.debug @token_debug_filename@.am.drv.all.wlk.debug +* copy @token_debug_filename@.md.drv.aam.wlk.debug+@token_debug_filename@.md.drv.com.wlk.debug+@token_debug_filename@.md.drv.hvy.wlk.debug+@token_debug_filename@.md.drv.exp.wlk.debug+@token_debug_filename@.md.drv.lrf.wlk.debug+@token_debug_filename@.md.drv.loc.wlk.debug+@token_debug_filename@.md.drv.trn.wlk.debug @token_debug_filename@.md.drv.all.wlk.debug +* copy @token_debug_filename@.pm.drv.aam.wlk.debug+@token_debug_filename@.pm.drv.com.wlk.debug+@token_debug_filename@.pm.drv.hvy.wlk.debug+@token_debug_filename@.pm.drv.exp.wlk.debug+@token_debug_filename@.pm.drv.lrf.wlk.debug+@token_debug_filename@.pm.drv.loc.wlk.debug+@token_debug_filename@.pm.drv.trn.wlk.debug @token_debug_filename@.pm.drv.all.wlk.debug +* copy @token_debug_filename@.ev.drv.aam.wlk.debug+@token_debug_filename@.ev.drv.com.wlk.debug+@token_debug_filename@.ev.drv.hvy.wlk.debug+@token_debug_filename@.ev.drv.exp.wlk.debug+@token_debug_filename@.ev.drv.lrf.wlk.debug+@token_debug_filename@.ev.drv.loc.wlk.debug+@token_debug_filename@.ev.drv.trn.wlk.debug @token_debug_filename@.ev.drv.all.wlk.debug * copy @token_debug_filename@.ea.wlk.all.wlk.debug+@token_debug_filename@.am.wlk.all.wlk.debug+@token_debug_filename@.md.wlk.all.wlk.debug+@token_debug_filename@.pm.wlk.all.wlk.debug+@token_debug_filename@.ev.wlk.all.wlk.debug @token_debug_filename@wlk.all.wlk.debug * copy @token_debug_filename@.ea.drv.all.wlk.debug+@token_debug_filename@.am.drv.all.wlk.debug+@token_debug_filename@.md.drv.all.wlk.debug+@token_debug_filename@.pm.drv.all.wlk.debug+@token_debug_filename@.ev.drv.all.wlk.debug @token_debug_filename@drv.all.wlk.debug diff --git a/model-files/scripts/skims/trnAssign.bat b/model-files/scripts/skims/trnAssign.bat index bb818e3a5..4b6acb579 100644 --- a/model-files/scripts/skims/trnAssign.bat +++ b/model-files/scripts/skims/trnAssign.bat @@ -9,14 +9,14 @@ set TRNASSIGNMODE=NORMAL set TOTMAXTRNITERS=30 set MAXPATHTIME=240 set PCT=%% -set PYTHONPATH=%USERPROFILE%\Documents\GitHub\NetworkWrangler;%USERPROFILE%\Documents\GitHub\NetworkWrangler\_static +set PYTHONPATH=E:\Projects\Clients\gm\models\NetworkWrangler;E:\Projects\Clients\gm\models\NetworkWrangler\_static set TRN_ERRORLEVEL=0 :: AverageNetworkVolumes.job uses PREV_ITER=1 for ITER=1 set PREV_TRN_ITER=%PREV_ITER% IF %ITER% EQU 1 SET PREV_TRN_ITER=0 - -set ALLTRIPMODES=wlk_com_wlk drv_com_wlk wlk_com_drv wlk_hvy_wlk drv_hvy_wlk wlk_hvy_drv wlk_lrf_wlk drv_lrf_wlk wlk_lrf_drv wlk_exp_wlk drv_exp_wlk wlk_exp_drv wlk_loc_wlk drv_loc_wlk wlk_loc_drv +:: RSG 2022-01-21 TM1.5 add advanced air mobility mode +set ALLTRIPMODES=wlk_aam_wlk drv_aam_wlk wlk_aam_drv wlk_com_wlk drv_com_wlk wlk_com_drv wlk_hvy_wlk drv_hvy_wlk wlk_hvy_drv wlk_lrf_wlk drv_lrf_wlk wlk_lrf_drv wlk_exp_wlk drv_exp_wlk wlk_exp_drv wlk_loc_wlk drv_loc_wlk wlk_loc_drv set ALLTOURMODES=wlk_trn_wlk drv_trn_wlk wlk_trn_drv IF NOT DEFINED TRNFASTERTHANFREEFLOW (set TRNFASTERTHANFREEFLOW=0) @@ -210,6 +210,7 @@ if %ITER% NEQ %MAXITERATIONS% ( ) ) +:donedone :: copy the latest transit assignment dbf into the parent dir if %ITER% EQU %MAXITERATIONS% ( copy .\%LASTSUBDIR_EA%\trnlinkEA_ALLMSA.dbf .. @@ -219,11 +220,10 @@ if %ITER% EQU %MAXITERATIONS% ( copy .\%LASTSUBDIR_EV%\trnlinkEV_ALLMSA.dbf .. ) -:donedone cd .. cd .. -set PATH=%RUNTIME%;%JAVA_PATH%/bin;%TPP_PATH%;%GAWK_PATH%/bin;%PYTHON_PATH% +set PATH=%RUNTIME%;%JAVA_PATH%\bin;%TPP_PATH%;%GAWK_PATH%\bin;%PYTHON_PATH%\envs\py27tm1;%PYTHON_PATH%\condabin;%PYTHON_PATH%\envs :: pass on errorlevel EXIT /B %TRN_ERRORLEVEL% \ No newline at end of file diff --git a/utilities/RTP/QAQC/Run_QAQC.bat b/utilities/RTP/QAQC/Run_QAQC.bat index 9b2061ed7..6f365db86 100644 --- a/utilities/RTP/QAQC/Run_QAQC.bat +++ b/utilities/RTP/QAQC/Run_QAQC.bat @@ -8,14 +8,13 @@ :: :: --------------------------------- -:: this script assumes that M_DIR is already been set in setupmodel.bat -mkdir "%M_DIR%/OUTPUT/QAQC" +mkdir OUTPUT/QAQC :: --------------------------------- :: check household-owned AV share :: --------------------------------- -set GITHUB_MASTER=\\mainmodel\MainModelShare\travel-model-one-master +set GITHUB_MASTER=E:\Projects\Clients\gm\models\travel-model-one :: assume this script is being run from the directory with the full model run mkdir QAQC @@ -25,8 +24,8 @@ cd main call "%R_HOME%\bin\x64\Rscript.exe" ..\QAQC\Car_ownership_AVHV.R cd .. -copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Car_ownership_summary_2035.xlsx" "%M_DIR%\OUTPUT\QAQC\Car_ownership_summary_2035.xlsx" -copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Car_ownership_summary_2050.xlsx" "%M_DIR%\OUTPUT\QAQC\Car_ownership_summary_2050.xlsx" +copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Car_ownership_summary_2035.xlsx" "OUTPUT\QAQC\Car_ownership_summary_2035.xlsx" +copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Car_ownership_summary_2050.xlsx" "OUTPUT\QAQC\Car_ownership_summary_2050.xlsx" :: --------------------------------- :: check telecommute @@ -34,10 +33,10 @@ copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Car_ownership_summary_2050.xlsx" copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Report_TelecommuteLevel.py" QAQC\Report_TelecommuteLevel.py python QAQC/report_telecommutelevel.py cd QAQC -copy /y "PBA50_QAQC.csv" "%M_DIR%\OUTPUT\QAQC\PBA50_QAQC.csv" +copy /y "PBA50_QAQC.csv" "OUTPUT\QAQC\PBA50_QAQC.csv" cd .. :: --------------------------------- :: check bike mode share :: --------------------------------- -copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Mode_share.twb" "%M_DIR%\OUTPUT\QAQC\Mode_share.twb" \ No newline at end of file +copy /y "%GITHUB_MASTER%\utilities\RTP\QAQC\Mode_share.twb" "OUTPUT\QAQC\Mode_share.twb" \ No newline at end of file diff --git a/utilities/RTP/RunMetrics.bat b/utilities/RTP/RunMetrics.bat index 810ea0b08..066f17431 100644 --- a/utilities/RTP/RunMetrics.bat +++ b/utilities/RTP/RunMetrics.bat @@ -1,7 +1,7 @@ :: :: This batch file runs a series of scripts to convert direct model output :: to intermediate summaries, and then rolls up those summaries into a set of Benefit/Cost metrics. -:: +:: RSG 2022-01-21 TM1.5 add advanced air mobility mode :: Required environment variables: :: * ITER=the iteration corresponding to the output for which we'll calculate metrics. :: This should already be set in RunModel.bat @@ -21,7 +21,7 @@ :: * nonres\tripsIx(EA|AM|MD|PM|EV).tpp :: * nonres\tripsAirPax(EA|AM|MD|PM|EV).tpp :: * nonres\tripstrk(EA|AM|MD|PM|EV).tpp -:: * skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(com|hvy|exp|lrf|loc)_(wlk|drv).tpp +:: * skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(aam|com|hvy|exp|lrf|loc)_(wlk|drv).tpp :: * skims\HWYSKM(EA|AM|MD|PM|EV).tpp :: * skims\COM_HWYSKIM(EA|AM|MD|PM|EV).tpp :: * skims\nonmotskm.tpp @@ -109,7 +109,7 @@ if not exist metrics\transit_times_by_mode_income.csv ( rem main\trips(EA|AM|MD|PM|EV)_no_zpv__2074.tpp, rem main\trips(EA|AM|MD|PM|EV)_no_zpv__2064.tpp, rem main\trips(EA|AM|MD|PM|EV)_no_zpv__2064.tpp, - rem skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(com|hvy|exp|lrf|loc)_(wlk|drv).tpp + rem skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(aam|com|hvy|exp|lrf|loc)_(wlk|drv).tpp rem Output: metrics\transit_times_by_acc_mode_egr.csv, rem metrics\transit_times_by_mode_income.csv runtpp "%CODE_DIR%\sumTransitTimes.job" @@ -141,6 +141,50 @@ if not exist metrics\nonmot_times.csv ( if ERRORLEVEL 2 goto error ) +if not exist metrics\transit_times_by_mode_TOD.csv ( + rem Reads trip tables and skims and outputs tallies for trip attributes + rem Input : main\trips(EA|AM|MD|PM|EV)_no_zpv_allinc.tpp, + rem skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(com|hvy|exp|lrf|loc)_(wlk|drv).tpp + rem Output: metrics\transit_times_by_mode_TOD.csv + runtpp "%CODE_DIR%\sumTransitTimesByTOD.job" + if ERRORLEVEL 2 goto error +) + +if not exist metrics\auto_time_TOD.csv ( + rem Reads trip tables and skims and outputs tallies for trip attributes + rem Input : main\trips(EA|AM|MD|PM|EV)_no_zpv_allinc.tpp + rem skims\HWYSKM(EA|AM|MD|PM|EV).tpp + rem CTRAMP\scripts\block\hwyParam.block + rem Output: metrics\auto_time_TOD.csv + runtpp "%CODE_DIR%\sumAutoTimesByTOD.job" + if ERRORLEVEL 2 goto error +) + +if not exist metrics\nonmot_times_TOD.csv ( + rem Reads trip tables and skims and outputs tallies for trip attributes + rem Input : main\trips(EA|AM|MD|PM|EV).tpp + rem skims\nonmotskm.tpp + rem Output: metrics\nonmot_times_TOD.csv + runtpp "%CODE_DIR%\sumNonMotTimesByTOD.job" + if ERRORLEVEL 2 goto error +) + +if not exist nonres\airport_by_mode_TOD.csv ( + rem Reads trip tables and skims and outputs tallies for trip attributes + rem Input : nonres\tripsAirTotal_(EA|AM|MD|PM|EV).tpp + rem Output: nonres\airport_by_mode_TOD.csv + runtpp "%CODE_DIR%\sumAirportByTOD.job" + if ERRORLEVEL 2 goto error +) + +if not exist skims\DA_MD.csv ( + rem Export to csv to append to trip list + rem Input : skims\DA_MD.tpp + rem Output: skims\DA_MD.csv + runtpp "%CODE_DIR%\export_DA_MD_csv.job" + if ERRORLEVEL 2 goto error +) + if not exist metrics\vmt_vht_metrics.csv ( rem Summarize network links to vmt, vht, and other collision and emissions estimations rem Input: hwy\iter%ITER%\avgload5period_vehclasses.csv @@ -184,8 +228,8 @@ if not exist metrics\topsheet.csv ( call "%R_HOME%\bin\x64\Rscript.exe" "%CODE_DIR%\topsheet.R" ) -if not exist "%ALL_PROJECT_METRICS_DIR%" (mkdir "%ALL_PROJECT_METRICS_DIR%") -python "%CODE_DIR%\RunResults.py" metrics "%ALL_PROJECT_METRICS_DIR%" +::if not exist "%ALL_PROJECT_METRICS_DIR%" (mkdir "%ALL_PROJECT_METRICS_DIR%") +::python "%CODE_DIR%\RunResults.py" metrics "%ALL_PROJECT_METRICS_DIR%" :cleanup move *.PRN logs diff --git a/utilities/RTP/RunScenarioMetrics.bat b/utilities/RTP/RunScenarioMetrics.bat index 24465cb9f..156d0fd12 100644 --- a/utilities/RTP/RunScenarioMetrics.bat +++ b/utilities/RTP/RunScenarioMetrics.bat @@ -1,7 +1,7 @@ :: :: This batch file runs a series of scripts to convert direct model output :: to intermediate summaries, and then rolls up those summaries into a set of SCENARIO metrics. -:: +:: RSG 2022-01-21 TM1.5 add advanced air mobility mode :: It's similar to RunMetrics.bat and uses many of the same scripts :: :: Stamp the feedback report with the date and time of the model start @@ -56,7 +56,7 @@ if not exist main\tripsEVinc1.tpp ( if not exist metrics\transit_times_by_mode_income.csv ( rem Reads trip tables and skims and outputs tallies for trip attributes rem Input : main\trips(EA|AM|MD|PM|EV)allinc.tpp, - rem skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(com|hvy|exp|lrf|loc)_(wlk|drv).tpp + rem skims\trnskm(EA|AM|MD|PM|EV)_(wlk|drv)_(aam|com|hvy|exp|lrf|loc)_(wlk|drv).tpp rem Output: metrics\transit_times_by_acc_mode_egr.csv, rem metrics\transit_times_by_mode_income.csv runtpp "%CODE_DIR%\sumTransitTimes.job" diff --git a/utilities/RTP/metrics/countTrips.py b/utilities/RTP/metrics/countTrips.py index a2880c476..398e5a701 100644 --- a/utilities/RTP/metrics/countTrips.py +++ b/utilities/RTP/metrics/countTrips.py @@ -37,20 +37,21 @@ doing the traveling. Note: this script DOES factor the trips by SAMPLESHARE. + RSG 2022-01-21 TM1.5 add advanced air mobility mode """ # note that there are 32 modes and they are a hybrid of tour modes and those used in assignment # they include all 21 tour and trip modes in here (https://github.com/BayAreaMetro/modeling-website/wiki/TravelModes#tour-and-trip-modes) -# plus 'wlk_loc_drv', 'wlk_lrf_drv', 'wlk_exp_drv', 'wlk_hvy_drv', 'wlk_com_drv' +# plus 'wlk_loc_drv', 'wlk_lrf_drv', 'wlk_exp_drv', 'wlk_hvy_drv', 'wlk_com_drv', 'wlk_aam_drv' # and 'da_av_notoll', 'da_av_toll', 'sr2_av_notoll','sr2_av_toll', 'sr3_av_notoll', 'sr3_av_toll' COLUMNS = ['orig_taz','dest_taz', 'da', 'da_toll', 'sr2', 'sr2_toll', 'sr3', 'sr3_toll', 'walk', 'bike', - 'wlk_loc_wlk', 'wlk_lrf_wlk', 'wlk_exp_wlk', 'wlk_hvy_wlk', 'wlk_com_wlk', - 'drv_loc_wlk', 'drv_lrf_wlk', 'drv_exp_wlk', 'drv_hvy_wlk', 'drv_com_wlk', - 'wlk_loc_drv', 'wlk_lrf_drv', 'wlk_exp_drv', 'wlk_hvy_drv', 'wlk_com_drv', + 'wlk_loc_wlk', 'wlk_lrf_wlk', 'wlk_exp_wlk', 'wlk_hvy_wlk', 'wlk_com_wlk', 'wlk_aam_wlk', + 'drv_loc_wlk', 'drv_lrf_wlk', 'drv_exp_wlk', 'drv_hvy_wlk', 'drv_com_wlk', 'drv_aam_wlk', + 'wlk_loc_drv', 'wlk_lrf_drv', 'wlk_exp_drv', 'wlk_hvy_drv', 'wlk_com_drv', 'wlk_aam_drv', 'taxi', 'tnc', 'tnc_shared', 'da_av_notoll', 'da_av_toll', 'sr2_av_notoll', 'sr2_av_toll', 'sr3_av_notoll', 'sr3_av_toll'] @@ -75,18 +76,21 @@ def find_number_of_active_adults(trips_df): active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_exp_wlk', 'active_mode'] = 'wTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_hvy_wlk', 'active_mode'] = 'wTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_com_wlk', 'active_mode'] = 'wTrnW' + active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_aam_wlk', 'active_mode'] = 'wTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_loc_wlk', 'active_mode'] = 'dTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_lrf_wlk', 'active_mode'] = 'dTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_exp_wlk', 'active_mode'] = 'dTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_hvy_wlk', 'active_mode'] = 'dTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_com_wlk', 'active_mode'] = 'dTrnW' + active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='drv_aam_wlk', 'active_mode'] = 'dTrnW' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_loc_drv', 'active_mode'] = 'wTrnD' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_lrf_drv', 'active_mode'] = 'wTrnD' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_exp_drv', 'active_mode'] = 'wTrnD' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_hvy_drv', 'active_mode'] = 'wTrnD' active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_com_drv', 'active_mode'] = 'wTrnD' + active_adult_trips_df.loc[active_adult_trips_df['trip_mode_str']=='wlk_aam_drv', 'active_mode'] = 'wTrnD' active_adult_trips_df.loc[:,'active_minutes'] = 0.0 @@ -248,22 +252,25 @@ def write_trips_by_od(trips_df, by_income_cat, outsuffix): trips_df.loc[(trips_df['trip_mode']==11), 'trip_mode_str'] = 'wlk_exp_wlk' trips_df.loc[(trips_df['trip_mode']==12), 'trip_mode_str'] = 'wlk_hvy_wlk' trips_df.loc[(trips_df['trip_mode']==13), 'trip_mode_str'] = 'wlk_com_wlk' - - trips_df.loc[(trips_df['trip_mode']==14)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_loc_wlk' - trips_df.loc[(trips_df['trip_mode']==15)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_lrf_wlk' - trips_df.loc[(trips_df['trip_mode']==16)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_exp_wlk' - trips_df.loc[(trips_df['trip_mode']==17)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_hvy_wlk' - trips_df.loc[(trips_df['trip_mode']==18)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_com_wlk' - - trips_df.loc[(trips_df['trip_mode']==14)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_loc_drv' - trips_df.loc[(trips_df['trip_mode']==15)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_lrf_drv' - trips_df.loc[(trips_df['trip_mode']==16)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_exp_drv' - trips_df.loc[(trips_df['trip_mode']==17)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_hvy_drv' - trips_df.loc[(trips_df['trip_mode']==18)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_com_drv' - - trips_df.loc[(trips_df['trip_mode']==19), 'trip_mode_str'] = 'taxi' - trips_df.loc[(trips_df['trip_mode']==20), 'trip_mode_str'] = 'tnc' - trips_df.loc[(trips_df['trip_mode']==21), 'trip_mode_str'] = 'tnc_shared' + trips_df.loc[(trips_df['trip_mode']==14), 'trip_mode_str'] = 'wlk_aam_wlk' + + trips_df.loc[(trips_df['trip_mode']==15)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_loc_wlk' + trips_df.loc[(trips_df['trip_mode']==16)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_lrf_wlk' + trips_df.loc[(trips_df['trip_mode']==17)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_exp_wlk' + trips_df.loc[(trips_df['trip_mode']==18)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_hvy_wlk' + trips_df.loc[(trips_df['trip_mode']==19)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_com_wlk' + trips_df.loc[(trips_df['trip_mode']==20)&(trips_df['inbound']==0), 'trip_mode_str'] = 'drv_aam_wlk' + + trips_df.loc[(trips_df['trip_mode']==15)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_loc_drv' + trips_df.loc[(trips_df['trip_mode']==16)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_lrf_drv' + trips_df.loc[(trips_df['trip_mode']==17)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_exp_drv' + trips_df.loc[(trips_df['trip_mode']==18)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_hvy_drv' + trips_df.loc[(trips_df['trip_mode']==19)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_com_drv' + trips_df.loc[(trips_df['trip_mode']==20)&(trips_df['inbound']==1), 'trip_mode_str'] = 'wlk_aam_drv' + + trips_df.loc[(trips_df['trip_mode']==21), 'trip_mode_str'] = 'taxi' + trips_df.loc[(trips_df['trip_mode']==22), 'trip_mode_str'] = 'tnc' + trips_df.loc[(trips_df['trip_mode']==23), 'trip_mode_str'] = 'tnc_shared' trips_df.loc[(trips_df['trip_mode']== 1)&(trips_df['avAvailable']==1), 'trip_mode_str'] = 'da_av_notoll' trips_df.loc[(trips_df['trip_mode']== 2)&(trips_df['avAvailable']==1), 'trip_mode_str'] = 'da_av_toll' diff --git a/utilities/RTP/metrics/prepAssignIncome.job b/utilities/RTP/metrics/prepAssignIncome.job index 72513ef39..31ac26b6c 100644 --- a/utilities/RTP/metrics/prepAssignIncome.job +++ b/utilities/RTP/metrics/prepAssignIncome.job @@ -1,5 +1,5 @@ ; make time-period-specific copies of the individual trip data - +; RSG 2022-01-21 TM1.5 add advanced air mobility mode ; the iteration token_iter = '%ITER%' @@ -47,11 +47,11 @@ filei mati[1] = main\trips@token_period@@suffix@.dat, pattern = ijm:v, fields = #1,2,0,3-35 ; write out a matrix that combines the individual and joint trips - fileo mato[1] = main\trips@token_period@_no_zpv_@suffix@.tpp, mo = 1-32, name = da, datoll, sr2, sr2toll, sr3, sr3toll, + fileo mato[1] = main\trips@token_period@_no_zpv_@suffix@.tpp, mo = 1-35, name = da, datoll, sr2, sr2toll, sr3, sr3toll, walk, bike, - wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, - drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, - wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, + wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, wlk_aam_wlk, + drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, drv_aam_wlk, + wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, wlk_aam_drv, taxi, tnc_single, tnc_shared, da_av_notoll, da_av_toll, s2_av_notoll, s2_av_toll, s3_av_notoll, s3_av_toll zones = @token_zones@ @@ -69,25 +69,28 @@ mw[11] = mi.1.11 ; walk, express bus, walk mw[12] = mi.1.12 ; walk, heavy rail, walk mw[13] = mi.1.13 ; walk, commuter rail, walk - mw[14] = mi.1.14 ; drive, local bus, walk - mw[15] = mi.1.15 ; drive, light rail/ferry, walk - mw[16] = mi.1.16 ; drive, express bus, walk - mw[17] = mi.1.17 ; drive, heavy rail, walk - mw[18] = mi.1.18 ; drive, commuter rail, walk - mw[19] = mi.1.19 ; walk, local bus, drive - mw[20] = mi.1.20 ; walk, light rail/ferry, drive - mw[21] = mi.1.21 ; walk, express bus, drive - mw[22] = mi.1.22 ; walk, heavy rail, drive - mw[23] = mi.1.23 ; walk, commuter rail, drive - mw[24] = mi.1.24 ; taxi - mw[25] = mi.1.25 ; tnc, single-party - mw[26] = mi.1.26 ; tnc, shared - mw[27] = mi.1.27 ; drive alone, av, no toll - mw[28] = mi.1.28 ; drive alone, av, toll - mw[29] = mi.1.29 ; shared ride 2, av, no toll - mw[30] = mi.1.30 ; shared ride 2, av, toll - mw[31] = mi.1.31 ; shared ride 3+, av, no toll - mw[32] = mi.1.32 ; shared ride 3+, av, toll + mw[14] = mi.1.14 ; walk, advanced air mobility, walk + mw[15] = mi.1.15 ; drive, local bus, walk + mw[16] = mi.1.16 ; drive, light rail/ferry, walk + mw[17] = mi.1.17 ; drive, express bus, walk + mw[18] = mi.1.18 ; drive, heavy rail, walk + mw[19] = mi.1.19 ; drive, commuter rail, walk + mw[20] = mi.1.20 ; drive, advanced air mobility, walk + mw[21] = mi.1.21 ; walk, local bus, drive + mw[22] = mi.1.22 ; walk, light rail/ferry, drive + mw[23] = mi.1.23 ; walk, express bus, drive + mw[24] = mi.1.24 ; walk, heavy rail, drive + mw[25] = mi.1.25 ; walk, commuter rail, drive + mw[26] = mi.1.26 ; walk, advanced air mobility, drive + mw[27] = mi.1.27 ; taxi + mw[28] = mi.1.28 ; tnc, single-party + mw[29] = mi.1.29 ; tnc, shared + mw[30] = mi.1.30 ; drive alone, av, no toll + mw[31] = mi.1.31 ; drive alone, av, toll + mw[32] = mi.1.32 ; shared ride 2, av, no toll + mw[33] = mi.1.33 ; shared ride 2, av, toll + mw[34] = mi.1.34 ; shared ride 3+, av, no toll + mw[35] = mi.1.35 ; shared ride 3+, av, toll endrun ; the last part only makes sense for incomes, not age groups @@ -130,11 +133,11 @@ filei mati[4] = main\trips@token_period@_no_zpv_inc4.tpp ; write out a matrix that combines the individual and joint trips for assignment - fileo mato[1] = main\trips@token_period@_no_zpv_allinc.tpp, mo = 1-32, name = da, datoll, sr2, sr2toll, sr3, sr3toll, + fileo mato[1] = main\trips@token_period@_no_zpv_allinc.tpp, mo = 1-35, name = da, datoll, sr2, sr2toll, sr3, sr3toll, walk, bike, - wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, - drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, - wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, + wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, wlk_aam_wlk, + drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, drv_aam_wlk, + wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, wlk_aam_drv, taxi, tnc_single, tnc_shared, da_av_notoll, da_av_toll, sr2_av_notoll, sr2_av_toll, sr3_av_notoll, sr3_av_toll @@ -173,6 +176,9 @@ mw[30] = mi.1.30 + mi.2.30 + mi.3.30 + mi.4.30 mw[31] = mi.1.31 + mi.2.31 + mi.3.31 + mi.4.31 mw[32] = mi.1.32 + mi.2.32 + mi.3.32 + mi.4.32 + mw[33] = mi.1.33 + mi.2.33 + mi.3.33 + mi.4.33 + mw[34] = mi.1.34 + mi.2.34 + mi.3.34 + mi.4.34 + mw[35] = mi.1.35 + mi.2.35 + mi.3.35 + mi.4.35 endrun EndDistributeMultistep diff --git a/utilities/RTP/metrics/sumAutoTimesByTOD.job b/utilities/RTP/metrics/sumAutoTimesByTOD.job new file mode 100644 index 000000000..6dadea668 --- /dev/null +++ b/utilities/RTP/metrics/sumAutoTimesByTOD.job @@ -0,0 +1,254 @@ +;*del metrics\auto_time_TOD.csv + +; Create auto summary based on trips by time period and mode and outputs: +; metrics\auto_time_TOD.csv with columns: +; - Period +; - Mode +; - Total person trips +; - Total vehicle trips +; - Total person travel time in minutes +; - Total vehicle travel time in minutes +; - Total person travel distance in miles +; - Total vehicle travel distance in miles +; - Total travel cost (auto operating cost, including pavement costs and +; NOT including BRIDGE OR VALUE TOLLS) +; in year 2000 cents +; + +; find no access zones +RUN PGM=MATRIX + FILEI MATI[1] = "skims\HWYSKMAM.tpp" + FILEO RECO[1] = "skims\unconnected_zones.dbf", FIELDS=ZONE(5.0), UNCONNECTED(3.0) + + MW[1] = MI.1.DISTDA + IF (ROWMIN(1) == 500000) + RO.ZONE = I + RO.UNCONNECTED = 1 + WRITE RECO=1 + ENDIF +ENDRUN + +; Convert to has access matrix -- all ones if has access +RUN PGM=MATRIX + FILEI ZDATI[1] = "skims\unconnected_zones.dbf" + FILEO MATO[1] = "skims\connected_zones.tpp", MO=1, NAME=CONNECTED + ZONES=1475 + + MW[1] = 1 + IF (ZI.1.UNCONNECTED=1) MW[1] = 0 +ENDRUN + + +; Loop thru Auto modes +loop auto = 1,15 + + if (auto = 1) + token_auto = 'da' + token_time = 'TIMEDA' + token_dist = 'DISTDA' + token_btoll = 'BTOLLDA' + token_vtoll = 'TOLLVTOLLDA' + elseif (auto = 2) + token_auto = 'datoll' + token_time = 'TOLLTIMEDA' + token_dist = 'TOLLDISTDA' + token_btoll = 'TOLLBTOLLDA' + token_vtoll = 'TOLLVTOLLDA' + elseif (auto = 3) + token_auto = 'sr2' + token_time = 'TIMES2' + token_dist = 'DISTS2' + token_btoll = 'BTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 4) + token_auto = 'sr2toll' + token_time = 'TOLLTIMES2' + token_dist = 'TOLLDISTS2' + token_btoll = 'TOLLBTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 5) + token_auto = 'sr3' + token_time = 'TIMES3' + token_dist = 'DISTS3' + token_btoll = 'BTOLLS3' + token_vtoll = 'TOLLVTOLLS3' + elseif (auto = 6) + token_auto = 'sr3toll' + token_time = 'TOLLTIMES3' + token_dist = 'TOLLDISTS3' + token_btoll = 'TOLLBTOLLS3' + token_vtoll = 'TOLLVTOLLS3' + elseif (auto = 7) + token_auto = 'taxi' + token_time = 'TOLLTIMEs2' + token_dist = 'TOLLDISTS2' + token_btoll = 'TOLLBTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 8) + token_auto = 'tnc_single' + token_time = 'TOLLTIMES2' + token_dist = 'TOLLDISTS2' + token_btoll = 'TOLLBTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 9) + token_auto = 'tnc_shared' + token_time = 'TOLLTIMES3' + token_dist = 'TOLLDISTS3' + token_btoll = 'TOLLBTOLLS3' + token_vtoll = 'TOLLVTOLLS3' + elseif (auto = 10) + token_auto = 'da_av_notoll' + token_time = 'TIMEDA' + token_dist = 'DISTDA' + token_btoll = 'BTOLLDA' + token_vtoll = 'TOLLVTOLLDA' + elseif (auto = 11) + token_auto = 'da_av_toll' + token_time = 'TOLLTIMEDA' + token_dist = 'TOLLDISTDA' + token_btoll = 'TOLLBTOLLDA' + token_vtoll = 'TOLLVTOLLDA' + elseif (auto = 12) + token_auto = 'sr2_av_notoll' + token_time = 'TIMES2' + token_dist = 'DISTS2' + token_btoll = 'BTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 13) + token_auto = 'sr2_av_toll' + token_time = 'TOLLTIMES2' + token_dist = 'TOLLDISTS2' + token_btoll = 'TOLLBTOLLS2' + token_vtoll = 'TOLLVTOLLS2' + elseif (auto = 14) + token_auto = 'sr3_av_notoll' + token_time = 'TIMES3' + token_dist = 'DISTS3' + token_btoll = 'BTOLLS3' + token_vtoll = 'TOLLVTOLLS3' + elseif (auto = 15) + token_auto = 'sr3_av_toll' + token_time = 'TOLLTIMES3' + token_dist = 'TOLLDISTS3' + token_btoll = 'TOLLBTOLLS3' + token_vtoll = 'TOLLVTOLLS3' + endif + + DistributeMultistep processid = 'ctramp', processNum = auto, commpath = '%COMMPATH%' + + ; Read toll discounts from the block file + Read File = "CTRAMP\scripts\block\hwyParam.block" + + loop period = 1,5 + + if (period = 1) + token_period = 'EA' + elseif (period = 2) + token_period = 'AM' + elseif (period = 3) + token_period = 'MD' + elseif (period = 4) + token_period = 'PM' + elseif (period = 5) + token_period = 'EV' + endif + + RUN PGM = MATRIX + + ; Read person trips for an income quartile for all time periods + FILEI MATI[1] = "main\trips@token_period@_no_zpv_allinc.tpp" + + ; Read Highway Skims + FILEI MATI[2] = "skims\HWYSKM@token_period@.tpp" + + FILEI LOOKUPI[1] = taxi_tnc_occ_factors.csv + + ; Specify output file + FILEO PRINTO[1] = "metrics\auto_times_@token_auto@.csv",APPEND=T + + ; load lookup values for factoring taxi and TNC modes + lookup lookupi=1, LIST=y, name=occ_factors, + lookup[1]=1, result=2, ; (occ,taxi) + lookup[2]=1, result=3, ; (occ,single_tnc) + lookup[3]=1, result=4 ; (occ,shared_tnc) + + IF (I=1) + IF (@auto@==1 || @auto@==2 || @auto@==10 || @auto@==11) + _occupancy = 1.0 + ELSEIF (@auto@==3 || @auto@==4 || @auto@==12 || @auto@==13) + _occupancy = 2.0 + ELSEIF (@auto@==5 || @auto@==6 || @auto@==14 || @auto@==15) + _occupancy = 3.5 + + ; calculate the average occupancy + ; the multiplication factors for s3 is calculated based on MTC's TNC pilot survey conducted in Oct/Nov 2018 + ; the spreadsheet is here: M:\Application\Model One\Mock Futures\TNC occupancy\tnc occupancy.xlsx + ELSEIF (@auto@==7) + ; taxi + _occupancy = occ_factors(1, 1)*1 + occ_factors(1, 2)*2 + occ_factors(1, 3)*3.60 + ELSEIF (@auto@==8) + ; tnc single + _occupancy = occ_factors(2, 1)*1 + occ_factors(2, 2)*2 + occ_factors(2, 3)*3.60 + ELSEIF (@auto@==9) + ; tnc shared + _occupancy = occ_factors(3, 1)*1 + occ_factors(3, 2)*2 + occ_factors(3, 3)*3.83 + ENDIF + ENDIF + + + ; Trips by TOD * Skims by TOD + MW[1] = mi.1.@token_auto@ * mi.2.@token_time@ ; Person minutes + MW[2] = (mi.1.@token_auto@ * mi.2.@token_time@)/_occupancy ; Vehicle minutes + MW[3] = mi.1.@token_auto@ * mi.2.@token_dist@ ; Person miles + MW[4] = (mi.1.@token_auto@ * mi.2.@token_dist@)/_occupancy ; Vehicle miles + MW[5] = (mi.1.@token_auto@/_occupancy) * (mi.2.@token_dist@ * @AUTOOPC@) ; not including tolls + MW[6] = (mi.1.@token_auto@/_occupancy) * mi.2.@token_btoll@ ; Bridge tolls + MW[7] = (mi.1.@token_auto@/_occupancy) * mi.2.@token_vtoll@ ; Value tolls + + ; Compute Person Trips, Vehicle Trips, PersonTime, VehicleTime, PersonMiles, VehicleMiles, TotalCost, Bridge Tolls, Value Tolls + MW[36] = mi.1.@token_auto@ + MW[37] = mi.1.@token_auto@/_occupancy + MW[38] = MW[1] ; Person minutes + MW[39] = MW[2] ; Vehicle minutes + MW[40] = MW[3] ; Person miles + MW[41] = MW[4] ; Vehicle miles + MW[42] = MW[5] ; Trip Cost + ;MW[43] = MW[6] ; Bridge Tolls + ;MW[44] = MW[7] ; Value Tolls + + Person_trips = Person_trips + ROWSUM(36) + Vehicle_trips = Vehicle_trips + ROWSUM(37) + Person_min = Person_min + ROWSUM(38) + Vehicle_min = Vehicle_min + ROWSUM(39) + Person_miles = Person_miles + ROWSUM(40) + Vehicle_miles = Vehicle_miles + ROWSUM(41) + Total_cost = Total_cost + ROWSUM(42) + ;Bridge_tolls = Bridge_tolls + ROWSUM(43) + ;Value_tolls = Value_tolls + ROWSUM(43) + + Mode = '@token_auto@' + Period = '@token_period@' + + if(I = 1 & @period@=1 & @auto@ = 1) PRINT PRINTO=1 LIST="Period,Mode,Person Trips,Vehicle Trips,Person Minutes,Vehicle Minutes,Person Miles,Vehicle Miles,Total Cost" + if(I = ZONES) PRINT PRINTO=1 CSV=T LIST= Period, Mode, Person_trips(10.2L), Vehicle_trips(10.2L), + Person_min(10.2L), Vehicle_min(10.2L), + Person_miles(10.2L), Vehicle_miles(10.2L), + Total_cost(10.2L) + ENDRUN + + endloop ; period loop + + EndDistributeMultistep + +endloop + +Wait4Files files=CTRAMP1.script.end, CTRAMP2.script.end, CTRAMP3.script.end, CTRAMP4.script.end, CTRAMP5.script.end, CTRAMP6.script.end, + CTRAMP7.script.end, CTRAMP8.script.end, CTRAMP9.script.end, CTRAMP10.script.end, CTRAMP11.script.end, CTRAMP12.script.end, + CTRAMP13.script.end, CTRAMP14.script.end, CTRAMP15.script.end, + printfiles = merge, deldistribfiles = t, CheckReturnCode = t + +; combine the TOD files into one +* copy metrics\auto_times_da.csv+metrics\auto_times_datoll.csv+metrics\auto_times_sr2.csv+metrics\auto_times_sr2toll.csv+metrics\auto_times_sr3.csv+metrics\auto_times_sr3toll.csv+metrics\auto_times_taxi.csv+metrics\auto_times_tnc_single.csv+metrics\auto_times_tnc_shared.csv+metrics\auto_times_da_av_notoll.csv+metrics\auto_times_da_av_toll.csv+metrics\auto_times_sr2_av_notoll.csv+metrics\auto_times_sr2_av_toll.csv+metrics\auto_times_sr3_av_notoll.csv+metrics\auto_times_sr3_av_toll.csv metrics\auto_time_TOD.csv +; delete the individual ones +* del metrics\auto_times_*.csv + diff --git a/utilities/RTP/metrics/sumNonMotTimesByTOD.job b/utilities/RTP/metrics/sumNonMotTimesByTOD.job new file mode 100644 index 000000000..299e6b63d --- /dev/null +++ b/utilities/RTP/metrics/sumNonMotTimesByTOD.job @@ -0,0 +1,82 @@ +; This script Uses Non-Motorized trips * Non-Mot skims (DIST) and outputs: +; metrics\nonmot_times_TOD.csv with columns: +; * Period (EA, AM, MD, PM, EV) +; * Mode (walk, bike) +; * Trips (# of non-motorized trips) +; * Distance (# of miles travelled by this mode) +; + + +;*del metrics\nonmot_times_TOD.csv + +; Loop thru transit modes +loop mode = 1,2 + ; walk + if (mode = 1) + token_mode = 'walk' + token_dist = 'DISTWALK' + ; bike + elseif (mode = 2) + token_mode = 'bike' + token_dist = 'DISTBIKE' + endif + + ;DistributeMultistep processid = 'ctramp', processNum = path, commpath = '%COMMPATH%' + + loop period = 1,5 + + if (period = 1) + token_period = 'EA' + elseif (period = 2) + token_period = 'AM' + elseif (period = 3) + token_period = 'MD' + elseif (period = 4) + token_period = 'PM' + elseif (period = 5) + token_period = 'EV' + endif + + RUN PGM = MATRIX + ; Read person trips + ; 1. da, 2. datoll, 3. sr2, 4. sr2toll, 5. sr3, 6. sr3toll, 7. walk, 8. bike, + ; 9. wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, + ; 14. drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, + ; 19. wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv + FILEI MATI[1] = "main\trips@token_period@.tpp" + + ; Read non-motorized skims + ; DISTWALK, DISTBIKE, DIST + FILEI MATI[2] = "skims\nonmotskm.tpp" + + FILEO PRINTO[1] = "metrics\nonmot_times_@token_mode@.csv", append=T + + ; Transit Trips by TOD + MW[1] = mi.1.@token_mode@ ; Trips + MW[2] = MW[1] * mi.2.@token_dist@ ; Distance + + JLOOP + Trips = Trips + MW[1] + Distance = Distance + MW[2] + ENDJLOOP + + if(I = 1 & @period@ = 1 & @mode@ = 1) + PRINT PRINTO=1 CSV=T LIST= "Period", "Mode", "Trips", "Distance" + endif + if(I=1475) + PRINT PRINTO=1 CSV=T LIST= '@token_period@','@token_mode@',Trips,Distance + endif + ENDRUN + endloop ; period loop + + ;EndDistributeMultistep +endloop ; mode loop + +;Wait4Files files=CTRAMP1.script.end, CTRAMP2.script.end, +; printfiles = merge, deldistribfiles = t, CheckReturnCode = t + +; combine the path files into one +* copy metrics\nonmot_times_walk.csv+metrics\nonmot_times_bike.csv metrics\nonmot_times_TOD.csv +; delete the individual ones +* del metrics\nonmot_times_walk.csv +* del metrics\nonmot_times_bike.csv diff --git a/utilities/RTP/metrics/sumTransitTimesByTOD.job b/utilities/RTP/metrics/sumTransitTimesByTOD.job new file mode 100644 index 000000000..6c81592da --- /dev/null +++ b/utilities/RTP/metrics/sumTransitTimesByTOD.job @@ -0,0 +1,155 @@ +; RSG 2022-01-21 TM1.5 add advanced air mobility mode +; This script Uses Transit trips * Transit skims (IVT and OVT) and outputs: +; metrics\transit_times_by_mode_TOD.csv with columns: +; * Period (EA, AM, MD, PM, EV) +; * Access (wlk, drv) +; * Mode (aam, com, hvy, exp, lrf, loc) +; * Egress (wlk, drv) +; * Transit Trips (# of transit trips taken by relevant ppl) +; * In-vehicle hours (# of in-vehicle hours taken by relevant ppl) +; * Out-of-vehicle hours (# of out-of-vehicle hours taken by relevant ppl) +; * Init wait hours (# of hours spent in the initial wait by relevant ppl) +; * Xfer wait hours (# of hours spent in the transfer wait by relevant ppl) +; * Walk acc & egr hours (# of hours spent in walk access and egress by relevant ppl) +; * Aux walk hours (# of hours spent in auxiliary walk by relevant ppl) +; * Drive acc & egr hours (# of hours spent in drive access and egress by relevant ppl) +; + + +;*del metrics\transit_times_by_mode_TOD.csv + +; Loop thru transit modes + loop path = 1,6 + ; advanced air mobility + if (path = 1) + token_path = 'aam' + token_ivt = 'ivtAAM' + ; commuter rail or long-haul premium + elseif (path = 2) + token_path = 'com' + token_ivt = 'ivtCOM' + ; heavy rail or medium-haul premium + elseif (path = 3) + token_path = 'hvy' + token_ivt = 'ivtHVY' + ; express bus or medium-haul basic + elseif (path = 4) + token_path = 'exp' + token_ivt = 'ivtEXP' + ; light rail (or ferry) or short-haul premium + elseif (path = 5) + token_path = 'lrf' + token_ivt = 'ivtLRF' + ; local bus or short-haul basic + elseif (path = 6) + token_path = 'loc' + token_ivt = 'ivtLOC' + endif + + DistributeMultistep processid = 'ctramp', processNum = path, commpath = '%COMMPATH%' + + ; Loop thru access + egress modes + loop accegg = 1,3 + if (accegg = 1) + token_access = 'wlk' + token_egress = 'wlk' + + elseif (accegg = 2) + token_access = 'drv' + token_egress = 'wlk' + + elseif (accegg = 3) + token_access = 'wlk' + token_egress = 'drv' + + endif + + loop period = 1,5 + + if (period = 1) + token_period = 'EA' + elseif (period = 2) + token_period = 'AM' + elseif (period = 3) + token_period = 'MD' + elseif (period = 4) + token_period = 'PM' + elseif (period = 5) + token_period = 'EV' + endif + + RUN PGM = MATRIX + ; Read person trips + ; 1. da, 2. datoll, 3. sr2, 4. sr2toll, 5. sr3, 6. sr3toll, 7. walk, 8. bike, + ; 9. wlk_loc_wlk, wlk_lrf_wlk, wlk_exp_wlk, wlk_hvy_wlk, wlk_com_wlk, wlk_aam_wlk, + ; 14. drv_loc_wlk, drv_lrf_wlk, drv_exp_wlk, drv_hvy_wlk, drv_com_wlk, drv_aam_wlk, + ; 19. wlk_loc_drv, wlk_lrf_drv, wlk_exp_drv, wlk_hvy_drv, wlk_com_drv, wlk_aam_drv + FILEI MATI[1] = "main\trips@token_period@_no_zpv_allinc.tpp" + + ; Read transit skims + ; ivt, iwait, xwait, wait, wacc, waux, wegr, dtime, ddist, fare, boards, ivtLOC, ivtLRF, ivtEXP, ivtHVY, ivtCOM, ivtAAM, ivtFerry, ivtMUNILoc, ivtMUNIMet, + FILEI MATI[2] = "skims\trnskm@token_period@_@token_access@_@token_path@_@token_egress@.tpp" + + FILEO PRINTO[1] = "metrics\transit_times_by_acc_mode_egr_@token_path@.csv", append=T + + ; Transit Trips by TOD + MW[1] = mi.1.@token_access@_@token_path@_@token_egress@ ; Trips + MW[2] = MW[1] * mi.2.ivt ; IVTTrips + MW[3] = MW[1] * (mi.2.wait+mi.2.wacc+mi.2.waux+mi.2.wegr+mi.2.dtime) ; OVTTrips + MW[101] = MW[1] * mi.2.iwait ; iwaitTrips + MW[102] = MW[1] * mi.2.xwait ; xwaitTrips + MW[103] = MW[1] * (mi.2.wacc +mi.2.wegr) ; accegrTrips + MW[104] = MW[1] * mi.2.waux ; wauxTrips + MW[105] = MW[1] * mi.2.dtime ; dtimeTrips + + JLOOP + Trips = Trips + MW[1] + IVT = IVT + MW[2] + OVT = OVT + MW[3] + iwait = iwait + MW[101] + xwait = xwait + MW[102] + accegr = accegr + MW[103] + waux = waux + MW[104] + dtime = dtime + MW[105] + ENDJLOOP + + Name = '@token_access@_@token_path@_@token_egress@' + if(I = 1 & @path@ = 1 & @accegg@ = 1 & @period@ = 1) + PRINT PRINTO=1 CSV=T LIST= "Period", "Access","Mode","Egress", + "Transit Trips","In-vehicle hours","Out-of-vehicle hours","Init wait hours", + "Xfer wait hours","Walk acc & egr hours", + "Aux walk hours","Drive acc & egr hours" + endif + if(I=1475) + IVT_triphours = IVT / 6000 + OVT_triphours = OVT / 6000 + iwait_hours = iwait / 6000 + xwait_hours = xwait / 6000 + accegr_hours = accegr / 6000 + waux_hours = waux / 6000 + dtime_hours = dtime / 6000 + PRINT PRINTO=1 CSV=T LIST= '@token_period@','@token_access@','@token_path@','@token_egress@', + Trips,IVT_triphours,OVT_triphours,iwait_hours, + xwait_hours,accegr_hours, + waux_hours,dtime_hours + endif + ENDRUN + endloop + endloop + + EndDistributeMultistep +endloop + +Wait4Files files=CTRAMP1.script.end, CTRAMP2.script.end, CTRAMP3.script.end, + CTRAMP4.script.end, CTRAMP5.script.end, CTRAMP6.script.end, + printfiles = merge, deldistribfiles = t, CheckReturnCode = t + +; combine the path files into one +* copy metrics\transit_times_by_acc_mode_egr_aam.csv+metrics\transit_times_by_acc_mode_egr_com.csv+metrics\transit_times_by_acc_mode_egr_hvy.csv+metrics\transit_times_by_acc_mode_egr_exp.csv+metrics\transit_times_by_acc_mode_egr_lrf.csv+metrics\transit_times_by_acc_mode_egr_loc.csv metrics\transit_times_by_mode_TOD.csv +; delete the individual ones +* del metrics\transit_times_by_acc_mode_egr_aam.csv +* del metrics\transit_times_by_acc_mode_egr_com.csv +* del metrics\transit_times_by_acc_mode_egr_hvy.csv +* del metrics\transit_times_by_acc_mode_egr_exp.csv +* del metrics\transit_times_by_acc_mode_egr_lrf.csv +* del metrics\transit_times_by_acc_mode_egr_loc.csv \ No newline at end of file diff --git a/utilities/RTP/metrics/transit.py b/utilities/RTP/metrics/transit.py index 929105500..76b86e51c 100644 --- a/utilities/RTP/metrics/transit.py +++ b/utilities/RTP/metrics/transit.py @@ -5,11 +5,11 @@ python transit.py quickboards.xls Opens the given quickboards workbook and tallies Daily Boardings and Daily Passenger Miles for each - mode type (local, express, ferry, lrt, heavy rail, commuter rail). Mode type is interpretted based - on the line name numeric prefix. + mode type (local, express, ferry, lrt, heavy rail, commuter rail, advanced air mobility). + Mode type is interpretted based on the line name numeric prefix. Outputs result into metrics\transit_boards_miles.csv - + RSG 2022-01-21 TM1.5 add advanced air mobility mode """ parser = optparse.OptionParser() @@ -51,8 +51,10 @@ mode_str = 'lrf' elif mode < 130: mode_str = 'hvy' + elif mode < 140: + mode_str = 'com' else: - mode_str = 'com' + mode_str = 'aam' if mode_str not in boardings: boardings[mode_str] = 0.0 if mode_str not in passmiles: passmiles[mode_str] = 0.0 @@ -70,6 +72,6 @@ outfile = open(outputfile, 'w') writer = csv.writer(outfile,lineterminator='\n') writer.writerow(['Transit mode','Daily Boardings','Daily Passenger Miles Traveled']) -for mode_str in ['loc','exp','lrf','hvy','com']: +for mode_str in ['loc','exp','lrf','hvy','com','aam']: writer.writerow([mode_str,boardings[mode_str],passmiles[mode_str]]) outfile.close() \ No newline at end of file diff --git a/utilities/RTP/metrics/transitcrowding.py b/utilities/RTP/metrics/transitcrowding.py index 1bcbc0d5e..78400bd95 100644 --- a/utilities/RTP/metrics/transitcrowding.py +++ b/utilities/RTP/metrics/transitcrowding.py @@ -31,7 +31,7 @@ """ LOG_FILE = "transit_crowding.log" -SEATCAP_FILE = "\\\\mainmodel\\MainModelShare\\travel-model-one-master\\utilities\\RTP\\metrics\\transitSeatCap.csv" +SEATCAP_FILE = "E:\\Projects\\Clients\\gm\\models\\travel-model-one\\utilities\\RTP\\metrics\\transitSeatCap.csv" PSEUDO_LINE_MAPPING = {