diff --git a/activitysim/defaults/models/mode.py b/activitysim/defaults/models/mode.py index be5786f8f3..8303e61384 100644 --- a/activitysim/defaults/models/mode.py +++ b/activitysim/defaults/models/mode.py @@ -16,7 +16,7 @@ @orca.injectable() -def mode_choice_settings(configs_dir): +def tour_mode_choice_settings(configs_dir): with open(os.path.join(configs_dir, "configs", "tour_mode_choice.yaml")) as f: @@ -24,7 +24,7 @@ def mode_choice_settings(configs_dir): @orca.injectable() -def mode_choice_spec_df(configs_dir): +def tour_mode_choice_spec_df(configs_dir): with open(os.path.join(configs_dir, "configs", "tour_mode_choice.csv")) as f: @@ -32,7 +32,7 @@ def mode_choice_spec_df(configs_dir): @orca.injectable() -def mode_choice_coeffs(configs_dir): +def tour_mode_choice_coeffs(configs_dir): with open(os.path.join(configs_dir, "configs", "tour_mode_choice_coeffs.csv")) as f: @@ -40,10 +40,45 @@ def mode_choice_coeffs(configs_dir): @orca.injectable() -def mode_choice_spec(mode_choice_spec_df, mode_choice_coeffs, - mode_choice_settings): - return _mode_choice_spec(mode_choice_spec_df, mode_choice_coeffs, - mode_choice_settings) +def tour_mode_choice_spec(tour_mode_choice_spec_df, + tour_mode_choice_coeffs, + tour_mode_choice_settings): + return _mode_choice_spec(tour_mode_choice_spec_df, + tour_mode_choice_coeffs, + tour_mode_choice_settings) + + +@orca.injectable() +def trip_mode_choice_settings(configs_dir): + with open(os.path.join(configs_dir, + "configs", + "trip_mode_choice.yaml")) as f: + return yaml.load(f) + + +@orca.injectable() +def trip_mode_choice_spec_df(configs_dir): + with open(os.path.join(configs_dir, + "configs", + "trip_mode_choice.csv")) as f: + return asim.read_model_spec(f) + + +@orca.injectable() +def trip_mode_choice_coeffs(configs_dir): + with open(os.path.join(configs_dir, + "configs", + "trip_mode_choice_coeffs.csv")) as f: + return pd.read_csv(f, index_col='Expression') + + +@orca.injectable() +def trip_mode_choice_spec(trip_mode_choice_spec_df, + trip_mode_choice_coeffs, + trip_mode_choice_settings): + return _mode_choice_spec(trip_mode_choice_spec_df, + trip_mode_choice_coeffs, + trip_mode_choice_settings) def _mode_choice_simulate(tours, skims, spec, additional_constants, omx=None): @@ -100,22 +135,43 @@ def get_segment_and_unstack(spec, segment): @orca.step() -def mode_choice_simulate(tours_merged, - mode_choice_spec, - mode_choice_settings, - skims, omx_file): +def tour_mode_choice_simulate(tours_merged, + tour_mode_choice_spec, + tour_mode_choice_settings, + skims, omx_file): tours = tours_merged.to_frame() - print mode_choice_spec.eatout - # FIXME this only runs eatout choices = _mode_choice_simulate( tours[tours.tour_type == "eatout"], skims, - get_segment_and_unstack(mode_choice_spec, 'eatout'), - mode_choice_settings['CONSTANTS'], + get_segment_and_unstack(tour_mode_choice_spec, 'eatout'), + tour_mode_choice_settings['CONSTANTS'], omx=omx_file) print "Choices:\n", choices.value_counts() orca.add_column("tours", "mode", choices) + + +@orca.step() +def trip_mode_choice_simulate(tours_merged, + trip_mode_choice_spec, + trip_mode_choice_settings, + skims, omx_file): + + # FIXME running the trips model on tours + trips = tours_merged.to_frame() + + print trip_mode_choice_spec.eatout + + # FIXME this only runs eatout + choices = _mode_choice_simulate( + trips[trips.tour_type == "eatout"], + skims, + get_segment_and_unstack(trip_mode_choice_spec, 'eatout'), + trip_mode_choice_settings['CONSTANTS'], + omx=omx_file) + + print "Choices:\n", choices.value_counts() + orca.add_column("trips", "mode", choices) diff --git a/activitysim/defaults/tables/tours.py b/activitysim/defaults/tables/tours.py index 15da50b5b9..fecca71ee0 100644 --- a/activitysim/defaults/tables/tours.py +++ b/activitysim/defaults/tables/tours.py @@ -137,6 +137,12 @@ def is_joint(tours): return pd.Series(False, index=tours.index) +@orca.column("tours") +def is_not_joint(tours): + # FIXME + return pd.Series(True, index=tours.index) + + @orca.column("tours") def number_of_participants(tours): # FIXME diff --git a/activitysim/defaults/test/test_defaults.py b/activitysim/defaults/test/test_defaults.py index 48382b53a7..6e33ddfdea 100644 --- a/activitysim/defaults/test/test_defaults.py +++ b/activitysim/defaults/test/test_defaults.py @@ -81,12 +81,13 @@ def test_mini_run(store, random_seed): # this is a regression test so that we know if these numbers change auto_choice = orca.get_table('households').get_column('auto_ownership') print auto_choice[[2306822, 652072, 651907]] + print pd.Series( + [2, 1, 1], index=[2306822, 652072, 651907], name="HHID") pdt.assert_series_equal( auto_choice[[2306822, 652072, 651907]], pd.Series( - [2, 1, 1], index=pd.Index([2306822, 652072, 651907], name='HHID'))) - + [2, 1, 1], index=pd.Index([2306822, 652072, 651907], name="HHID"))) orca.run(["cdap_simulate"]) orca.run(['mandatory_tour_frequency']) @@ -99,7 +100,6 @@ def test_mini_run(store, random_seed): pd.Series( ['school1', 'work1', 'school2'], index=pd.Index([146642, 642922, 642921], name='PERID'))) - orca.clear_cache() @@ -138,7 +138,7 @@ def test_full_run(store): orca.run(["destination_choice"]) orca.run(["mandatory_scheduling"]) orca.run(["non_mandatory_scheduling"]) - orca.run(["mode_choice_simulate"]) + orca.run(["tour_mode_choice_simulate"]) orca.clear_cache() tmp.close() diff --git a/activitysim/tests/test_skim.py b/activitysim/tests/test_skim.py index 0580ac8f36..ce9a47c71b 100644 --- a/activitysim/tests/test_skim.py +++ b/activitysim/tests/test_skim.py @@ -110,5 +110,6 @@ def test_3dskims(data): pd.Series( [12, 93, 47], index=[0, 1, 2] - ) + ), + check_dtype=False ) diff --git a/example/configs/trip_mode_choice.csv b/example/configs/trip_mode_choice.csv new file mode 100644 index 0000000000..bb382a56a5 --- /dev/null +++ b/example/configs/trip_mode_choice.csv @@ -0,0 +1,362 @@ +Description,Expression,Alternative,eatout,othdiscr,othmaint,shopping,social,escort,school,university,work,workbased +Drive alone - Unavailable,sov_available == False,DRIVEALONEFREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone - Unavailable for zero auto households,auto_ownership == 0,DRIVEALONEFREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone - Unavailable for persons less than 16,age < 16,DRIVEALONEFREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone - Unavailable for joint tours,is_joint,DRIVEALONEFREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone - Unavailable if didn't drive to work,work_tour_is_drive,DRIVEALONEFREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone - In-vehicle time,$IN_N_OUT_EXPR.format(sk='SOV_TIME'),DRIVEALONEFREE,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive alone - Terminal time,$TERMINAL_TIME_EXPR,DRIVEALONEFREE,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Drive alone - Operating cost ,$OPERATING_COST_EXPR.format(sk='SOV_DIST'),DRIVEALONEFREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone - Parking cost ,daily_parking_cost,DRIVEALONEFREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone - Bridge toll ,$IN_N_OUT_EXPR.format(sk='SOV_BTOLL'),DRIVEALONEFREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone - Person is between 16 and 19 years old,age_16_to_19,DRIVEALONEFREE,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da +Drive alone toll - Unavailable,sovtoll_available == False,DRIVEALONEPAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone toll - Unavailable for zero auto households,auto_ownership == 0,DRIVEALONEPAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone toll - Unavailable for persons less than 16,age < 16,DRIVEALONEPAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone toll - Unavailable for joint tours,is_joint,DRIVEALONEPAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone toll - Unavailable if didn't drive to work,work_tour_is_drive,DRIVEALONEPAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive alone toll - In-vehicle time,$IN_N_OUT_EXPR.format(sk='SOVTOLL_TIME'),DRIVEALONEPAY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive alone toll - Terminal time,$TERMINAL_TIME_EXPR,DRIVEALONEPAY,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Drive alone toll - Operating cost ,$OPERATING_COST_EXPR.format(sk='SOVTOLL_DIST'),DRIVEALONEPAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone toll - Parking cost ,daily_parking_cost,DRIVEALONEPAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone toll - Bridge toll ,$IN_N_OUT_EXPR.format(sk='SOVTOLL_BTOLL'),DRIVEALONEPAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone toll - Value toll ,$IN_N_OUT_EXPR.format(sk='SOVTOLL_VTOLL'),DRIVEALONEPAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive alone toll - Person is between 16 and 19 years old,age_16_to_19,DRIVEALONEPAY,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da,age1619_da +Shared ride 2 - Unavailable,hov2_available == False,SHARED2FREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 2 - Unavailable based on party size,$UNAVAILABILITY_PARTY_2,SHARED2FREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 2 - In-vehicle time,$IN_N_OUT_EXPR.format(sk='HOV2_TIME'),SHARED2FREE,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Shared ride 2 - Terminal time,$TERMINAL_TIME_EXPR,SHARED2FREE,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Shared ride 2 - Operating cost ,$OPERATING_COST_EXPR.format(sk='HOV2_DIST'),SHARED2FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 - Parking cost ,$DAILY_PARKING_SHARE_2 ,SHARED2FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 - Bridge toll ,$IN_N_OUT_SHARE_2.format(sk='HOV2_BTOLL'),SHARED2FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 - One person household,hhsize == 1,SHARED2FREE,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr +Shared ride 2 - Two person household,hhsize == 2,SHARED2FREE,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr +Shared ride 2 - Person is 16 years old or older,age_16_p,SHARED2FREE,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr +Shared ride 2 toll - Unavailable,hov2toll_available == False,SHARED2PAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 2 toll - Unavailable based on party size,$UNAVAILABILITY_PARTY_2,SHARED2PAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 2 toll - In-vehicle time,$IN_N_OUT_EXPR.format(sk='HOV2TOLL_TIME'),SHARED2PAY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Shared ride 2 toll - Terminal time,$TERMINAL_TIME_EXPR,SHARED2PAY,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Shared ride 2 toll - Operating cost ,$OPERATING_COST_EXPR.format(sk='HOV2TOLL_DIST'),SHARED2PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 toll - Parking cost ,$DAILY_PARKING_SHARE_2,SHARED2PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 toll - Bridge toll ,$IN_N_OUT_SHARE_2.format(sk='HOV2TOLL_BTOLL'),SHARED2PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 toll - Value toll ,$IN_N_OUT_SHARE_2.format(sk='HOV2TOLL_VTOLL'),SHARED2PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 2 toll - One person household,hhsize == 1,SHARED2PAY,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr +Shared ride 2 toll - Two person household,hhsize == 2,SHARED2PAY,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr +Shared ride 2 toll - Person is 16 years old or older,age_16_p,SHARED2PAY,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr +Shared ride 3+ - Unavailable,hov3_available == False,SHARED3FREE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 3+ - In-vehicle time,$IN_N_OUT_EXPR.format(sk='HOV3_TIME'),SHARED3FREE,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Shared ride 3+ - Terminal time,$TERMINAL_TIME_EXPR,SHARED3FREE,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Shared ride 3+ - Operating cost ,$OPERATING_COST_EXPR.format(sk='HOV3_DIST'),SHARED3FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ - Parking cost ,$DAILY_PARKING_SHARE_3,SHARED3FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ - Bridge toll ,$IN_N_OUT_SHARE_3.format(sk='HOV3_BTOLL'),SHARED3FREE,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ - One person household,hhsize == 1,SHARED3FREE,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr +Shared ride 3+ - Two person household,hhsize == 2,SHARED3FREE,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr +Shared ride 3+ - Person is 16 years old or older,age_16_p,SHARED3FREE,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr +Shared ride 3+ toll - Unavailable,hov3_available == False,SHARED3PAY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared ride 3+ toll - In-vehicle time,$IN_N_OUT_EXPR.format(sk='HOV3TOLL_TIME'),SHARED3PAY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Shared ride 3+ toll - Terminal time,$TERMINAL_TIME_EXPR,SHARED3PAY,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort,walktimeshort +Shared ride 3+ toll - Operating cost ,$OPERATING_COST_EXPR.format(sk='HOV3TOLL_DIST'),SHARED3PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ toll - Parking cost ,$DAILY_PARKING_SHARE_3,SHARED3PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ toll - Bridge toll ,$IN_N_OUT_SHARE_3.format(sk='HOV3TOLL_BTOLL'),SHARED3PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ toll - Value toll ,$IN_N_OUT_SHARE_3.format(sk='HOV3TOLL_VTOLL'),SHARED3PAY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Shared ride 3+ toll - One person household,hhsize == 1,SHARED3PAY,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr,hhsize1_sr +Shared ride 3+ toll - Two person household,hhsize == 2,SHARED3PAY,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr,hhsize2_sr +Shared ride 3+ toll - Person is 16 years old or older,age_16_p,SHARED3PAY,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr,age16p_sr +# Walk - Time up to 2 miles,"c_walkTimeShort*min(walk_dist*60/walkSpeed, walkThresh*60/walkSpeed*2)",WALK,1,1,1,1,1,1,1,1,1,1 +# Walk - Time beyond 2 of a miles,"c_walkTimeLong*max(walk_dist*60/walkSpeed - walkThresh*60/walkSpeed*2, 0)",WALK,1,1,1,1,1,1,1,1,1,1 +# Walk - Destination zone densityIndex,c_densityIndex*densityIndex,WALK,1,1,1,1,1,1,1,1,1,1 +# Walk - Topology,c_topology_walk*tripTopology,WALK,1,1,1,1,1,1,1,1,1,1 +# Bike - Unavailable if didn't bike to work,1,BIKE,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Bike - Time up to 2 miles,"c_bikeTimeShort*min(bike_dist*60/bikeSpeed, bikeThresh*60/bikeSpeed)",BIKE,1,1,1,1,1,1,1,1,1,1 +# Bike - Time beyond 2 of a miles,"c_bikeTimeLong*max(bike_dist*60/bikeSpeed - bikeThresh*60/bikeSpeed, 0)",BIKE,1,1,1,1,1,1,1,1,1,1 +# Bike - Destination zone densityIndex,c_densityIndex*densityIndex,BIKE,1,1,1,1,1,1,1,1,1,1 +# Bike - Topology,c_topology_bike*tripTopology,BIKE,1,1,1,1,1,1,1,1,1,1 +Walk to Local - Unavailable,walk_local_available == False,WALK_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Walk to Local - In-vehicle time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LOC_WLK_TOTIVT'),WALK_LOC,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Walk to Local - Short iwait time,"$SHORT_WAIT_EXPR.format(sk='WLK_LOC_WLK_IWAIT', th='waitThresh')",WALK_LOC,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +Walk to Local - Long iwait time,"$LONG_WAIT_EXPR.format(sk='WLK_LOC_WLK_IWAIT', th='waitThresh')",WALK_LOC,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +Walk to Local - transfer wait time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LOC_WLK_XWAIT'),WALK_LOC,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +Walk to Local - number of transfers,$TRANSFERS_EXPR.format(sk='WLK_LOC_WLK_BOARDS'),WALK_LOC,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Walk to Local - Walk access time,2 * origin_walk_time,WALK_LOC,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Walk to Local - Walk egress time,2 * destination_walk_time,WALK_LOC,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Walk to Local - Walk other time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LOC_WLK_WAUX'),WALK_LOC,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Walk to Local - Fare ,$IN_N_OUT_EXPR.format(sk='WLK_LOC_WLK_FAR'),WALK_LOC,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Walk to Local - Destination zone densityIndex,dest_density_index,WALK_LOC,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Walk to Local - Topology,dest_topology,WALK_LOC,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Walk to Local - Person is less than 10 years old,age < 10,WALK_LOC,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Walk to Light rail/Ferry - Unavailable,walk_lrf_available == False,WALK_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Walk to Light rail/Ferry - In-vehicle time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LRF_WLK_TOTIVT'),WALK_LRF,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Walk to Light rail/Ferry - In-vehicle time on Light Rail (incremental w/ ivt),$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LRF_WLK_KEYIVT'),WALK_LRF,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt +Walk to Light rail/Ferry - In-vehicle time on Ferry (incremental w/keyivt),$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LRF_WLK_FERRYIVT'),WALK_LRF,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt +Walk to Lrf - Short iwait time,"$SHORT_WAIT_EXPR.format(sk='WLK_LRF_WLK_IWAIT', th='waitThresh')",WALK_LRF,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +Walk to Lrf - Long iwait time,"$LONG_WAIT_EXPR.format(sk='WLK_LRF_WLK_IWAIT', th='waitThresh')",WALK_LRF,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +Walk to Lrf - transfer wait time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LRF_WLK_XWAIT'),WALK_LRF,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +Walk to Lrf - number of transfers,$TRANSFERS_EXPR.format(sk='WLK_LRF_WLK_BOARDS'),WALK_LRF,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Walk to Light rail/Ferry - Walk access time,2 * origin_walk_time,WALK_LRF,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Walk to Light rail/Ferry - Walk egress time,2 * destination_walk_time,WALK_LRF,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Walk to Light rail/Ferry - Walk other time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_LRF_WLK_WAUX'),WALK_LRF,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Walk to Light rail/Ferry - Fare ,$IN_N_OUT_EXPR.format(sk='WLK_LRF_WLK_FAR'),WALK_LRF,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Walk to Light rail/Ferry - Destination zone densityIndex,dest_density_index,WALK_LRF,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Walk to Light rail/Ferry - Topology,dest_topology,WALK_LRF,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Walk to Light rail/Ferry - Person is less than 10 years old,age < 10,WALK_LRF,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Walk to Express bus - Unavailable,walk_express_available == False,WALK_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Walk to Express bus - In-vehicle time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_EXP_WLK_TOTIVT'),WALK_EXP,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Walk to Express bus - In-vehicle time on Express bus (incremental w/ ivt),$IN_N_OUT_EXPR_DIV100.format(sk='WLK_EXP_WLK_KEYIVT'),WALK_EXP,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt +Walk to Express - Short iwait time,"$SHORT_WAIT_EXPR.format(sk='WLK_EXP_WLK_IWAIT', th='waitThresh')",WALK_EXP,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +Walk to Express - Long iwait time,"$LONG_WAIT_EXPR.format(sk='WLK_EXP_WLK_IWAIT', th='waitThresh')",WALK_EXP,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +Walk to Express - transfer wait time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_EXP_WLK_XWAIT'),WALK_EXP,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +Walk to Express - number of transfers,$TRANSFERS_EXPR.format(sk='WLK_EXP_WLK_BOARDS'),WALK_EXP,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Walk to Express bus - Walk access time,2 * origin_walk_time,WALK_EXP,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Walk to Express bus - Walk egress time,2 * destination_walk_time,WALK_EXP,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Walk to Express bus - Walk other time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_EXP_WLK_WAUX'),WALK_EXP,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Walk to Express bus - Fare ,$IN_N_OUT_EXPR.format(sk='WLK_EXP_WLK_FAR'),WALK_EXP,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Walk to Express bus - Destination zone densityIndex,dest_density_index,WALK_EXP,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Walk to Express bus - Topology,dest_topology,WALK_EXP,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Walk to Express bus - Person is less than 10 years old,age < 10,WALK_EXP,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Walk to heavy rail - Unavailable,walk_heavyrail_available == False,WALK_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Walk to heavy rail - In-vehicle time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_HVY_WLK_TOTIVT'),WALK_HVY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Walk to heavy rail - In-vehicle time on heavy rail (incremental w/ ivt),$IN_N_OUT_EXPR_DIV100.format(sk='WLK_HVY_WLK_KEYIVT'),WALK_HVY,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt,ivt_hvy-ivt +Walk to HeavyRail - Short iwait time,"$SHORT_WAIT_EXPR.format(sk='WLK_HVY_WLK_IWAIT', th='waitThresh')",WALK_HVY,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +Walk to HeavyRail - Long iwait time,"$LONG_WAIT_EXPR.format(sk='WLK_HVY_WLK_IWAIT', th='waitThresh')",WALK_HVY,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +Walk to HeavyRail - transfer wait time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_HVY_WLK_XWAIT'),WALK_HVY,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +Walk to HeavyRail - number of transfers,$TRANSFERS_EXPR.format(sk='WLK_HVY_WLK_BOARDS'),WALK_HVY,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Walk to heavy rail - Walk access time,2 * origin_walk_time,WALK_HVY,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Walk to heavy rail - Walk egress time,2 * destination_walk_time,WALK_HVY,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Walk to heavy rail - Walk other time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_HVY_WLK_WAUX'),WALK_HVY,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Walk to heavy rail - Fare ,$IN_N_OUT_EXPR.format(sk='WLK_HVY_WLK_FAR'),WALK_HVY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Walk to heavy rail - Destination zone densityIndex,dest_density_index,WALK_HVY,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Walk to heavy rail - Topology,dest_topology,WALK_HVY,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Walk to heavy rail - Person is less than 10 years old,age < 10,WALK_HVY,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Walk to Commuter rail - Unavailable,walk_commuter_available == False,WALK_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Walk to Commuter rail - In-vehicle time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_COM_WLK_TOTIVT'),WALK_COM,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Walk to Commuter rail - In-vehicle time on commuter rail (incremental w/ ivt),$IN_N_OUT_EXPR_DIV100.format(sk='WLK_COM_WLK_KEYIVT'),WALK_COM,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt +Walk to Commuter - Short iwait time,"$SHORT_WAIT_EXPR.format(sk='WLK_COM_WLK_IWAIT', th='waitThresh')",WALK_COM,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +Walk to Commuter - Long iwait time,"$LONG_WAIT_EXPR.format(sk='WLK_COM_WLK_IWAIT', th='waitThresh')",WALK_COM,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +Walk to Commuter - transfer wait time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_COM_WLK_XWAIT'),WALK_COM,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +Walk to Commuter - number of transfers,$TRANSFERS_EXPR.format(sk='WLK_COM_WLK_BOARDS'),WALK_COM,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Walk to Commuter - Walk access time,2 * origin_walk_time,WALK_COM,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Walk to Commuter - Walk egress time,2 * destination_walk_time,WALK_COM,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Walk to Commuter - Walk other time,$IN_N_OUT_EXPR_DIV100.format(sk='WLK_COM_WLK_WAUX'),WALK_COM,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Walk to Commuter rail - Fare ,$IN_N_OUT_EXPR.format(sk='WLK_COM_WLK_FAR'),WALK_COM,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Walk to Commuter rail - Destination zone densityIndex,dest_density_index,WALK_COM,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Walk to Commuter rail - Topology,dest_topology,WALK_COM,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Walk to Commuter rail - Person is less than 10 years old,age < 10,WALK_COM,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Local - Unavailable (outbound),drive_local_available == False,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - Unavailable for zero auto households (outbound),auto_ownership == 0,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - Unavailable for persons less than 16 (outbound),age < 16,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - In-vehicle time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LOC_WLK_TOTIVT'),DRIVE_LOC,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +drive to Local - Short iwait time (outbound),"$OUT_SHORT_WAIT_EXPR.format(sk='DRV_LOC_WLK_IWAIT', th='waitThresh')",DRIVE_LOC,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Local - Long iwait time (outbound),"$OUT_LONG_WAIT_EXPR.format(sk='DRV_LOC_WLK_IWAIT', th='waitThresh')",DRIVE_LOC,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Local - transfer wait time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LOC_WLK_XWAIT'),DRIVE_LOC,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Local - number of transfers (outbound),$OUT_TRANSFERS_EXPR.format(sk='DRV_LOC_WLK_BOARDS'),DRIVE_LOC,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Local - Drive time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LOC_WLK_DTIM'),DRIVE_LOC,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Local - Walk egress time (outbound),destination_walk_time,DRIVE_LOC,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Drive to Local - Walk other time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LOC_WLK_WAUX'),DRIVE_LOC,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Local - Fare and operating cost (outbound),"$AUTO_COST_EXPR.format(sk1='DRV_LOC_WLK_FAR', sk2='DRV_LOC_WLK_DDIST')",DRIVE_LOC,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Local - Ratio of drive access distance to OD distance (outbound),$OUT_AUTO_ACCESS_RATIO_EXPR.format(sk='DRV_LOC_WLK_DDIST'),DRIVE_LOC,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Local - Destination zone densityIndex (outbound),dest_density_index,DRIVE_LOC,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Local - Topology (outbound),dest_topology,DRIVE_LOC,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Local - Person is less than 10 years old (outbound),age < 10,DRIVE_LOC,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Local - Unavailable (inbound),drive_local_available == False,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - Unavailable for zero auto households (inbound),auto_ownership == 0,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - Unavailable for persons less than 16 (inbound),age < 16,DRIVE_LOC,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Local - In-vehicle time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LOC_DRV_TOTIVT'),DRIVE_LOC,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +drive to Local - Short iwait time (inbound),"$IN_SHORT_WAIT_EXPR.format(sk='WLK_LOC_DRV_IWAIT', th='waitThresh')",DRIVE_LOC,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Local - Long iwait time (inbound),"$IN_LONG_WAIT_EXPR.format(sk='WLK_LOC_DRV_IWAIT', th='waitThresh')",DRIVE_LOC,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Local - transfer wait time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LOC_DRV_XWAIT'),DRIVE_LOC,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Local - number of transfers (inbound),$IN_TRANSFERS_EXPR.format(sk='WLK_LOC_DRV_BOARDS'),DRIVE_LOC,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Local - Drive time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LOC_DRV_DTIM'),DRIVE_LOC,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Local - Walk access time (inbound),origin_walk_time,DRIVE_LOC,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Drive to Local - Walk other time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LOC_DRV_WAUX'),DRIVE_LOC,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Local - Fare and operating cost (inbound),"$AUTO_COST_EXPR.format(sk1='WLK_LOC_DRV_FAR', sk2='WLK_LOC_DRV_DDIST')",DRIVE_LOC,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Local - Ratio of drive access distance to OD distance (inbound),$IN_AUTO_ACCESS_RATIO_EXPR.format(sk='WLK_LOC_DRV_DDIST'),DRIVE_LOC,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Local - Destination zone densityIndex (inbound),dest_density_index,DRIVE_LOC,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Local - Topology (inbound),dest_topology,DRIVE_LOC,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Local - Person is less than 10 years old (inbound),age < 10,DRIVE_LOC,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Light rail/Ferry - Unavailable (outbound),drive_lrf_available == False,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - Unavailable for zero auto households (outbound),auto_ownership == 0,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - Unavailable for persons less than 16 (outbound),age < 16,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - In-vehicle time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_TOTIVT'),DRIVE_LRF,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Light rail/Ferry - In-vehicle time on Light Rail (incremental w/ ivt) (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_KEYIVT'),DRIVE_LRF,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt +Drive to Light rail/Ferry - In-vehicle time on Ferry (incremental w/ keyivt) (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_FERRYIVT'),DRIVE_LRF,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt +drive to Lrf - Short iwait time (outbound),"$OUT_SHORT_WAIT_EXPR.format(sk='DRV_LRF_WLK_IWAIT', th='waitThresh')",DRIVE_LRF,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Lrf - Long iwait time (outbound),"$OUT_LONG_WAIT_EXPR.format(sk='DRV_LRF_WLK_IWAIT', th='waitThresh')",DRIVE_LRF,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Lrf - transfer wait time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_XWAIT'),DRIVE_LRF,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Lrf - number of transfers (outbound),$OUT_TRANSFERS_EXPR.format(sk='DRV_LRF_WLK_BOARDS'),DRIVE_LRF,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Light rail/Ferry - Drive time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_DTIM'),DRIVE_LRF,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Light rail/Ferry - Walk egress time (outbound),destination_walk_time,DRIVE_LRF,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Drive to Light rail/Ferry - Walk other time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_LRF_WLK_WAUX'),DRIVE_LRF,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Light rail/Ferry - Fare and operating cost (outbound),"$AUTO_COST_EXPR.format(sk1='DRV_LRF_WLK_FAR', sk2='DRV_LRF_WLK_DDIST')",DRIVE_LRF,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Light rail/Ferry - Ratio of drive access distance to OD distance (outbound),$OUT_AUTO_ACCESS_RATIO_EXPR.format(sk='DRV_LRF_WLK_DDIST'),DRIVE_LRF,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Light rail/Ferry - Destination zone densityIndex (outbound),dest_density_index,DRIVE_LRF,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Light rail/Ferry - Topology (outbound),dest_topology,DRIVE_LRF,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Light rail/Ferry - Person is less than 10 years old (outbound),age < 10,DRIVE_LRF,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Light rail/Ferry - Unavailable (inbound),drive_lrf_available == False,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - Unavailable for zero auto households (inbound),auto_ownership == 0,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - Unavailable for persons less than 16 (inbound),age < 16,DRIVE_LRF,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Light rail/Ferry - In-vehicle time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_TOTIVT'),DRIVE_LRF,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Light rail/Ferry - In-vehicle time on Light Rail (incremental w/ ivt) (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_KEYIVT'),DRIVE_LRF,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt,ivt_lrt-ivt +Drive to Light rail/Ferry - In-vehicle time on Ferry (incremental w/ keyivt) (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_FERRYIVT'),DRIVE_LRF,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt,ivt_ferry-ivt_lrt +drive to Lrf - Short iwait time (inbound),"$IN_SHORT_WAIT_EXPR.format(sk='WLK_LRF_DRV_IWAIT', th='waitThresh')",DRIVE_LRF,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Lrf - Long iwait time (inbound),"$IN_LONG_WAIT_EXPR.format(sk='WLK_LRF_DRV_IWAIT', th='waitThresh')",DRIVE_LRF,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Lrf - transfer wait time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_XWAIT'),DRIVE_LRF,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Lrf - number of transfers (inbound),$IN_TRANSFERS_EXPR.format(sk='WLK_LRF_DRV_BOARDS'),DRIVE_LRF,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Light rail/Ferry - Drive time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_DTIM'),DRIVE_LRF,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Light rail/Ferry - Walk access time (inbound),origin_walk_time,DRIVE_LRF,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Drive to Light rail/Ferry - Walk other time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_LRF_DRV_WAUX'),DRIVE_LRF,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Light rail/Ferry - Fare and operating cost (inbound),"$AUTO_COST_EXPR.format(sk1='WLK_LRF_DRV_FAR', sk2='WLK_LRF_DRV_DDIST')",DRIVE_LRF,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Light rail/Ferry - Ratio of drive access distance to OD distance (inbound),$IN_AUTO_ACCESS_RATIO_EXPR.format(sk='WLK_LRF_DRV_DDIST'),DRIVE_LRF,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Light rail/Ferry - Destination zone densityIndex (inbound),dest_density_index,DRIVE_LRF,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Light rail/Ferry - Topology (inbound),dest_topology,DRIVE_LRF,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Light rail/Ferry - Person is less than 10 years old (inbound),age < 10,DRIVE_LRF,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Express bus - Unavailable (outbound),drive_express_available == False,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - Unavailable for zero auto households (outbound),auto_ownership == 0,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - Unavailable for persons less than 16 (outbound),age < 16,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - In-vehicle time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_EXP_WLK_TOTIVT'),DRIVE_EXP,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Express bus - In-vehicle time on Express bus (incremental w/ ivt) (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_EXP_WLK_KEYIVT'),DRIVE_EXP,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt +drive to exp - Short iwait time (outbound),"$OUT_SHORT_WAIT_EXPR.format(sk='DRV_EXP_WLK_IWAIT', th='waitThresh')",DRIVE_EXP,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to exp - Long iwait time (outbound),"$OUT_LONG_WAIT_EXPR.format(sk='DRV_EXP_WLK_IWAIT', th='waitThresh')",DRIVE_EXP,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to exp - transfer wait time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_EXP_WLK_XWAIT'),DRIVE_EXP,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to exp - number of transfers (outbound),$OUT_TRANSFERS_EXPR.format(sk='DRV_EXP_WLK_BOARDS'),DRIVE_EXP,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Express bus - Drive time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_EXP_WLK_DTIM'),DRIVE_EXP,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Express bus - Walk egress time (outbound),destination_walk_time,DRIVE_EXP,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Drive to Express bus - Walk other time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_EXP_WLK_WAUX'),DRIVE_EXP,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Express bus - Fare and operating cost (outbound),"$AUTO_COST_EXPR.format(sk1='DRV_EXP_WLK_FAR', sk2='DRV_EXP_WLK_DDIST')",DRIVE_EXP,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Express bus - Ratio of drive access distance to OD distance (outbound),$OUT_AUTO_ACCESS_RATIO_EXPR.format(sk='DRV_EXP_WLK_DDIST'),DRIVE_EXP,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Express bus - Destination zone densityIndex (outbound),dest_density_index,DRIVE_EXP,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Express bus - Topology (outbound),dest_topology,DRIVE_EXP,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Express bus - Person is less than 10 years old (outbound),age < 10,DRIVE_EXP,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Express bus - Unavailable (inbound),drive_express_available == False,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - Unavailable for zero auto households (inbound),auto_ownership == 0,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - Unavailable for persons less than 16 (inbound),age < 16,DRIVE_EXP,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Express bus - In-vehicle time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_EXP_DRV_TOTIVT'),DRIVE_EXP,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Express bus - In-vehicle time on Express bus (incremental w/ ivt) (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_EXP_DRV_KEYIVT'),DRIVE_EXP,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt +drive to exp - Short iwait time (inbound),"$IN_SHORT_WAIT_EXPR.format(sk='WLK_EXP_DRV_IWAIT', th='waitThresh')",DRIVE_EXP,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to exp - Long iwait time (inbound),"$IN_LONG_WAIT_EXPR.format(sk='WLK_EXP_DRV_IWAIT', th='waitThresh')",DRIVE_EXP,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to exp - transfer wait time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_EXP_DRV_XWAIT'),DRIVE_EXP,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to exp - number of transfers (inbound),$IN_TRANSFERS_EXPR.format(sk='WLK_EXP_DRV_BOARDS'),DRIVE_EXP,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Express bus - Drive time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_EXP_DRV_DTIM'),DRIVE_EXP,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Express bus - Walk access time (inbound),origin_walk_time,DRIVE_EXP,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Drive to Express bus - Walk other time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_EXP_DRV_WAUX'),DRIVE_EXP,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Express bus - Fare and operating cost (inbound),"$AUTO_COST_EXPR.format(sk1='WLK_EXP_DRV_FAR', sk2='WLK_EXP_DRV_DDIST')",DRIVE_EXP,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Express bus - Ratio of drive access distance to OD distance (inbound),$IN_AUTO_ACCESS_RATIO_EXPR.format(sk='WLK_EXP_DRV_DDIST'),DRIVE_EXP,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Express bus - Destination zone densityIndex (inbound),dest_density_index,DRIVE_EXP,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Express bus - Topology (inbound),dest_topology,DRIVE_EXP,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Express bus - Person is less than 10 years old (inbound),age < 10,DRIVE_EXP,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to heavy rail - Unavailable (outbound),drive_heavyrail_available == False,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - Unavailable for zero auto households (outbound),auto_ownership == 0,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - Unavailable for persons less than 16 (outbound),age < 16,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - In-vehicle time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_HVY_WLK_TOTIVT'),DRIVE_HVY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to heavy rail - In-vehicle time on heavy rail (incremental w/ ivt) (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_HVY_WLK_KEYIVT'),DRIVE_HVY,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt +drive to HeavyRail - Short iwait time (outbound),"$OUT_SHORT_WAIT_EXPR.format(sk='DRV_HVY_WLK_IWAIT', th='waitThresh')",DRIVE_HVY,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to HeavyRail - Long iwait time (outbound),"$OUT_LONG_WAIT_EXPR.format(sk='DRV_HVY_WLK_IWAIT', th='waitThresh')",DRIVE_HVY,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to HeavyRail - transfer wait time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_HVY_WLK_XWAIT'),DRIVE_HVY,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to HeavyRail - number of transfers (outbound),$OUT_TRANSFERS_EXPR.format(sk='DRV_HVY_WLK_BOARDS'),DRIVE_HVY,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to heavy rail - Drive time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_HVY_WLK_DTIM'),DRIVE_HVY,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to heavy rail - Walk egress time (outbound),destination_walk_time,DRIVE_HVY,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Drive to heavy rail - Walk other time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_HVY_WLK_WAUX'),DRIVE_HVY,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to heavy rail - Fare and operating cost (outbound),"$AUTO_COST_EXPR.format(sk1='DRV_HVY_WLK_FAR', sk2='DRV_HVY_WLK_DDIST')",DRIVE_HVY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to heavy rail - Ratio of drive access distance to OD distance (outbound),$OUT_AUTO_ACCESS_RATIO_EXPR.format(sk='DRV_HVY_WLK_DDIST'),DRIVE_HVY,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to heavy rail - Destination zone densityIndex (outbound),dest_density_index,DRIVE_HVY,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to heavy rail - Topology (outbound),dest_topology,DRIVE_HVY,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to heavy rail - Person is less than 10 years old (outbound),age < 10,DRIVE_HVY,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to heavy rail - Unavailable (inbound),drive_heavyrail_available == False,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - Unavailable for zero auto households (inbound),auto_ownership == 0,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - Unavailable for persons less than 16 (inbound),age < 16,DRIVE_HVY,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to heavy rail - In-vehicle time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_HVY_DRV_TOTIVT'),DRIVE_HVY,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to heavy rail - In-vehicle time on heavy rail (incremental w/ ivt) (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_HVY_DRV_KEYIVT'),DRIVE_HVY,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt,ivt_exp-ivt +drive to HeavyRail - Short iwait time (inbound),"$IN_SHORT_WAIT_EXPR.format(sk='WLK_HVY_DRV_IWAIT', th='waitThresh')",DRIVE_HVY,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to HeavyRail - Long iwait time (inbound),"$IN_LONG_WAIT_EXPR.format(sk='WLK_HVY_DRV_IWAIT', th='waitThresh')",DRIVE_HVY,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to HeavyRail - transfer wait time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_HVY_DRV_XWAIT'),DRIVE_HVY,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to HeavyRail - number of transfers (inbound),$IN_TRANSFERS_EXPR.format(sk='WLK_HVY_DRV_BOARDS'),DRIVE_HVY,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to heavy rail - Drive time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_HVY_DRV_DTIM'),DRIVE_HVY,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to heavy rail - Walk access time (inbound),origin_walk_time,DRIVE_HVY,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Drive to heavy rail - Walk other time (inbound),$IN_SKIM_EXPR_DIV100.format(sk='WLK_HVY_DRV_WAUX'),DRIVE_HVY,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to heavy rail - Fare and operating cost (inbound),"$AUTO_COST_EXPR.format(sk1='WLK_HVY_DRV_FAR', sk2='WLK_HVY_DRV_DDIST')",DRIVE_HVY,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to heavy rail - Ratio of drive access distance to OD distance (inbound),$IN_AUTO_ACCESS_RATIO_EXPR.format(sk='WLK_HVY_DRV_DDIST'),DRIVE_HVY,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to heavy rail - Destination zone densityIndex (inbound),dest_density_index,DRIVE_HVY,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to heavy rail - Topology (inbound),dest_topology,DRIVE_HVY,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to heavy rail - Person is less than 10 years old (inbound),age < 10,DRIVE_HVY,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Commuter rail - Unavailable (outbound),drive_commuter_available == False,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - Unavailable for zero auto households (outbound),auto_ownership == 0,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - Unavailable for persons less than 16 (outbound),age < 16,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - In-vehicle time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_COM_WLK_TOTIVT'),DRIVE_COM,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Commuter rail - In-vehicle time on commuter rail (incremental w/ ivt) (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_COM_WLK_KEYIVT'),DRIVE_COM,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt +drive to Commuter - Short iwait time (outbound),"$OUT_SHORT_WAIT_EXPR.format(sk='DRV_COM_WLK_IWAIT', th='waitThresh')",DRIVE_COM,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Commuter - Long iwait time (outbound),"$OUT_LONG_WAIT_EXPR.format(sk='DRV_COM_WLK_IWAIT', th='waitThresh')",DRIVE_COM,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Commuter - transfer wait time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_COM_WLK_XWAIT'),DRIVE_COM,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Commuter - number of transfers (outbound),$OUT_TRANSFERS_EXPR.format(sk='DRV_COM_WLK_BOARDS'),DRIVE_COM,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Commuter rail - Drive time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_COM_WLK_DTIM'),DRIVE_COM,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Commuter rail - Walk egress time (outbound),destination_walk_time,DRIVE_COM,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr,wegr +Drive to Commuter rail - Walk other time (outbound),$OUT_SKIM_EXPR_DIV100.format(sk='DRV_COM_WLK_WAUX'),DRIVE_COM,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Commuter rail - Fare and operating cost (outbound),"$AUTO_COST_EXPR.format(sk1='DRV_COM_WLK_FAR', sk2='DRV_COM_WLK_DDIST')",DRIVE_COM,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Commuter rail - Ratio of drive access distance to OD distance (outbound),$OUT_AUTO_ACCESS_RATIO_EXPR.format(sk='DRV_COM_WLK_DDIST'),DRIVE_COM,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Commuter rail - Destination zone densityIndex (outbound),dest_density_index,DRIVE_COM,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Commuter rail - Topology (outbound),dest_topology,DRIVE_COM,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Commuter rail - Person is less than 10 years old (outbound),age < 10,DRIVE_COM,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +Drive to Commuter rail - Unavailable,drive_commuter_available == False,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - Unavailable for zero auto households,auto_ownership == 0,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - Unavailable for persons less than 16,age < 16,DRIVE_COM,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive to Commuter rail - In-vehicle time,$IN_SKIM_EXPR_DIV100.format(sk='WLK_COM_DRV_TOTIVT'),DRIVE_COM,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt,ivt +Drive to Commuter rail - In-vehicle time on commuter rail (incremental w/ ivt),$IN_SKIM_EXPR_DIV100.format(sk='WLK_COM_DRV_KEYIVT'),DRIVE_COM,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt,ivt_com-ivt +drive to Commuter - Short iwait time,"$IN_SHORT_WAIT_EXPR.format(sk='WLK_COM_DRV_IWAIT', th='waitThresh')",DRIVE_COM,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait,short_i_wait +drive to Commuter - Long iwait time,"$IN_LONG_WAIT_EXPR.format(sk='WLK_COM_DRV_IWAIT', th='waitThresh')",DRIVE_COM,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait,long_i_wait +drive to Commuter - transfer wait time,$IN_SKIM_EXPR_DIV100.format(sk='WLK_COM_DRV_XWAIT'),DRIVE_COM,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait,xwait +drive to Commuter - number of transfers,$IN_TRANSFERS_EXPR.format(sk='WLK_COM_DRV_BOARDS'),DRIVE_COM,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk,xfers_wlk +Drive to Commuter rail - Drive time,$IN_SKIM_EXPR_DIV100.format(sk='WLK_COM_DRV_DTIM'),DRIVE_COM,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim,dtim +Drive to Commuter rail - Walk access time (inbound),origin_walk_time,DRIVE_COM,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc,wacc +Drive to Commuter rail - Walk other time,$IN_SKIM_EXPR_DIV100.format(sk='WLK_COM_DRV_WAUX'),DRIVE_COM,waux,waux,waux,waux,waux,waux,waux,waux,waux,waux +Drive to Commuter rail - Fare and operating cost ,"$AUTO_COST_EXPR.format(sk1='WLK_COM_DRV_FAR', sk2='WLK_COM_DRV_DDIST')",DRIVE_COM,cost,cost,cost,cost,cost,cost,cost,cost,cost,cost +Drive to Commuter rail - Ratio of drive access distance to OD distance,"$AUTO_ACCESS_RATIO_EXPR.format(sk1='DRV_COM_WLK_DDIST', sk2='WLK_COM_DRV_DDIST')",DRIVE_COM,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio,dacc_ratio +Drive to Commuter rail - Destination zone densityIndex,dest_density_index,DRIVE_COM,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index,density_index +Drive to Commuter rail - Topology,dest_topology,DRIVE_COM,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn,topology_trn +Drive to Commuter rail - Person is less than 10 years old,age < 10,DRIVE_COM,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn,age010_trn +# Auto tour mode availability,1,"BIKE,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM,DRIVE_LOC,DRIVE_LRF,DRIVE_EXP,DRIVE_HVY,DRIVE_COM",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Walk tour mode availability,1,"DRIVEALONEFREE,DRIVEALONEPAY,SHARED2FREE,SHARED2PAY,SHARED3FREE,SHARED3PAY,BIKE,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM,DRIVE_LOC,DRIVE_LRF,DRIVE_EXP,DRIVE_HVY,DRIVE_COM",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Bike tour mode availability,1,"DRIVEALONEFREE,DRIVEALONEPAY,SHARED2FREE,SHARED2PAY,SHARED3FREE,SHARED3PAY,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM,DRIVE_LOC,DRIVE_LRF,DRIVE_EXP,DRIVE_HVY,DRIVE_COM",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Walk to Transit tour mode availability,1,"DRIVEALONEFREE,DRIVEALONEPAY,BIKE,DRIVE_LOC,DRIVE_LRF,DRIVE_EXP,DRIVE_HVY,DRIVE_COM",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Drive to Transit tour modes availability,1,"DRIVEALONEFREE,DRIVEALONEPAY,SHARED2FREE,SHARED2PAY,SHARED3FREE,SHARED3PAY,WALK,BIKE,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Drive Alone tour mode ASC -- shared ride 2,is_not_joint,"SHARED2FREE,SHARED2PAY",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +# Drive Alone tour mode ASC -- shared ride 3+,is_not_joint,"SHARED3FREE,SHARED3PAY",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Drive Alone tour mode ASC -- walk,is_not_joint,WALK,-1.344343839,-1.550723453,-1.29930748,-1.476552815,-1.80770887,0,-71.89771567,-1.05785574,-0.839782842,-1.787473894 +Shared Ride 2 tour mode ASC -- shared ride 2,is_not_joint,"SHARED2FREE,SHARED2PAY",0.997065928,0.747800085,0.857438284,1.376487597,0.566306747,0.353282357,-1.93348969,0.430426176,0.014934415,2.281529095 +# Shared Ride 2 tour mode ASC -- shared ride 3+,is_not_joint,"SHARED3FREE,SHARED3PAY",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 +Shared Ride 2 tour mode ASC -- walk,is_not_joint,WALK,-0.072949363,-0.026777875,-0.598921302,-0.111743765,-0.793229213,-2.052830241,-1.036161548,1.304139015,0.126000749,1.178865139 +Shared Ride 3+ tour mode ASC -- shared ride 2,is_not_joint,"SHARED2FREE,SHARED2PAY",-0.317771269,-0.614152348,-0.295819335,-0.078127539,-0.15559037,-0.268174717,-2.740706064,-0.311663637,-1.19558471,1.038741337 +Shared Ride 3+ tour mode ASC -- shared ride 3+,is_not_joint,"SHARED3FREE,SHARED3PAY",1.33230908,0.73980703,0.952726029,1.339531257,0.833079085,0.735751531,-1.771751501,0.629291807,-0.18355945,2.412827458 +Shared Ride 3+ tour mode ASC -- walk,is_not_joint,WALK,-0.043405058,-0.527196782,0.042226145,-0.507919599,-0.313423023,-1.007502962,-1.21274972,1.679252982,0.217074575,0.810211086 +Bike tour mode ASC -- walk,is_not_joint,WALK,-2.698998569,-1.357697436,-0.570555332,-1.024541244,-13.23840253,-13.5203,-2.033197367,-0.339879036,-1.833340291,-5.053232548 +Walk to Transit tour mode ASC -- light rail,is_not_joint,WALK_LRF,0.539212005,0.539212005,0.539212005,0.539212005,0.539212005,0.525236213,1.443590309,1.443590309,0.462093916,0.539212005 +Walk to Transit tour mode ASC -- ferry,is_not_joint,WALK_LRF,0.646576124,0.646576124,0.646576124,0.646576124,0.646576124,0.600459928,1.72365759,1.72365759,0.527674339,0.646576124 +Walk to Transit tour mode ASC -- express bus,is_not_joint,WALK_EXP,0.664833712,0.664833712,0.664833712,0.664833712,0.664833712,0.754709502,0.322407574,0.322407574,-0.355369485,0.664833712 +Walk to Transit tour mode ASC -- heavy rail,is_not_joint,WALK_HVY,0.540251582,0.540251582,0.540251582,0.540251582,0.540251582,0.5673261,0.848959992,0.848959992,0.353781118,0.540251582 +Walk to Transit tour mode ASC -- commuter rail,is_not_joint,WALK_COM,0.512907922,0.512907922,0.512907922,0.512907922,0.512907922,0.544175713,0.908156177,0.908156177,0.40115213,0.512907922 +Walk to Transit tour mode ASC -- shared ride 2,is_not_joint,"SHARED2FREE,SHARED2PAY",-3.143407058,-2.759007562,-34.67456187,-4.0114961,-3.366320437,-2.628439873,-4.296092812,-4.005017965,-3.663122289,-22.65874595 +Walk to Transit tour mode ASC -- shared ride 3+,is_not_joint,"SHARED3FREE,SHARED3PAY",-3.852044542,-2.512647108,-29.38579347,-4.385155288,-21.63085385,-3.207352283,-3.866464,-28.69716687,-4.131364699,-35.95797331 +# Walk to Transit tour mode ASC -- walk,is_not_joint,WALK,1.350388931,-0.499675124,0.724785175,-0.194256108,-0.765058819,-0.997388272,-1.182816692,-1.031076463,0.443222869,0.516523008 +Drive to Transit tour mode ASC -- light rail,is_not_joint,DRIVE_LRF,0.539212005,0.539212005,0.539212005,0.539212005,0.539212005,0.525236213,1.443590309,1.443590309,0.462093916,0.539212005 +Drive to Transit tour mode ASC -- ferry,is_not_joint,DRIVE_LRF,0.646576124,0.646576124,0.646576124,0.646576124,0.646576124,0.600459928,1.72365759,1.72365759,0.527674339,0.646576124 +Drive to Transit tour mode ASC -- express bus,is_not_joint,DRIVE_EXP,0.664833712,0.664833712,0.664833712,0.664833712,0.664833712,0.754709502,0.322407574,0.322407574,-0.355369485,0.664833712 +Drive to Transit tour mode ASC -- heavy rail,is_not_joint,DRIVE_HVY,0.540251582,0.540251582,0.540251582,0.540251582,0.540251582,0.5673261,0.848959992,0.848959992,0.353781118,0.540251582 +Drive to Transit tour mode ASC -- commuter rail,is_not_joint,DRIVE_COM,0.512907922,0.512907922,0.512907922,0.512907922,0.512907922,0.544175713,0.908156177,0.908156177,0.40115213,0.512907922 +Auto tour mode ASC -- shared ride 2 -- Joint Tours,is_joint,"SHARED2FREE,SHARED2PAY",-0.06343395,-0.06343395,-0.06343395,0.587454493,-0.06343395,0,0,0,0,0 +Auto tour mode ASC -- shared ride 3+ -- Joint Tours,is_joint,"SHARED3FREE,SHARED3PAY",-0.162541736,-0.162541736,-0.162541736,-19.04538851,-0.162541736,0,0,0,0,0 +Auto tour mode ASC -- walk -- Joint Tours,is_joint,WALK,-0.714358153,-0.714358153,-0.714358153,-23.46884389,-0.714358153,0,0,0,0,0 +Bike tour mode ASC -- walk -- Joint Tours,is_joint,WALK,-15.55879637,-14.44396327,-13.51919314,-7.047573362,-26.17135927,0,0,0,0,0 +Walk to Transit tour mode ASC -- light rail -- Joint Tours,is_joint,WALK_LRF,0.539212005,0.539212005,0.539212005,0.539212005,0.539212005,0,0,0,0,0 +Walk to Transit tour mode ASC -- ferry -- Joint Tours,is_joint,WALK_LRF,0.646576124,0.646576124,0.646576124,0.646576124,0.646576124,0,0,0,0,0 +Walk to Transit tour mode ASC -- express bus -- Joint Tours,is_joint,WALK_EXP,0.664833712,0.664833712,0.664833712,0.664833712,0.664833712,0,0,0,0,0 +Walk to Transit tour mode ASC -- heavy rail -- Joint Tours,is_joint,WALK_HVY,0.540251582,0.540251582,0.540251582,0.540251582,0.540251582,0,0,0,0,0 +Walk to Transit tour mode ASC -- commuter rail -- Joint Tours,is_joint,WALK_COM,0.512907922,0.512907922,0.512907922,0.512907922,0.512907922,0,0,0,0,0 +Walk to Transit tour mode ASC -- shared ride 2 -- Joint Tours,is_joint,"SHARED2FREE,SHARED2PAY",-14.91337562,-14.980078,-5.323041523,-21.57680789,-20.50219117,0,0,0,0,0 +Walk to Transit tour mode ASC -- shared ride 3+ -- Joint Tours,is_joint,"SHARED3FREE,SHARED3PAY",-16.75871971,-16.73544152,-3.956326423,-25.59527406,-34.73775409,0,0,0,0,0 +Walk to Transit tour mode ASC -- walk -- Joint Tours,is_joint,WALK,2.301660759,-0.002432941,1.187563236,-0.547227887,-2.130052251,0,0,0,0,0 +Drive to Transit tour mode ASC -- light rail -- Joint Tours,is_joint,DRIVE_LRF,0.539212005,0.539212005,0.539212005,0.539212005,0.539212005,0,0,0,0,0 +Drive to Transit tour mode ASC -- ferry -- Joint Tours,is_joint,DRIVE_LRF,0.646576124,0.646576124,0.646576124,0.646576124,0.646576124,0,0,0,0,0 +Drive to Transit tour mode ASC -- express bus -- Joint Tours,is_joint,DRIVE_EXP,0.664833712,0.664833712,0.664833712,0.664833712,0.664833712,0,0,0,0,0 +Drive to Transit tour mode ASC -- heavy rail -- Joint Tours,is_joint,DRIVE_HVY,0.540251582,0.540251582,0.540251582,0.540251582,0.540251582,0,0,0,0,0 +Drive to Transit tour mode ASC -- commuter rail -- Joint Tours,is_joint,DRIVE_COM,0.512907922,0.512907922,0.512907922,0.512907922,0.512907922,0,0,0,0,0 +# Walk not available for long distances,(tourMode!=7)*(walk_dist>3),WALK,1,1,1,1,1,1,1,1,1,1 +# Bike not available for long distances,(tourMode!=8)*(bike_dist>8),BIKE,1,1,1,1,1,1,1,1,1,1 +# Origin density index,"max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","WALK,BIKE,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)","max(c_originDensityIndex*originDensityIndex,c_originDensityIndexMax)" +# Walk-express penalty for intermediate stops,1,WALK_EXP,-0.279,-0.279,-0.279,-0.279,-0.279,-0.279,-0.271,-0.271,-0.22,-0.279 \ No newline at end of file diff --git a/example/configs/trip_mode_choice.yaml b/example/configs/trip_mode_choice.yaml new file mode 100644 index 0000000000..a1730cb9ba --- /dev/null +++ b/example/configs/trip_mode_choice.yaml @@ -0,0 +1,92 @@ +NESTS: + AUTO: + DRIVEALONE: + - DRIVEALONEFREE + - DRIVEALONEPAY + SHAREDRIDE2: + - SHARED2FREE + - SHARED2PAY + SHAREDRIDE3: + - SHARED3FREE + - SHARED3PAY + NONMOTORIZED: + - WALK + - BIKE + TRANSIT: + WALKACCESS: + - WALK_LOC + - WALK_LRF + - WALK_EXP + - WALK_HVY + - WALK_COM + DRIVEACCESS: + - DRIVE_LOC + - DRIVE_LRF + - DRIVE_EXP + - DRIVE_HVY + - DRIVE_COM + + +VARIABLE_TEMPLATES: + TERMINAL_TIME_EXPR: "2 * terminal_time" + OPERATING_COST_EXPR: "@costPerMile * (out_skims['{sk}'] + in_skims['{sk}'])" + IN_N_OUT_EXPR: "@out_skims['{sk}'] + in_skims['{sk}']" + IN_N_OUT_EXPR_DIV100: "@out_skims['{sk}']/100 + in_skims['{sk}']/100" + UNAVAILABILITY_PARTY_2: "is_joint & (number_of_participants > 2)" + DAILY_PARKING_SHARE_2: "@df.daily_parking_cost / costShareSr2" + DAILY_PARKING_SHARE_3: "@df.daily_parking_cost / costShareSr3" + IN_N_OUT_SHARE_2: "@(out_skims['{sk}'] + in_skims['{sk}']) / costShareSr2" + IN_N_OUT_SHARE_3: "@(out_skims['{sk}'] + in_skims['{sk}']) / costShareSr3" + SHORT_WAIT_EXPR: "@(out_skims['{sk}']/100).clip(upper={th})+ + (in_skims['{sk}']/100).clip(upper={th})" + LONG_WAIT_EXPR: "@(out_skims['{sk}']/100-{th}).clip(0)+ + (in_skims['{sk}']/100-{th}).clip(0)" + TRANSFERS_EXPR: "@(out_skims['{sk}']-1).clip(0)+ + (in_skims['{sk}']-1).clip(0)" + IN_N_OUT_2SKIM_EXPR: "@out_skims['{sk1}'] + in_skims['{sk2}']" + IN_N_OUT_2SKIM_EXPR_DIV100: "@out_skims['{sk1}']/100 + + in_skims['{sk2}']/100" + OUT_SKIM_EXPR_DIV100: "@out_skims['{sk}']/100" + IN_SKIM_EXPR_DIV100: "@in_skims['{sk}']/100" + SHORT_WAIT_2SKIM_EXPR: "@(out_skims['{sk1}']/100).clip(upper={th})+ + (in_skims['{sk2}']/100).clip(upper={th})" + OUT_SHORT_WAIT_EXPR: "@(out_skims['{sk}']/100).clip(upper={th})" + IN_SHORT_WAIT_EXPR: "@(in_skims['{sk}']/100).clip(upper={th})" + LONG_WAIT_2SKIM_EXPR: "@(out_skims['{sk1}']/100-{th}).clip(0)+ + (in_skims['{sk2}']/100-{th}).clip(0)" + OUT_LONG_WAIT_EXPR: "@(out_skims['{sk}']/100-{th}).clip(0)" + IN_LONG_WAIT_EXPR: "@(in_skims['{sk}']/100-{th}).clip(0)" + TRANSFERS_2SKIM_EXPR: "@(out_skims['{sk1}']-1).clip(0)+ + (in_skims['{sk2}']-1).clip(0)" + OUT_TRANSFERS_EXPR: "@(out_skims['{sk}']-1).clip(0)" + IN_TRANSFERS_EXPR: "@(in_skims['{sk}']-1).clip(0)" + AUTO_COST_EXPR: "@(out_skims['{sk1}']+in_skims['{sk2}'])+ + ((out_skims['{sk1}']/100+in_skims['{sk2}']/100) + *costPerMile)" + AUTO_ACCESS_RATIO_EXPR: "@(out_skims['{sk1}']/100+ + in_skims['{sk2}']/100)/ + (skims['DISTANCE']*2)" + OUT_AUTO_ACCESS_RATIO_EXPR: "@out_skims['{sk}']/100/ + skims['DISTANCE']" + IN_AUTO_ACCESS_RATIO_EXPR: "@in_skims['{sk}']/100/ + skims['DISTANCE']" + + +CONSTANTS: + valueOfTime: 8.00 + costPerMile: 18.48 + costShareSr2: 1.75 + costShareSr3: 2.50 + waitThresh: 10.00 + walkThresh: 1.0 + shortWalk: 0.333 + longWalk: 0.667 + walkSpeed: 3.00 + bikeThresh: 6.00 + bikeSpeed: 12.00 + maxCbdAreaTypeThresh: 2 + indivTour: 1.00000 + upperEA: 5 + upperAM: 10 + upperMD: 15 + upperPM: 19 diff --git a/example/configs/trip_mode_choice_coeffs.csv b/example/configs/trip_mode_choice_coeffs.csv new file mode 100644 index 0000000000..bd9c4a82a6 --- /dev/null +++ b/example/configs/trip_mode_choice_coeffs.csv @@ -0,0 +1,34 @@ +Expression,eatout,othdiscr,othmaint,shopping,social,escort,school,university,work,workbased +ivt,-0.0279,-0.0279,-0.0279,-0.0279,-0.0279,-0.0279,-0.0271,-0.0271,-0.022,-0.0279 +ivt_lrt,-0.02511,-0.02511,-0.02511,-0.02511,-0.02511,-0.02511,-0.02439,-0.02439,-0.0198,-0.02511 +ivt_ferry,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02168,-0.02168,-0.0176,-0.02232 +ivt_exp,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175,-0.0175 +ivt_hvy,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02168,-0.02168,-0.0176,-0.02232 +ivt_com,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02232,-0.02168,-0.02168,-0.0176,-0.02232 +short_i_wait,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +long_i_wait,-0.0279,-0.0279,-0.0279,-0.0279,-0.0279,-0.0279,-0.0271,-0.0271,-0.022,-0.0279 +wacc,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +wegr,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +waux,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +dtim,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +xfers_wlk,-0.1395,-0.1395,-0.1395,-0.1395,-0.1395,-0.1395,-0.1355,-0.1355,-0.11,-0.1395 +xfers_drv,-0.4185,-0.4185,-0.4185,-0.4185,-0.4185,-0.4185,-0.4065,-0.4065,-0.33,-0.4185 +xwait,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +walktimeshort,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0558,-0.0542,-0.0542,-0.044,-0.0558 +walktimelong,-0.279,-0.279,-0.279,-0.279,-0.279,-0.279,-0.271,-0.271,-0.22,-0.279 +biketimeshort,-0.1116,-0.1116,-0.1116,-0.1116,-0.1116,-0.1116,-0.1084,-0.1084,-0.088,-0.1116 +biketimelong,-0.558,-0.558,-0.558,-0.558,-0.558,-0.558,-0.542,-0.542,-0.44,-0.558 +vot,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime,valueOfTime +cost,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot,(0.6*ivt)/vot +dacc_ratio,0,0,0,0,0,0,0,0,0,0 +topology_walk,-0.4185,-0.4185,-0.4185,-0.4185,-0.4185,-0.4185,-0.4065,-0.4065,-0.33,-0.4185 +topology_bike,-0.558,-0.558,-0.558,-0.558,-0.558,-0.558,-0.542,-0.542,-0.44,-0.558 +topology_trn,-0.06138,-0.06138,-0.06138,-0.06138,-0.06138,-0.06138,-0.05962,-0.05962,-0.0484,-0.06138 +density_index,0.00558,0.00558,0.00558,0.00558,0.00558,0.00558,0.00542,0.00542,0.0044,0.00558 +originDensityIndex,0.01674,0.01674,0.01674,0.01674,0.01674,0.01674,0.01626,0.01626,0.0132,0.01674 +originDensityIndexMax,0.4185,0.4185,0.4185,0.4185,0.4185,0.4185,0.4065,0.4065,0.33,0.4185 +age1619_da,0,0,0,0,0,0,0,0,0,0 +age010_trn,0,0,0,0,0,0,0,0,0,0 +age16p_sr,0,0,0,0,0,0,0,0,0,0 +hhsize1_sr,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346,-0.7346 +hhsize2_sr,0,0,0,0,0,0,0,0,0,0 diff --git a/example/simulation.ipynb b/example/simulation.ipynb index 09f5054f39..48cc18f9a6 100644 --- a/example/simulation.ipynb +++ b/example/simulation.ipynb @@ -44,7 +44,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'school_location_simulate'\n", + "Running step 'school_location_simulate'\n", "WARNING: Some columns have no variability:\n", "['mode_choice_logsums']\n", "WARNING: Some columns have no variability:\n", @@ -52,17 +52,19 @@ "WARNING: Some columns have no variability:\n", "['mode_choice_logsums']\n", "Describe of choices:\n", - "count 258.000000\n", - "mean 246.577519\n", - "std 442.402351\n", + "count 2551.000000\n", + "mean 192.829479\n", + "std 395.362863\n", "min -1.000000\n", "25% -1.000000\n", "50% -1.000000\n", - "75% 352.250000\n", - "max 1444.000000\n", + "75% 66.500000\n", + "max 1450.000000\n", "Name: TAZ, dtype: float64\n", - "Time to execute model 'school_location_simulate': 9.35s\n", - "Total time to execute: 9.35s\n" + "Adding distance_to_school\n", + "Adding roundtrip_auto_time_to_school\n", + "Time to execute step 'school_location_simulate': 9.35 s\n", + "Total time to execute iteration 1 with iteration value None: 9.35 s\n" ] } ], @@ -74,28 +76,34 @@ "cell_type": "code", "execution_count": 3, "metadata": { - "collapsed": false + "collapsed": false, + "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Running model 'workplace_location_simulate'\n", + "Running step 'workplace_location_simulate'\n", "WARNING: Some columns have no variability:\n", - "['mode_choice_logsums']\n", + "[\"@(df.income_segment==2)&(df['work, med']==0)\"\n", + " \"@(df.income_segment==3)&(df['work, high']==0)\"\n", + " \"@(df.income_segment==4)&(df['work, veryhigh']==0)\" 'mode_choice_logsums']\n", "Describe of choices:\n", - "count 258.000000\n", - "mean 808.961240\n", - "std 414.539647\n", + "count 2551.000000\n", + "mean 741.157193\n", + "std 431.117730\n", "min 1.000000\n", - "25% 521.000000\n", - "50% 781.000000\n", - "75% 1172.750000\n", + "25% 367.500000\n", + "50% 769.000000\n", + "75% 1120.000000\n", "max 1452.000000\n", "Name: TAZ, dtype: float64\n", - "Time to execute model 'workplace_location_simulate': 7.58s\n", - "Total time to execute: 7.58s\n" + "Adding workplace_in_cbd\n", + "Adding school_taz\n", + "Adding roundtrip_auto_time_to_work\n", + "Time to execute step 'workplace_location_simulate': 3.69 s\n", + "Total time to execute iteration 1 with iteration value None: 3.69 s\n" ] } ], @@ -114,14 +122,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "count 258.000000\n", - "mean 2.042713\n", - "std 1.327850\n", - "min 0.220000\n", - "25% 1.115000\n", - "50% 1.765000\n", - "75% 2.710000\n", - "max 9.260000\n", + "count 2551.00000\n", + "mean 5.98539\n", + "std 6.01567\n", + "min 0.15000\n", + "25% 2.40500\n", + "50% 4.11000\n", + "75% 7.12500\n", + "max 62.28000\n", "dtype: float64\n" ] } @@ -142,18 +150,20 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'auto_ownership_simulate'\n", + "Running step 'auto_ownership_simulate'\n", "WARNING: Some columns have no variability:\n", "['@1' 'work_tour_auto_time_savings / (workers+1)']\n", "Choices:\n", - "2 38\n", - "1 26\n", - "3 19\n", - "0 12\n", - "4 5\n", + "2 378\n", + "1 325\n", + "3 152\n", + "0 97\n", + "4 48\n", "dtype: int64\n", - "Time to execute model 'auto_ownership_simulate': 0.39s\n", - "Total time to execute: 0.39s\n" + "Adding no_cars\n", + "Adding car_sufficiency\n", + "Time to execute step 'auto_ownership_simulate': 0.62 s\n", + "Total time to execute iteration 1 with iteration value None: 0.62 s\n" ] } ], @@ -172,14 +182,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'cdap_simulate'\n", + "Running step 'cdap_simulate'\n", "Choices:\n", - "Home 102\n", - "NonMandatory 95\n", - "Mandatory 61\n", + "Home 1033\n", + "NonMandatory 772\n", + "Mandatory 746\n", "dtype: int64\n", - "Time to execute model 'cdap_simulate': 6.01s\n", - "Total time to execute: 6.01s\n" + "Time to execute step 'cdap_simulate': 8.04 s\n", + "Total time to execute iteration 1 with iteration value None: 8.04 s\n" ] } ], @@ -199,41 +209,32 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'mandatory_tour_frequency'\n", - "61 persons run for mandatory tour model\n", - "count 61.000000\n", - "mean 724.868852\n", - "std 432.226271\n", + "Running step 'mandatory_tour_frequency'\n", + "746 persons run for mandatory tour model\n", + "count 746.000000\n", + "mean 732.648794\n", + "std 431.264882\n", "min 1.000000\n", - "25% 409.000000\n", - "50% 737.000000\n", - "75% 1091.000000\n", - "max 1419.000000\n", + "25% 342.250000\n", + "50% 764.500000\n", + "75% 1110.250000\n", + "max 1452.000000\n", "Name: workplace_taz, dtype: float64\n", "WARNING: Some columns have no variability:\n", - "['(ptype == 6) & student_is_employed' '(ptype == 1) & nonstudent_to_school'\n", - " '(ptype == 2) & nonstudent_to_school'\n", + "['(ptype == 2) & nonstudent_to_school'\n", " '(ptype == 4) & nonstudent_to_school'\n", " '(ptype == 5) & nonstudent_to_school'\n", - " '(ptype == 2) & (auto_ownership == 0)'\n", - " '(ptype == 3) & (auto_ownership == 0)'\n", - " '(ptype == 5) & (auto_ownership == 0)'\n", - " '(ptype == 6) & (auto_ownership == 0)'\n", - " '(ptype == 6) & (auto_ownership < drivers)'\n", - " '(ptype == 1) * (num_young_children)'\n", - " '(ptype == 5) * (num_young_children)'\n", - " '(ptype == 6) * (num_young_children)'\n", - " '(ptype == 7) * (num_young_children)' '(ptype == 2) & non_family'\n", - " '(ptype == 6) & non_family' '(ptype == 6) & home_is_urban'\n", - " '(ptype == 7) & home_is_urban' '~(workplace_taz > -1)']\n", + " '(ptype == 6) & (auto_ownership == 0)' '(ptype == 6) & non_family'\n", + " '(ptype == 7) & non_family' '~(workplace_taz > -1)' '~(school_taz > -1)']\n", "Choices:\n", - "work1 32\n", - "work2 22\n", - "school2 4\n", - "school1 3\n", + "school1 303\n", + "work1 250\n", + "work2 107\n", + "work_and_school 71\n", + "school2 15\n", "dtype: int64\n", - "Time to execute model 'mandatory_tour_frequency': 4.23s\n", - "Total time to execute: 4.23s\n" + "Time to execute step 'mandatory_tour_frequency': 1.09 s\n", + "Total time to execute iteration 1 with iteration value None: 1.09 s\n" ] } ], @@ -251,8 +252,8 @@ { "data": { "text/plain": [ - "work 76\n", - "school 11\n", + "work 535\n", + "school 404\n", "dtype: int64" ] }, @@ -277,51 +278,43 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'mandatory_scheduling'\n", - "Running 11 school tour scheduling choices\n", - "Running 7 #1 tour choices\n", + "Running step 'mandatory_scheduling'\n", + "Running 404 school tour scheduling choices\n", + "Running 389 #1 tour choices\n", "WARNING: Some columns have no variability:\n", - "['(ptype == 1) * start' '(ptype == 1) * duration' '(ptype == 4) * start'\n", - " '(workers == hhsize) * duration' '(tour_num > 1) & (start < end_previous)'\n", - " '(tour_num > 1) * duration' '(tour_num > 1) & (duration < 6)'\n", - " 'work_and_school_and_worker & (duration < 6)'\n", - " 'work_and_school_and_student & (duration < 6)']\n", - "Running 4 #2 tour choices\n", + "['(tour_num > 1) & (start < end_previous)']\n", + "Running 15 #2 tour choices\n", "WARNING: Some columns have no variability:\n", "['(ptype == 1) * start' '(ptype == 1) * duration' '(ptype == 4) * start'\n", + " '(ptype == 3) * start' '(ptype == 3) * duration'\n", " '(workers == hhsize) * duration' '(tour_num == 1) * start'\n", - " '(tour_num == 1) * duration' '(income_in_thousands >= 100) & (start < 6)'\n", - " '(income_in_thousands >= 100) & (end > 22)'\n", - " '(tour_num == 1) & (duration < 6)'\n", + " '(tour_num == 1) * duration' '(tour_num == 1) & (duration < 6)'\n", " 'work_and_school_and_worker & (duration < 6)'\n", " 'work_and_school_and_student & (duration < 6)']\n", - "Running 76 work tour scheduling choices\n", - "Running 54 #1 tour choices\n", + "Running 535 work tour scheduling choices\n", + "Running 428 #1 tour choices\n", "WARNING: Some columns have no variability:\n", - "['(start <= end_previous) & (tour_num == 2)' '(tour_num == 2) * start'\n", - " '(tour_num == 2) * duration' 'home_is_rural & (start < 6)'\n", - " 'home_is_rural & (end > 22)' '(tour_num == 2) & (duration < 8)'\n", - " \"(mandatory_tour_frequency == 'work_and_school') & is_worker & (duration < 8)\"\n", - " \"(mandatory_tour_frequency == 'work_and_school') & is_student & (duration < 8)\"]\n", - "Running 22 #2 tour choices\n", + "['home_is_rural & (start < 6)' 'home_is_rural & (end > 22)']\n", + "Running 107 #2 tour choices\n", "WARNING: Some columns have no variability:\n", - "['(ptype == 3) * start' '(tour_num == 1) * start'\n", - " '(tour_num == 1) * duration' 'home_is_rural & (start < 6)'\n", - " 'home_is_rural & (end > 22)' '(tour_num == 1) & (duration < 8)'\n", + "['(tour_num == 1) * start' '(tour_num == 1) * duration'\n", + " 'home_is_rural & (start < 6)' 'home_is_rural & (end > 22)'\n", + " '(ptype == 2) & (end > 12) & (end < 16)'\n", + " '(tour_num == 1) & (duration < 8)'\n", " \"(mandatory_tour_frequency == 'work_and_school') & is_worker & (duration < 8)\"\n", " \"(mandatory_tour_frequency == 'work_and_school') & is_student & (duration < 8)\"]\n", "Choices:\n", - "count 87.000000\n", - "mean 151.563218\n", - "std 71.138042\n", + "count 939.000000\n", + "mean 170.382322\n", + "std 38.437163\n", "min 0.000000\n", - "25% 171.500000\n", - "50% 188.000000\n", - "75% 189.000000\n", + "25% 177.000000\n", + "50% 186.000000\n", + "75% 188.000000\n", "max 189.000000\n", "dtype: float64\n", - "Time to execute model 'mandatory_scheduling': 5.17s\n", - "Total time to execute: 5.17s\n" + "Time to execute step 'mandatory_scheduling': 1.85 s\n", + "Total time to execute iteration 1 with iteration value None: 1.85 s\n" ] } ], @@ -340,9 +333,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'non_mandatory_tour_frequency'\n", - "156 persons run for non-mandatory tour model\n", - "Running segment 'driving' of size 6\n", + "Running step 'non_mandatory_tour_frequency'\n", + "1518 persons run for non-mandatory tour model\n", + "Running segment 'driving' of size 36\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -353,20 +346,13 @@ " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", " 'no_cars & (tot_tours == 1)' 'no_cars & (tot_tours == 2)'\n", " 'no_cars & (tot_tours == 3)' 'no_cars & (tot_tours == 4)'\n", - " 'no_cars & (tot_tours > 4)' '(car_sufficiency > 0) & (tot_tours == 1)'\n", - " '(car_sufficiency > 0) & (tot_tours == 2)'\n", - " '(car_sufficiency > 0) & (tot_tours == 3)'\n", - " '(car_sufficiency > 0) & (tot_tours == 4)'\n", - " '(car_sufficiency > 0) & (tot_tours > 4)' 'has_driving_kid * escort'\n", - " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", - " 'has_driving_kid * shopping' 'has_school_kid_at_home * shopping'\n", - " 'has_preschool_kid_at_home * shopping' 'has_driving_kid * othmaint'\n", - " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", - " 'has_driving_kid * eatout' 'has_school_kid_at_home * eatout'\n", - " 'has_preschool_kid_at_home * eatout' 'has_driving_kid * othdiscr'\n", - " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr'\n", - " 'escort * no_cars']\n", - "Running segment 'full' of size 46\n", + " 'no_cars & (tot_tours > 4)' 'has_school_kid_at_home * escort'\n", + " 'has_preschool_kid_at_home * escort' 'has_school_kid_at_home * shopping'\n", + " 'has_preschool_kid_at_home * shopping' 'has_school_kid_at_home * othmaint'\n", + " 'has_preschool_kid_at_home * othmaint' 'has_school_kid_at_home * eatout'\n", + " 'has_preschool_kid_at_home * eatout' 'has_school_kid_at_home * othdiscr'\n", + " 'has_preschool_kid_at_home * othdiscr' 'escort * no_cars']\n", + "Running segment 'full' of size 504\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -375,17 +361,12 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " '(car_sufficiency > 0) & (tot_tours == 1)'\n", - " '(car_sufficiency > 0) & (tot_tours == 2)'\n", - " '(car_sufficiency > 0) & (tot_tours == 3)'\n", - " '(car_sufficiency > 0) & (tot_tours == 4)'\n", - " '(car_sufficiency > 0) & (tot_tours > 4)'\n", " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", - "Running segment 'nonwork' of size 38\n", + "Running segment 'nonwork' of size 273\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -394,17 +375,12 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " 'has_retiree & (tot_tours == 1)' 'has_retiree & (tot_tours == 2)'\n", - " 'has_retiree & (tot_tours == 3)' 'has_retiree & (tot_tours == 4)'\n", - " 'has_retiree & (tot_tours == 5)' 'has_retiree * escort'\n", " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", - " 'has_retiree * shopping' 'has_school_kid_at_home * shopping'\n", - " 'has_preschool_kid_at_home * shopping' 'has_retiree * othmaint'\n", + " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", - " 'has_retiree * eatout' 'has_school_kid_at_home * eatout'\n", - " 'has_preschool_kid_at_home * eatout' 'has_retiree * othdiscr'\n", + " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", - "Running segment 'part' of size 13\n", + "Running segment 'part' of size 135\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -413,20 +389,12 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " 'no_cars & (tot_tours == 1)' 'no_cars & (tot_tours == 2)'\n", - " 'no_cars & (tot_tours == 3)' 'no_cars & (tot_tours == 4)'\n", - " 'no_cars & (tot_tours > 4)' '(car_sufficiency > 0) & (tot_tours == 1)'\n", - " '(car_sufficiency > 0) & (tot_tours == 2)'\n", - " '(car_sufficiency > 0) & (tot_tours == 3)'\n", - " '(car_sufficiency > 0) & (tot_tours == 4)'\n", - " '(car_sufficiency > 0) & (tot_tours > 4)'\n", " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", - " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr'\n", - " 'escort * no_cars']\n", - "Running segment 'preschool' of size 12\n", + " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", + "Running segment 'preschool' of size 124\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -435,25 +403,17 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " '(100 < income_in_thousands) & (tot_tours == 1)'\n", - " '(100 < income_in_thousands) & (tot_tours == 2)'\n", - " '(100 < income_in_thousands) & (tot_tours == 3)'\n", - " '(100 < income_in_thousands) & (tot_tours == 4)'\n", - " '(100 < income_in_thousands) & (tot_tours > 4)'\n", - " '(100 < income_in_thousands) * shopping'\n", - " '(100 < income_in_thousands) * othmaint'\n", - " '(100 < income_in_thousands) * eatout'\n", - " '(100 < income_in_thousands) * othdiscr'\n", - " '(100 < income_in_thousands) * social' 'no_cars & (tot_tours == 1)'\n", - " 'no_cars & (tot_tours == 2)' 'no_cars & (tot_tours == 3)'\n", - " 'no_cars & (tot_tours == 4)' 'no_cars & (tot_tours > 4)'\n", + " '(car_sufficiency > 0) & (tot_tours == 1)'\n", + " '(car_sufficiency > 0) & (tot_tours == 2)'\n", + " '(car_sufficiency > 0) & (tot_tours == 3)'\n", + " '(car_sufficiency > 0) & (tot_tours == 4)'\n", + " '(car_sufficiency > 0) & (tot_tours > 4)'\n", " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", - " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr'\n", - " 'escort * no_cars']\n", - "Running segment 'retired' of size 14\n", + " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", + "Running segment 'retired' of size 172\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -462,41 +422,12 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " '(100 < income_in_thousands) & (tot_tours == 1)'\n", - " '(100 < income_in_thousands) & (tot_tours == 2)'\n", - " '(100 < income_in_thousands) & (tot_tours == 3)'\n", - " '(100 < income_in_thousands) & (tot_tours == 4)'\n", - " '(100 < income_in_thousands) & (tot_tours > 4)'\n", - " '(100 < income_in_thousands) * shopping'\n", - " '(100 < income_in_thousands) * othmaint'\n", - " '(100 < income_in_thousands) * eatout'\n", - " '(100 < income_in_thousands) * othdiscr'\n", - " '(100 < income_in_thousands) * social'\n", - " '(car_sufficiency > 0) & (tot_tours == 1)'\n", - " '(car_sufficiency > 0) & (tot_tours == 2)'\n", - " '(car_sufficiency > 0) & (tot_tours == 3)'\n", - " '(car_sufficiency > 0) & (tot_tours == 4)'\n", - " '(car_sufficiency > 0) & (tot_tours > 4)'\n", - " 'has_non_worker & (tot_tours == 1)' 'has_non_worker & (tot_tours == 2)'\n", - " 'has_non_worker & (tot_tours == 3)' 'has_non_worker & (tot_tours == 4)'\n", - " 'has_non_worker & (tot_tours == 5)' 'has_preschool_kid & (tot_tours == 1)'\n", - " 'has_preschool_kid & (tot_tours == 2)'\n", - " 'has_preschool_kid & (tot_tours == 3)'\n", - " 'has_preschool_kid & (tot_tours == 4)'\n", - " 'has_preschool_kid & (tot_tours == 5)' 'has_non_worker * escort'\n", - " 'has_driving_kid * escort' 'has_preschool_kid * escort'\n", " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", - " 'has_non_worker * shopping' 'has_driving_kid * shopping'\n", - " 'has_preschool_kid * shopping' 'has_school_kid_at_home * shopping'\n", - " 'has_preschool_kid_at_home * shopping' 'has_non_worker * othmaint'\n", - " 'has_driving_kid * othmaint' 'has_preschool_kid * othmaint'\n", + " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", - " 'has_non_worker * eatout' 'has_driving_kid * eatout'\n", - " 'has_preschool_kid * eatout' 'has_school_kid_at_home * eatout'\n", - " 'has_preschool_kid_at_home * eatout' 'has_non_worker * othdiscr'\n", - " 'has_driving_kid * othdiscr' 'has_preschool_kid * othdiscr'\n", + " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", - "Running segment 'school' of size 19\n", + "Running segment 'school' of size 179\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -505,15 +436,13 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " 'has_university * escort' 'has_school_kid_at_home * escort'\n", - " 'has_preschool_kid_at_home * escort' 'has_university * shopping'\n", + " '(car_sufficiency > 0) & (tot_tours == 1)'\n", + " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", - " 'has_university * othmaint' 'has_school_kid_at_home * othmaint'\n", - " 'has_preschool_kid_at_home * othmaint' 'has_university * eatout'\n", + " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", - " 'has_university * othdiscr' 'has_school_kid_at_home * othdiscr'\n", - " 'has_preschool_kid_at_home * othdiscr']\n", - "Running segment 'university' of size 8\n", + " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", + "Running segment 'university' of size 95\n", "WARNING: Some columns have no variability:\n", "['num_joint_tours*(tot_tours == 0)' 'num_joint_tours*(tot_tours == 1)'\n", " 'num_joint_tours*(tot_tours == 2)' 'num_joint_tours*(tot_tours == 3)'\n", @@ -522,53 +451,67 @@ " 'max_window*(tot_tours == 0)' 'max_window*(tot_tours == 1)'\n", " 'max_window*(tot_tours == 2)' 'max_window*(tot_tours == 3)'\n", " 'max_window*(tot_tours == 4)' 'max_window*(tot_tours > 4)'\n", - " 'no_cars & (tot_tours == 1)' 'no_cars & (tot_tours == 2)'\n", - " 'no_cars & (tot_tours == 3)' 'no_cars & (tot_tours == 4)'\n", - " 'no_cars & (tot_tours > 4)' 'has_retiree & (tot_tours == 1)'\n", - " 'has_retiree & (tot_tours == 2)' 'has_retiree & (tot_tours == 3)'\n", - " 'has_retiree & (tot_tours == 4)' 'has_retiree & (tot_tours == 5)'\n", - " 'has_school_kid & (tot_tours == 1)' 'has_school_kid & (tot_tours == 2)'\n", - " 'has_school_kid & (tot_tours == 3)' 'has_school_kid & (tot_tours == 4)'\n", - " 'has_school_kid & (tot_tours == 5)' 'has_retiree * escort'\n", - " 'has_school_kid * escort' 'has_school_kid_at_home * escort'\n", - " 'has_preschool_kid_at_home * escort' 'has_retiree * shopping'\n", - " 'has_school_kid * shopping' 'has_school_kid_at_home * shopping'\n", - " 'has_preschool_kid_at_home * shopping' 'has_retiree * othmaint'\n", - " 'has_school_kid * othmaint' 'has_school_kid_at_home * othmaint'\n", - " 'has_preschool_kid_at_home * othmaint' 'has_retiree * eatout'\n", - " 'has_school_kid * eatout' 'has_school_kid_at_home * eatout'\n", - " 'has_preschool_kid_at_home * eatout' 'has_retiree * othdiscr'\n", - " 'has_school_kid * othdiscr' 'has_school_kid_at_home * othdiscr'\n", - " 'has_preschool_kid_at_home * othdiscr' 'escort * no_cars']\n", + " 'has_school_kid_at_home * escort' 'has_preschool_kid_at_home * escort'\n", + " 'has_school_kid_at_home * shopping' 'has_preschool_kid_at_home * shopping'\n", + " 'has_school_kid_at_home * othmaint' 'has_preschool_kid_at_home * othmaint'\n", + " 'has_school_kid_at_home * eatout' 'has_preschool_kid_at_home * eatout'\n", + " 'has_school_kid_at_home * othdiscr' 'has_preschool_kid_at_home * othdiscr']\n", "Choices:\n", - "0 61\n", - "1 21\n", - "16 17\n", - "8 9\n", - "4 8\n", - "2 7\n", - "64 6\n", - "32 5\n", - "17 3\n", - "3 2\n", - "80 2\n", - "33 2\n", - "20 1\n", - "72 1\n", - "21 1\n", - "24 1\n", - "13 1\n", - "12 1\n", - "9 1\n", - "25 1\n", - "5 1\n", - "48 1\n", - "53 1\n", - "56 1\n", - "18 1\n", + "0 383\n", + "16 236\n", + "1 208\n", + "8 122\n", + "4 105\n", + "32 104\n", + "2 83\n", + "64 38\n", + "17 37\n", + "24 21\n", + "20 18\n", + "5 18\n", + "12 13\n", + "33 12\n", + "9 11\n", + "40 10\n", + "48 9\n", + "18 7\n", + "65 7\n", + "10 5\n", + "6 5\n", + "25 5\n", + "80 5\n", + "26 4\n", + "72 4\n", + "68 4\n", + "36 4\n", + "52 4\n", + "34 4\n", + "19 3\n", + "11 3\n", + "56 2\n", + "58 2\n", + "35 2\n", + "37 2\n", + "38 2\n", + "41 2\n", + "49 2\n", + "3 1\n", + "84 1\n", + "13 1\n", + "21 1\n", + "22 1\n", + "23 1\n", + "29 1\n", + "50 1\n", + "60 1\n", + "66 1\n", + "73 1\n", + "28 1\n", "dtype: int64\n", - "Time to execute model 'non_mandatory_tour_frequency': 11.53s\n", - "Total time to execute: 11.53s\n" + "Adding num_non_escort_tours\n", + "Adding num_escort_tours\n", + "Time to execute step 'non_mandatory_tour_frequency': 8.29 s\n", + "Total time to execute iteration 1 with iteration value None: 8.29 s\n" ] } ], @@ -586,12 +529,12 @@ { "data": { "text/plain": [ - "othdiscr 34\n", - "shopping 30\n", - "escort 28\n", - "othmaint 16\n", - "eatout 14\n", - "social 10\n", + "shopping 363\n", + "othdiscr 318\n", + "escort 285\n", + "othmaint 209\n", + "eatout 183\n", + "social 125\n", "dtype: int64" ] }, @@ -616,25 +559,27 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'destination_choice'\n", - "Running segment 'eatout' of size 14\n", - "Running segment 'shopping' of size 28\n", - "Running segment 'othdiscr' of size 34\n", - "Running segment 'othmaint' of size 16\n", - "Running segment 'shopping' of size 30\n", - "Running segment 'social' of size 10\n", + "Running step 'destination_choice'\n", + "Running segment 'eatout' of size 183\n", + "Running segment 'shopping' of size 285\n", + "Running segment 'othdiscr' of size 318\n", + "WARNING: Some columns have no variability:\n", + "['@df[segment]==0']\n", + "Running segment 'othmaint' of size 209\n", + "Running segment 'shopping' of size 363\n", + "Running segment 'social' of size 125\n", "Choices:\n", - "count 132.000000\n", - "mean 807.893939\n", - "std 402.766374\n", + "count 1483.000000\n", + "mean 730.823331\n", + "std 440.408240\n", "min 1.000000\n", - "25% 559.000000\n", - "50% 746.500000\n", - "75% 1134.250000\n", + "25% 350.500000\n", + "50% 747.000000\n", + "75% 1121.000000\n", "max 1452.000000\n", "Name: TAZ, dtype: float64\n", - "Time to execute model 'destination_choice': 5.24s\n", - "Total time to execute: 5.24s\n" + "Time to execute step 'destination_choice': 1.47 s\n", + "Total time to execute iteration 1 with iteration value None: 1.47 s\n" ] } ], @@ -654,32 +599,26 @@ "name": "stdout", "output_type": "stream", "text": [ - "Running model 'non_mandatory_scheduling'\n", - "Running 132 non-mandatory tour scheduling choices\n", - "Running 95 #1 tour choices\n", + "Running step 'non_mandatory_scheduling'\n", + "Running 1483 non-mandatory tour scheduling choices\n", + "Running 1135 #1 tour choices\n", "WARNING: Some columns have no variability:\n", "['(start <= end_previous) & (tour_num > 1)'\n", " '(tour_type == \"oth_maint\") * start'\n", - " '(tour_type == \"oth_maint\") * duration' 'num_mand * start'\n", - " 'num_joint_tours * start' '(tour_num > 1) * duration'\n", - " '(tour_type == \"oth_maint\") & (start < 7)'\n", + " '(tour_type == \"oth_maint\") * duration' 'num_joint_tours * start'\n", + " '(tour_num > 1) * duration' '(tour_type == \"oth_maint\") & (start < 7)'\n", " '(tour_type == \"othdisc\") & (duration < 2)']\n", - "Running 28 #2 tour choices\n", + "Running 277 #2 tour choices\n", "WARNING: Some columns have no variability:\n", "['(tour_type == \"oth_maint\") * start'\n", - " '(tour_type == \"oth_maint\") * duration' '(ptype == 6) * start'\n", - " '(ptype == 6) * duration' 'num_mand * start' 'num_joint_tours * start'\n", + " '(tour_type == \"oth_maint\") * duration' 'num_joint_tours * start'\n", " '(tour_num == 1) * start' '(tour_type == \"oth_maint\") & (start < 7)'\n", " '(tour_type == \"othdisc\") & (duration < 2)']\n", - "Running 8 #3 tour choices\n", + "Running 64 #3 tour choices\n", "WARNING: Some columns have no variability:\n", "['(tour_type == \"oth_maint\") * start'\n", - " '(tour_type == \"oth_maint\") * duration' '(tour_type == \"social\") * start'\n", - " '(tour_type == \"social\") * duration' '(ptype == 6) * start'\n", - " '(ptype == 6) * duration' '(ptype == 7) * start' '(ptype == 7) * duration'\n", - " 'destination_in_cbd * duration' 'num_mand * start'\n", - " 'num_joint_tours * start' '(tour_num == 1) * start'\n", - " '(tour_type == \"oth_maint\") & (start < 7)' '(ptype == 7) & (end > 22)'\n", + " '(tour_type == \"oth_maint\") * duration' 'num_joint_tours * start'\n", + " '(tour_num == 1) * start' '(tour_type == \"oth_maint\") & (start < 7)'\n", " '(tour_type == \"othdisc\") & (duration < 2)'\n", " '(tour_type == \"escort\") & (start < 6)'\n", " '(tour_type == \"escort\") & (start == 6)'\n", @@ -708,22 +647,18 @@ " '(tour_type == \"escort\") & (duration > 7) & (duration < 11)'\n", " '(tour_type == \"escort\") & (duration > 10) & (duration < 14)'\n", " '(tour_type == \"escort\") & (duration > 13) & (duration < 19)']\n", - "Running 1 #4 tour choices\n", + "Running 7 #4 tour choices\n", "WARNING: Some columns have no variability:\n", - "['(start <= end_previous) & (tour_num > 1)'\n", - " '(tour_type == \"shopping\") * start' '(tour_type == \"shopping\") * duration'\n", + "['(tour_type == \"shopping\") * start' '(tour_type == \"shopping\") * duration'\n", " '(tour_type == \"oth_maint\") * start'\n", - " '(tour_type == \"oth_maint\") * duration' '(tour_type == \"social\") * start'\n", - " '(tour_type == \"social\") * duration' '(ptype == 6) * start'\n", + " '(tour_type == \"oth_maint\") * duration' '(ptype == 6) * start'\n", " '(ptype == 6) * duration' '(ptype == 7) * start' '(ptype == 7) * duration'\n", - " 'destination_in_cbd * duration' 'num_mand * start'\n", - " 'num_joint_tours * start' '(tour_num == 1) * start'\n", + " 'num_mand * start' 'num_joint_tours * start' '(tour_num == 1) * start'\n", " '(tour_type == \"oth_maint\") & (start < 7)'\n", " '(tour_type == \"shopping\") & (start < 8)'\n", " '(tour_type == \"shopping\") & (end > 22)' '(ptype == 7) & (end > 22)'\n", - " '(ptype == 3) & (end > 22)' '(tour_type == \"shopping\") & (duration < 2)'\n", + " '(tour_type == \"shopping\") & (duration < 2)'\n", " '(tour_type == \"othdisc\") & (duration < 2)'\n", - " 'adult & (num_children > 0) & ( end > 18 ) & ( end < 22 )'\n", " '(tour_type == \"escort\") & (start < 6)'\n", " '(tour_type == \"escort\") & (start == 6)'\n", " '(tour_type == \"escort\") & (start == 7)'\n", @@ -752,17 +687,17 @@ " '(tour_type == \"escort\") & (duration > 10) & (duration < 14)'\n", " '(tour_type == \"escort\") & (duration > 13) & (duration < 19)']\n", "Choices:\n", - "count 132.000000\n", - "mean 150.969697\n", - "std 75.061597\n", - "min 0.000000\n", - "25% 187.000000\n", - "50% 188.000000\n", - "75% 189.000000\n", - "max 189.000000\n", + "count 1483.000000\n", + "mean 156.987188\n", + "std 53.046263\n", + "min 0.000000\n", + "25% 146.000000\n", + "50% 187.000000\n", + "75% 188.000000\n", + "max 189.000000\n", "dtype: float64\n", - "Time to execute model 'non_mandatory_scheduling': 6.12s\n", - "Total time to execute: 6.12s\n" + "Time to execute step 'non_mandatory_scheduling': 3.24 s\n", + "Total time to execute iteration 1 with iteration value None: 3.24 s\n" ] } ], @@ -775,79 +710,254 @@ "execution_count": 14, "metadata": { "collapsed": false, - "scrolled": false + "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Running model 'mode_choice_simulate'\n", - "Expression Rowid Alternative \n", - "sov_available == False 0 DRIVEALONEFREE -999.000000\n", - "auto_ownership == 0 1 DRIVEALONEFREE -999.000000\n", - "age < 16 2 DRIVEALONEFREE -999.000000\n", - "is_joint 3 DRIVEALONEFREE -999.000000\n", - "work_tour_is_drive 4 DRIVEALONEFREE -999.000000\n", - "@out_skims['SOV_TIME'] + in_skims['SOV_TIME'] 5 DRIVEALONEFREE -0.017500\n", - "2 * terminal_time 6 DRIVEALONEFREE -0.035000\n", - "@costPerMile * (out_skims['SOV_DIST'] + in_skims['SOV_DIST']) 7 DRIVEALONEFREE -0.001313\n", - "daily_parking_cost 8 DRIVEALONEFREE -0.001313\n", - "@out_skims['SOV_BTOLL'] + in_skims['SOV_BTOLL'] 9 DRIVEALONEFREE -0.001313\n", - "age_16_to_19 10 DRIVEALONEFREE 0.000000\n", - "sovtoll_available == False 11 DRIVEALONEPAY -999.000000\n", - "auto_ownership == 0 12 DRIVEALONEPAY -999.000000\n", - "age < 16 13 DRIVEALONEPAY -999.000000\n", - "is_joint 14 DRIVEALONEPAY -999.000000\n", - "work_tour_is_drive 15 DRIVEALONEPAY -999.000000\n", - "@out_skims['SOVTOLL_TIME'] + in_skims['SOVTOLL_TIME'] 16 DRIVEALONEPAY -0.017500\n", - "2 * terminal_time 17 DRIVEALONEPAY -0.035000\n", - "@costPerMile * (out_skims['SOVTOLL_DIST'] + in_skims['SOVTOLL_DIST']) 18 DRIVEALONEPAY -0.001313\n", - "daily_parking_cost 19 DRIVEALONEPAY -0.001313\n", - "@out_skims['SOVTOLL_BTOLL'] + in_skims['SOVTOLL_BTOLL'] 20 DRIVEALONEPAY -0.001313\n", - "@out_skims['SOVTOLL_VTOLL'] + in_skims['SOVTOLL_VTOLL'] 21 DRIVEALONEPAY -0.001313\n", - "age_16_to_19 22 DRIVEALONEPAY 0.000000\n", - "hov2_available == False 23 SHARED2FREE -999.000000\n", - "is_joint & (number_of_participants > 2) 24 SHARED2FREE -999.000000\n", - "@out_skims['HOV2_TIME'] + in_skims['HOV2_TIME'] 25 SHARED2FREE -0.017500\n", - "2 * terminal_time 26 SHARED2FREE -0.035000\n", - "@costPerMile * (out_skims['HOV2_DIST'] + in_skims['HOV2_DIST']) 27 SHARED2FREE -0.001313\n", - "@df.daily_parking_cost / costShareSr2 28 SHARED2FREE -0.001313\n", - "@(out_skims['HOV2_BTOLL'] + in_skims['HOV2_BTOLL']) / costShareSr2 29 SHARED2FREE -0.001313\n", - " ... \n", - "1 257 DRIVE_EXP 0.525000\n", - " DRIVE_HVY 0.525000\n", - " DRIVE_COM 0.525000\n", - " 258 DRIVE_LOC 0.525000\n", - " DRIVE_LRF 0.525000\n", - " DRIVE_EXP 0.525000\n", - " DRIVE_HVY 0.525000\n", - " DRIVE_COM 0.525000\n", - " 259 WALK_LOC -0.090703\n", - " DRIVE_LOC -0.090703\n", - " 260 WALK_LRF 0.940124\n", - " 261 DRIVE_LRF 0.940124\n", - " 262 WALK_LRF 0.940124\n", - " 263 DRIVE_LRF 0.940124\n", - " 264 WALK_EXP 0.969232\n", - " DRIVE_EXP 0.969232\n", - " 265 WALK_HVY 0.770612\n", - " DRIVE_HVY 0.770612\n", - " 266 WALK_COM 0.727019\n", - " DRIVE_COM 0.727019\n", - " 267 WALK_LOC 0.525000\n", - " WALK_LRF 0.525000\n", - " WALK_EXP 0.525000\n", - " WALK_HVY 0.525000\n", - " WALK_COM 0.525000\n", - " 268 DRIVE_LOC 0.525000\n", - " DRIVE_LRF 0.525000\n", - " DRIVE_EXP 0.525000\n", - " DRIVE_HVY 0.525000\n", - " DRIVE_COM 0.525000\n", - "Name: eatout, dtype: float64\n", + "Running step 'tour_mode_choice_simulate'\n", "WARNING, skipping key: DISTANCE\n", "WARNING, skipping key: DISTANCE\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_BOARDS\n", + "Getting from omx DRV_COM_WLK_BOARDS PM\n", + "Getting from omx DRV_COM_WLK_BOARDS MD\n", + "Getting from omx DRV_COM_WLK_BOARDS AM\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_BOARDS\n", + "Getting from omx WLK_COM_DRV_BOARDS PM\n", + "Getting from omx WLK_COM_DRV_BOARDS MD\n", + "Getting from omx WLK_COM_DRV_BOARDS AM\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_BOARDS\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_BOARDS\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_BOARDS\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_BOARDS\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FAR\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_IWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV2_BTOLL\n", + "Building 3d matrix from disk for key = HOV2_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV3_BTOLL\n", + "Building 3d matrix from disk for key = HOV3_BTOLL\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV2TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV2_DIST\n", + "Building 3d matrix from disk for key = HOV2_DIST\n", + "Building 3d matrix from disk for key = HOV3TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV3TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV3_DIST\n", + "Building 3d matrix from disk for key = HOV3_DIST\n", + "Building 3d matrix from disk for key = SOVTOLL_DIST\n", + "Building 3d matrix from disk for key = SOVTOLL_DIST\n", + "Building 3d matrix from disk for key = SOV_DIST\n", + "Building 3d matrix from disk for key = SOV_DIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DTIM\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DTIM\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_WAUX\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_XWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DTIM\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DTIM\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_WAUX\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_XWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DTIM\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DTIM\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_WAUX\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_XWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DTIM\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DTIM\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_WAUX\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_XWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DTIM\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DTIM\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FERRYIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_WAUX\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_XWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV2TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV2_TIME\n", + "Building 3d matrix from disk for key = HOV2_TIME\n", + "Building 3d matrix from disk for key = HOV3TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV3TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV3_TIME\n", + "Building 3d matrix from disk for key = HOV3_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_BTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_BTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_VTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_VTOLL\n", + "Building 3d matrix from disk for key = SOV_BTOLL\n", + "Building 3d matrix from disk for key = SOV_BTOLL\n", + "Building 3d matrix from disk for key = SOV_TIME\n", + "Building 3d matrix from disk for key = SOV_TIME\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_XWAIT\n", "WARNING: Some columns have no variability:\n", "['1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'\n", " '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1' '1'\n", @@ -875,14 +985,11 @@ " '@df.daily_parking_cost / costShareSr2'\n", " '@df.daily_parking_cost / costShareSr2'\n", " '@df.daily_parking_cost / costShareSr3'\n", - " '@df.daily_parking_cost / costShareSr3' 'auto_ownership == 0'\n", - " 'auto_ownership == 0' 'auto_ownership == 0' 'auto_ownership == 0'\n", - " 'auto_ownership == 0' 'auto_ownership == 0' 'auto_ownership == 0'\n", - " 'daily_parking_cost' 'daily_parking_cost'\n", - " 'drive_commuter_available == False' 'drive_express_available == False'\n", - " 'drive_heavyrail_available == False' 'drive_local_available == False'\n", - " 'drive_lrf_available == False' 'hhsize == 1' 'hhsize == 1' 'hhsize == 1'\n", - " 'hhsize == 1' 'hov2_available == False' 'hov2toll_available == False'\n", + " '@df.daily_parking_cost / costShareSr3' 'daily_parking_cost'\n", + " 'daily_parking_cost' 'drive_commuter_available == False'\n", + " 'drive_express_available == False' 'drive_heavyrail_available == False'\n", + " 'drive_local_available == False' 'drive_lrf_available == False'\n", + " 'hov2_available == False' 'hov2toll_available == False'\n", " 'hov3_available == False' 'hov3_available == False' 'is_joint' 'is_joint'\n", " 'is_joint & (number_of_participants > 2)'\n", " 'is_joint & (number_of_participants > 2)' 'sov_available == False'\n", @@ -891,273 +998,466 @@ " 'walk_local_available == False' 'walk_lrf_available == False'\n", " 'work_tour_is_drive' 'work_tour_is_drive']\n", "Choices:\n", - "WALK_LRF 3\n", - "WALK_EXP 3\n", - "DRIVE_LOC 2\n", - "DRIVE_HVY 2\n", - "WALK_LOC 1\n", - "WALK_COM 1\n", - "DRIVE_LRF 1\n", - "DRIVE_EXP 1\n", + "WALK_LRF 48\n", + "DRIVE_LRF 31\n", + "WALK_EXP 22\n", + "WALK_COM 22\n", + "WALK_HVY 14\n", + "DRIVE_EXP 14\n", + "DRIVE_COM 12\n", + "DRIVE_HVY 9\n", + "WALK_LOC 7\n", + "DRIVE_LOC 3\n", + "SHARED2FREE 1\n", "dtype: int64\n", - "Time to execute model 'mode_choice_simulate': 6.96s\n", - "Total time to execute: 6.96s\n" + "Time to execute step 'tour_mode_choice_simulate': 8.29 s\n", + "Total time to execute iteration 1 with iteration value None: 8.29 s\n" ] } ], "source": [ - "orca.run(['mode_choice_simulate'])" + "orca.run(['tour_mode_choice_simulate'])" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 66, "metadata": { - "collapsed": false + "collapsed": false, + "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "\n", - "Int64Index: 1454 entries, 1 to 1454\n", - "Data columns (total 49 columns):\n", - "DISTRICT 1454 non-null int64\n", - "SD 1454 non-null int64\n", - "COUNTY 1454 non-null int64\n", - "TOTHH 1454 non-null int64\n", - "HHPOP 1454 non-null int64\n", - "TOTPOP 1454 non-null int64\n", - "EMPRES 1454 non-null int64\n", - "SFDU 1454 non-null int64\n", - "MFDU 1454 non-null int64\n", - "HHINCQ1 1454 non-null int64\n", - "HHINCQ2 1454 non-null int64\n", - "HHINCQ3 1454 non-null int64\n", - "HHINCQ4 1454 non-null int64\n", - "TOTACRE 1454 non-null float64\n", - "RESACRE 1454 non-null int64\n", - "CIACRE 1454 non-null int64\n", - "SHPOP62P 1454 non-null float64\n", - "TOTEMP 1454 non-null int64\n", - "AGE0004 1454 non-null int64\n", - "AGE0519 1454 non-null int64\n", - "AGE2044 1454 non-null int64\n", - "AGE4564 1454 non-null int64\n", - "AGE65P 1454 non-null int64\n", - "RETEMPN 1454 non-null int64\n", - "FPSEMPN 1454 non-null int64\n", - "HEREMPN 1454 non-null int64\n", - "OTHEMPN 1454 non-null int64\n", - "AGREMPN 1454 non-null int64\n", - "MWTEMPN 1454 non-null int64\n", - "PRKCST 1454 non-null float64\n", - "OPRKCST 1454 non-null float64\n", - "area_type 1454 non-null int64\n", - "HSENROLL 1454 non-null float64\n", - "COLLFTE 1454 non-null float64\n", - "COLLPTE 1454 non-null float64\n", - "TOPOLOGY 1454 non-null int64\n", - "TERMINAL 1454 non-null float64\n", - "ZERO 1454 non-null int64\n", - "hhlds 1454 non-null int64\n", - "sftaz 1454 non-null int64\n", - "gqpop 1454 non-null int64\n", - "employment_density 1454 non-null float64\n", - "total_acres 1454 non-null float64\n", - "county_name 1454 non-null object\n", - "density_index 1453 non-null float64\n", - "household_density 1454 non-null float64\n", - "county_id 1454 non-null int64\n", - "total_households 1454 non-null int64\n", - "total_employment 1454 non-null int64\n", - "dtypes: float64(12), int64(36), object(1)\n", - "memory usage: 568.0 KB\n" + "Running step 'trip_mode_choice_simulate'\n", + "Expression Rowid Alternative \n", + "sov_available == False 0 DRIVEALONEFREE -999.000000\n", + "auto_ownership == 0 1 DRIVEALONEFREE -999.000000\n", + "age < 16 2 DRIVEALONEFREE -999.000000\n", + "is_joint 3 DRIVEALONEFREE -999.000000\n", + "work_tour_is_drive 4 DRIVEALONEFREE -999.000000\n", + "@out_skims['SOV_TIME'] + in_skims['SOV_TIME'] 5 DRIVEALONEFREE -0.027900\n", + "2 * terminal_time 6 DRIVEALONEFREE -0.055800\n", + "@costPerMile * (out_skims['SOV_DIST'] + in_skims['SOV_DIST']) 7 DRIVEALONEFREE -0.002093\n", + "daily_parking_cost 8 DRIVEALONEFREE -0.002093\n", + "@out_skims['SOV_BTOLL'] + in_skims['SOV_BTOLL'] 9 DRIVEALONEFREE -0.002093\n", + "age_16_to_19 10 DRIVEALONEFREE 0.000000\n", + "sovtoll_available == False 11 DRIVEALONEPAY -999.000000\n", + "auto_ownership == 0 12 DRIVEALONEPAY -999.000000\n", + "age < 16 13 DRIVEALONEPAY -999.000000\n", + "is_joint 14 DRIVEALONEPAY -999.000000\n", + "work_tour_is_drive 15 DRIVEALONEPAY -999.000000\n", + "@out_skims['SOVTOLL_TIME'] + in_skims['SOVTOLL_TIME'] 16 DRIVEALONEPAY -0.027900\n", + "2 * terminal_time 17 DRIVEALONEPAY -0.055800\n", + "@costPerMile * (out_skims['SOVTOLL_DIST'] + in_skims['SOVTOLL_DIST']) 18 DRIVEALONEPAY -0.002093\n", + "daily_parking_cost 19 DRIVEALONEPAY -0.002093\n", + "@out_skims['SOVTOLL_BTOLL'] + in_skims['SOVTOLL_BTOLL'] 20 DRIVEALONEPAY -0.002093\n", + "@out_skims['SOVTOLL_VTOLL'] + in_skims['SOVTOLL_VTOLL'] 21 DRIVEALONEPAY -0.002093\n", + "age_16_to_19 22 DRIVEALONEPAY 0.000000\n", + "hov2_available == False 23 SHARED2FREE -999.000000\n", + "is_joint & (number_of_participants > 2) 24 SHARED2FREE -999.000000\n", + "@out_skims['HOV2_TIME'] + in_skims['HOV2_TIME'] 25 SHARED2FREE -0.027900\n", + "2 * terminal_time 26 SHARED2FREE -0.055800\n", + "@costPerMile * (out_skims['HOV2_DIST'] + in_skims['HOV2_DIST']) 27 SHARED2FREE -0.002093\n", + "@df.daily_parking_cost / costShareSr2 28 SHARED2FREE -0.002093\n", + "@(out_skims['HOV2_BTOLL'] + in_skims['HOV2_BTOLL']) / costShareSr2 29 SHARED2FREE -0.002093\n", + " ... \n", + "is_not_joint 315 SHARED2FREE -3.143407\n", + " SHARED2PAY -3.143407\n", + " 316 SHARED3FREE -3.852045\n", + " SHARED3PAY -3.852045\n", + " 317 DRIVE_LRF 0.646576\n", + " 318 DRIVE_LRF 0.646576\n", + " 319 DRIVE_EXP 0.664834\n", + " 320 DRIVE_HVY 0.540252\n", + " 321 DRIVE_COM 0.512908\n", + "is_joint 322 SHARED2FREE -14.913376\n", + " SHARED2PAY -14.913376\n", + " 323 SHARED3FREE -16.758720\n", + " SHARED3PAY -16.758720\n", + " 324 WALK 2.301661\n", + " 325 WALK 2.301661\n", + " 326 WALK_LRF 0.646576\n", + " 327 WALK_LRF 0.646576\n", + " 328 WALK_EXP 0.664834\n", + " 329 WALK_HVY 0.540252\n", + " 330 WALK_COM 0.512908\n", + " 331 SHARED2FREE -14.913376\n", + " SHARED2PAY -14.913376\n", + " 332 SHARED3FREE -16.758720\n", + " SHARED3PAY -16.758720\n", + " 333 WALK 2.301661\n", + " 334 DRIVE_LRF 0.646576\n", + " 335 DRIVE_LRF 0.646576\n", + " 336 DRIVE_EXP 0.664834\n", + " 337 DRIVE_HVY 0.540252\n", + " 338 DRIVE_COM 0.512908\n", + "Name: eatout, dtype: float64\n", + "WARNING, skipping key: DISTANCE\n", + "WARNING, skipping key: DISTANCE\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_BOARDS\n", + "Getting from omx WLK_COM_DRV_BOARDS PM\n", + "Getting from omx WLK_COM_DRV_BOARDS MD\n", + "Getting from omx WLK_COM_DRV_BOARDS AM\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_IWAIT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_BOARDS\n", + "Getting from omx DRV_COM_WLK_BOARDS PM\n", + "Getting from omx DRV_COM_WLK_BOARDS MD\n", + "Getting from omx DRV_COM_WLK_BOARDS AM\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DDIST\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DDIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV2TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV2_BTOLL\n", + "Building 3d matrix from disk for key = HOV2_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_BTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV3TOLL_VTOLL\n", + "Building 3d matrix from disk for key = HOV3_BTOLL\n", + "Building 3d matrix from disk for key = HOV3_BTOLL\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_BOARDS\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_IWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV2TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV2_DIST\n", + "Building 3d matrix from disk for key = HOV2_DIST\n", + "Building 3d matrix from disk for key = HOV3TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV3TOLL_DIST\n", + "Building 3d matrix from disk for key = HOV3_DIST\n", + "Building 3d matrix from disk for key = HOV3_DIST\n", + "Building 3d matrix from disk for key = SOVTOLL_DIST\n", + "Building 3d matrix from disk for key = SOVTOLL_DIST\n", + "Building 3d matrix from disk for key = SOV_DIST\n", + "Building 3d matrix from disk for key = SOV_DIST\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_DTIM\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_DRV_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_DTIM\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_DRV_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_DTIM\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_DRV_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_DTIM\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_DRV_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DDIST\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_DTIM\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_DRV_XWAIT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_DTIM\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = DRV_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_DTIM\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = DRV_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_DTIM\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = DRV_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_DTIM\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = DRV_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DDIST\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_DTIM\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = DRV_LRF_WLK_XWAIT\n", + "Building 3d matrix from disk for key = HOV2TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV2TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV2_TIME\n", + "Building 3d matrix from disk for key = HOV2_TIME\n", + "Building 3d matrix from disk for key = HOV3TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV3TOLL_TIME\n", + "Building 3d matrix from disk for key = HOV3_TIME\n", + "Building 3d matrix from disk for key = HOV3_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_BTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_BTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_TIME\n", + "Building 3d matrix from disk for key = SOVTOLL_VTOLL\n", + "Building 3d matrix from disk for key = SOVTOLL_VTOLL\n", + "Building 3d matrix from disk for key = SOV_BTOLL\n", + "Building 3d matrix from disk for key = SOV_BTOLL\n", + "Building 3d matrix from disk for key = SOV_TIME\n", + "Building 3d matrix from disk for key = SOV_TIME\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_COM_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_EXP_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_HVY_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LOC_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FAR\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_FERRYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_KEYIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_TOTIVT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_WAUX\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_XWAIT\n", + "Building 3d matrix from disk for key = WLK_LRF_WLK_XWAIT\n", + "WARNING: Some columns have no variability:\n", + "['2 * destination_walk_time' '2 * destination_walk_time'\n", + " '2 * destination_walk_time' '2 * destination_walk_time'\n", + " '2 * destination_walk_time' '2 * origin_walk_time' '2 * origin_walk_time'\n", + " '2 * origin_walk_time' '2 * origin_walk_time' '2 * origin_walk_time'\n", + " '2 * terminal_time' '2 * terminal_time' '2 * terminal_time'\n", + " '2 * terminal_time' '2 * terminal_time' '2 * terminal_time'\n", + " \"@(in_skims['WLK_COM_DRV_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(in_skims['WLK_EXP_DRV_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(in_skims['WLK_HVY_DRV_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(in_skims['WLK_LOC_DRV_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(in_skims['WLK_LRF_DRV_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['DRV_COM_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['DRV_EXP_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['DRV_HVY_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['DRV_LOC_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['DRV_LRF_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0)+ (in_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0)+ (in_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0)+ (in_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['WLK_LOC_WLK_IWAIT']/100-waitThresh).clip(0)+ (in_skims['WLK_LOC_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " \"@(out_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0)+ (in_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0)\"\n", + " '@df.daily_parking_cost / costShareSr2'\n", + " '@df.daily_parking_cost / costShareSr2'\n", + " '@df.daily_parking_cost / costShareSr3'\n", + " '@df.daily_parking_cost / costShareSr3' 'daily_parking_cost'\n", + " 'daily_parking_cost' 'destination_walk_time' 'destination_walk_time'\n", + " 'destination_walk_time' 'destination_walk_time' 'destination_walk_time'\n", + " 'drive_commuter_available == False' 'drive_commuter_available == False'\n", + " 'drive_express_available == False' 'drive_express_available == False'\n", + " 'drive_heavyrail_available == False' 'drive_heavyrail_available == False'\n", + " 'drive_local_available == False' 'drive_local_available == False'\n", + " 'drive_lrf_available == False' 'drive_lrf_available == False'\n", + " 'hov2_available == False' 'hov2toll_available == False'\n", + " 'hov3_available == False' 'hov3_available == False' 'is_joint' 'is_joint'\n", + " 'is_joint' 'is_joint' 'is_joint' 'is_joint' 'is_joint' 'is_joint'\n", + " 'is_joint' 'is_joint' 'is_joint' 'is_joint' 'is_joint' 'is_joint'\n", + " 'is_joint' 'is_joint' 'is_joint' 'is_joint' 'is_joint'\n", + " 'is_joint & (number_of_participants > 2)'\n", + " 'is_joint & (number_of_participants > 2)' 'is_not_joint' 'is_not_joint'\n", + " 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint'\n", + " 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint'\n", + " 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint' 'is_not_joint'\n", + " 'is_not_joint' 'is_not_joint' 'origin_walk_time' 'origin_walk_time'\n", + " 'origin_walk_time' 'origin_walk_time' 'origin_walk_time'\n", + " 'sov_available == False' 'sovtoll_available == False'\n", + " 'walk_commuter_available == False' 'walk_express_available == False'\n", + " 'walk_heavyrail_available == False' 'walk_local_available == False'\n", + " 'walk_lrf_available == False' 'work_tour_is_drive' 'work_tour_is_drive']\n", + "Choices:\n", + "WALK_LRF 51\n", + "DRIVE_LRF 23\n", + "WALK_COM 19\n", + "WALK_EXP 18\n", + "WALK_HVY 14\n", + "DRIVEALONEFREE 11\n", + "DRIVE_EXP 10\n", + "DRIVEALONEPAY 10\n", + "DRIVE_COM 9\n", + "WALK_LOC 8\n", + "DRIVE_LOC 7\n", + "DRIVE_HVY 2\n", + "SHARED3PAY 1\n", + "dtype: int64\n", + "Time to execute step 'trip_mode_choice_simulate': 8.02 s\n", + "Total time to execute iteration 1 with iteration value None: 8.03 s\n" ] } ], + "source": [ + "orca.run(['trip_mode_choice_simulate'])" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], "source": [ "orca.get_table(\"land_use\").to_frame().info()" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": null, "metadata": { "collapsed": false }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Int64Index: 100 entries, 2624246 to 558870\n", - "Data columns (total 67 columns):\n", - "TAZ 100 non-null int64\n", - "SERIALNO 100 non-null int64\n", - "PUMA5 100 non-null int64\n", - "income 100 non-null int64\n", - "PERSONS 100 non-null int64\n", - "HHT 100 non-null int64\n", - "UNITTYPE 100 non-null int64\n", - "NOC 100 non-null int64\n", - "BLDGSZ 100 non-null int64\n", - "TENURE 100 non-null int64\n", - "VEHICL 100 non-null int64\n", - "hinccat1 100 non-null int64\n", - "hinccat2 100 non-null int64\n", - "hhagecat 100 non-null int64\n", - "hsizecat 100 non-null int64\n", - "hfamily 100 non-null int64\n", - "hunittype 100 non-null int64\n", - "hNOCcat 100 non-null int64\n", - "hwrkrcat 100 non-null int64\n", - "h0004 100 non-null int64\n", - "h0511 100 non-null int64\n", - "h1215 100 non-null int64\n", - "h1617 100 non-null int64\n", - "h1824 100 non-null int64\n", - "h2534 100 non-null int64\n", - "h3549 100 non-null int64\n", - "h5064 100 non-null int64\n", - "h6579 100 non-null int64\n", - "h80up 100 non-null int64\n", - "workers 100 non-null int64\n", - "hwork_f 100 non-null int64\n", - "hwork_p 100 non-null int64\n", - "huniv 100 non-null int64\n", - "hnwork 100 non-null int64\n", - "hretire 100 non-null int64\n", - "hpresch 100 non-null int64\n", - "hschpred 100 non-null int64\n", - "hschdriv 100 non-null int64\n", - "htypdwel 100 non-null int64\n", - "hownrent 100 non-null int64\n", - "hadnwst 100 non-null int64\n", - "hadwpst 100 non-null int64\n", - "hadkids 100 non-null int64\n", - "bucketBin 100 non-null int64\n", - "originalPUMA 100 non-null int64\n", - "hmultiunit 100 non-null int64\n", - "num_college_age 100 non-null float64\n", - "non_workers 100 non-null int64\n", - "income_segment 100 non-null category\n", - "family 100 non-null bool\n", - "num_young_adults 100 non-null float64\n", - "household_type 96 non-null object\n", - "auto_ownership 100 non-null int64\n", - "drivers 100 non-null int64\n", - "income_in_thousands 100 non-null float64\n", - "home_is_rural 100 non-null bool\n", - "work_tour_auto_time_savings 100 non-null int64\n", - "num_under16_not_at_school 100 non-null int64\n", - "hhsize 100 non-null int64\n", - "num_children 100 non-null float64\n", - "car_sufficiency 100 non-null int64\n", - "non_family 100 non-null bool\n", - "num_adolescents 100 non-null float64\n", - "no_cars 100 non-null bool\n", - "num_young_children 100 non-null float64\n", - "home_is_urban 100 non-null bool\n", - "home_taz 100 non-null int64\n", - "dtypes: bool(5), category(1), float64(6), int64(54), object(1)\n", - "memory usage: 49.1 KB\n" - ] - } - ], + "outputs": [], "source": [ "orca.get_table(\"households\").to_frame().info()" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "collapsed": false }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Int64Index: 267 entries, 84601 to 6968468\n", - "Data columns (total 68 columns):\n", - "household_id 267 non-null int64\n", - "age 267 non-null int64\n", - "RELATE 267 non-null int64\n", - "ESR 267 non-null int64\n", - "GRADE 267 non-null int64\n", - "PNUM 267 non-null int64\n", - "PAUG 267 non-null int64\n", - "DDP 267 non-null int64\n", - "sex 267 non-null int64\n", - "WEEKS 267 non-null int64\n", - "HOURS 267 non-null int64\n", - "MSP 267 non-null int64\n", - "POVERTY 267 non-null int64\n", - "EARNS 267 non-null int64\n", - "pagecat 267 non-null int64\n", - "pemploy 267 non-null int64\n", - "pstudent 267 non-null int64\n", - "ptype 267 non-null int64\n", - "padkid 267 non-null int64\n", - "has_preschool_kid 267 non-null bool\n", - "student_cat 267 non-null object\n", - "num_eat_j 267 non-null int64\n", - "has_driving_kid 267 non-null bool\n", - "home_taz 267 non-null int64\n", - "work_and_school_and_worker 267 non-null bool\n", - "work_and_school_and_student 267 non-null bool\n", - "female 267 non-null bool\n", - "has_preschool_kid_at_home 267 non-null bool\n", - "has_full_time 267 non-null bool\n", - "is_university 267 non-null bool\n", - "max_window 267 non-null int64\n", - "employed_cat 267 non-null object\n", - "student_is_employed 267 non-null bool\n", - "is_gradeschool 267 non-null bool\n", - "is_highschool 267 non-null bool\n", - "has_retiree 267 non-null bool\n", - "cdap_activity 267 non-null object\n", - "num_main_j 267 non-null int64\n", - "num_joint_tours 267 non-null int64\n", - "has_non_worker 267 non-null bool\n", - "ptype_cat 267 non-null object\n", - "is_student 267 non-null bool\n", - "under16_not_at_school 267 non-null bool\n", - "has_school_kid 267 non-null bool\n", - "school_taz 267 non-null float64\n", - "is_worker 267 non-null bool\n", - "roundtrip_auto_time_to_school 267 non-null float64\n", - "distance_to_school 267 non-null float64\n", - "age_16_p 267 non-null bool\n", - "workplace_taz 267 non-null int64\n", - "workplace_in_cbd 267 non-null bool\n", - "has_university 267 non-null bool\n", - "adult 267 non-null bool\n", - "non_mandatory_tour_frequency 164 non-null float64\n", - "nonstudent_to_school 267 non-null bool\n", - "age_16_to_19 267 non-null bool\n", - "num_non_escort_tours 267 non-null float64\n", - "mandatory_tour_frequency 80 non-null object\n", - "num_shop_j 267 non-null int64\n", - "num_mand 267 non-null float64\n", - "num_visi_j 267 non-null int64\n", - "num_escort_tours 267 non-null float64\n", - "roundtrip_auto_time_to_work 267 non-null float64\n", - "num_disc_j 267 non-null int64\n", - "has_part_time 267 non-null bool\n", - "has_school_kid_at_home 267 non-null bool\n", - "distance_to_work 267 non-null float64\n", - "male 267 non-null bool\n", - "dtypes: bool(26), float64(9), int64(28), object(5)\n", - "memory usage: 96.5 KB\n" - ] - } - ], + "outputs": [], "source": [ "orca.get_table(\"persons\").to_frame().info()" ] @@ -1193,7 +1493,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "collapsed": false }, @@ -1202,7 +1502,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": null, "metadata": { "collapsed": false }, diff --git a/example/simulation.py b/example/simulation.py index 81117ebe94..1376a2de06 100644 --- a/example/simulation.py +++ b/example/simulation.py @@ -20,4 +20,4 @@ orca.get_table("non_mandatory_tours").tour_type.value_counts() orca.run(["destination_choice"]) orca.run(["non_mandatory_scheduling"]) -orca.run(['mode_choice_simulate']) +orca.run(['tour_mode_choice_simulate']) diff --git a/scripts/README b/scripts/README new file mode 100644 index 0000000000..8e65c44999 --- /dev/null +++ b/scripts/README @@ -0,0 +1,5 @@ +stack_mode_choice is for reformatting the very complicated mode choice excel files into a straightforward csv file + +stack_mode_choice2 has a couple of custom edits for trip_mode_choice rather than tour_mode choice. + +Unfortunately, there were some manual steps with both of these - for tour mode choice you have to run it twice since there are two slightly different variable sets that seem to occur. Hopefully we never will have to do this again so I'm not documenting this throughly. Not sure I could if I wanted to. diff --git a/scripts/stack_mode_choice2.py b/scripts/stack_mode_choice2.py new file mode 100644 index 0000000000..dbe2c86166 --- /dev/null +++ b/scripts/stack_mode_choice2.py @@ -0,0 +1,88 @@ +import pandas as pd +import string + +f = pd.read_excel(open("../TripModeChoice.xls"), sheetname=None) + +coeffs = {} +coeff_ind = None +specs = {} +ind = None + +for key, df in f.iteritems(): + if "debug" in key or "model" in key or "data" in key: + continue + if key in ["School", "University", "Work", "WorkBased", "Escort"]: continue + print key + + """ + Really these lines just extract the relevant parts out of the spreadsheet + """ + + # the headers are actually split up among a couple of rows (ouch) + df.columns = list(df.iloc[1].values)[:6] + list(df.iloc[2].values)[6:] + + filt = '1 < = No <= 49' + coeffs[key] = df.query(filt).set_index('Token')['Formula for variable'] + if coeff_ind is None: + coeff_ind = coeffs[key].index + + df = df.iloc[2:] + + # this is not the best - there are a couple of cases where the specs + # differ across segments and we want them to be the same FOR NOW - they + # can differ once we get them all lined up + if key == "Work": + df = df.query("No >= 141") + else: + df = df.query("No >= 144") + + df = df.drop(['No', 'Token', 'Filter', 'Index'], axis=1) + df.columns = ['Description', 'Expression'] + list(df.columns[2:]) + df.set_index(['Description', 'Expression'], inplace=True) + + # these lines merge the alternatives that are used + # into a comma separated list + alt_l = [] + val_l = [] + for _, row in df.iterrows(): + alts = list(row.dropna().index) + vals = list(row.dropna()) + + # assert only 1 unique value + if len(vals) == 0: + vals = [0] + + assert len(set(vals)) == 1 + val = vals[0] + + alt_l.append(string.join(alts, ",")) + val_l.append(val) + + # print alts + df = pd.DataFrame({ + 'Alternatives': alt_l, + key: val_l + }, index=df.index).set_index('Alternatives', append=True) + + if ind is None: + ind = df.index + + assert len(ind) == len(df) + + # ok, this is a bit bizarre, but it appears to me the coefficients are in + # the expressions column so you can just write 1s in the cells - if we're + # going to stack the columns we need to move the coeffs back to the cells + df = df.reset_index() + + #tmp = df.Expression + #df["Expression"].iloc[232:] = df.iloc[232:][key] + df[key].iloc[319:] = df["Expression"].iloc[319:] + + specs[key] = df[key].values + +df = pd.DataFrame(specs) +df.index = ind + +df.to_csv('trip_mode_choice.csv') + +pd.DataFrame(coeffs).loc[coeff_ind].to_csv('trip_mode_choice_coeffs.csv')