Skip to content

Commit

Permalink
Merge pull request #2 from ActivitySim/master
Browse files Browse the repository at this point in the history
pull some prettier expression file formatting updates
  • Loading branch information
bstabler authored Oct 31, 2019
2 parents e48aa39 + 7b57c94 commit 5097ce8
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions example/configs/accessibility.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Description,Target,Expression
#,,
#,, auto peak
#,,
# assume peak occurs in AM for outbound and PM for inbound
#,, assume peak occurs in AM for outbound and PM for inbound
peak round trip distance,_auPkTime,"skim_od[('SOVTOLL_TIME', 'AM')] + skim_do[('SOVTOLL_TIME', 'PM')]"
decay function,_decay, exp(_auPkTime * dispersion_parameter_automobile)
auto peak retail,auPkRetail,df.RETEMPN * _decay
Expand Down Expand Up @@ -43,7 +43,7 @@ d-o off-peak transit ivt,_inVehicleTime,"skim_do[('WLK_TRN_WLK_IVT', 'MD')]"
d-o off-peak transit ovt,_outOfVehicleTime,"skim_do[('WLK_TRN_WLK_IWAIT', 'MD')] + skim_do[('WLK_TRN_WLK_XWAIT', 'MD')] + skim_do[('WLK_TRN_WLK_WACC', 'MD')] + skim_do[('WLK_TRN_WLK_WAUX', 'MD')] + skim_do[('WLK_TRN_WLK_WEGR', 'MD')]"
d-o off-peak transit time,_trOpTime_do,(_inVehicleTime + out_of_vehicle_time_weight * _outOfVehicleTime) / 100.0
peak transit time,_trOpTime,_trOpTime_od + _trOpTime_do
# FIXME - _rt_available calculation appears to be wrong in mtctm1 accessibility.job
#,,FIXME - _rt_available calculation appears to be wrong in mtctm1 accessibility.job
#round trip path is available,_rt_available,(_trOpTime > 0)
round trip path is available,_rt_available,(_trOpTime_od > 0) & (_trOpTime_do > 0)
decay function,_decay,_rt_available * exp(_trOpTime * dispersion_parameter_transit)
Expand Down
2 changes: 1 addition & 1 deletion example/configs/atwork_subtour_frequency_alternatives.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# alt file for building tours even though simulation is simple_simulate not interaction_simulate
#,,,alt file for building tours even though simulation is simple_simulate not interaction_simulate
alt,eat,business,maint
no_subtours,0,0,0
eat,1,0,0
Expand Down
2 changes: 1 addition & 1 deletion example/configs/auto_ownership.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Marin county,@df.county_id == ID_MARIN,,-0.2434,0,0,0
"Retail accessibility (0.66*PK + 0.34*OP) by transit, if 1+ workers",(num_workers>0)*(0.66*trPkRetail+0.34*trOpRetail),,-0.5117,-0.5117,-0.5117,-0.5117
"Retail accessibility by non-motorized, if 0 workers",(num_workers==0)*nmRetail,,-0.03,-0.03,-0.03,-0.03
"Retail accessibility by non-motorized, if 1+ workers",(num_workers>0)*nmRetail,,-0.03,-0.03,-0.03,-0.03
Auto time savings per worker to work","@np.where(df.num_workers > 0, df.hh_work_auto_savings_ratio / df.num_workers, 0)",,0.4707,0.6142,0.5705,0.7693
Auto time savings per worker to work,"@np.where(df.num_workers > 0, df.hh_work_auto_savings_ratio / df.num_workers, 0)",,0.4707,0.6142,0.5705,0.7693
2 changes: 1 addition & 1 deletion example/configs/joint_tour_composition.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Description,Expression,adults,children,mixed
Alternative-specific constant,1,,5.3517,5.6290
Joint tour purpose is eating out (dummy),tour_type=='eat',,-0.9678,-0.8027
Joint tour purpose is discretionary (dummy),tour_type=='disc',0.7648,0.5101
Joint tour purpose is discretionary (dummy),tour_type=='disc',0.7648,0.5101,
Number of Full-Time Workers in the household,num_full_max3,1.0240,,0.3624
Number of Part-Time Workers in the household,num_part_max3,0.5412,,0.3164
Number of University students in the household,num_univ_max3,0.8245,,
Expand Down
2 changes: 1 addition & 1 deletion example/configs/joint_tour_frequency_alternatives.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# alt file for building joint tours
#,,,,,alt file for building joint tours
alt,shopping,othmaint,eatout,social,othdiscr
0_tours,0,0,0,0,0
1_Shop,1,0,0,0,0
Expand Down
8 changes: 4 additions & 4 deletions example/configs/joint_tour_participation.csv
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Description,Expression,participate,not_participate
"Adult, number of joint tours, mixed",(adult & tour_composition_is_mixed) * num_hh_joint_tours,-0.3584,
"Child, number of joint tours, child only",(~adult & tour_composition_is_children) * num_hh_joint_tours,0.1047,
"Child, number of joint tours, mixed",(~adult & tour_composition_is_mixed) * num_hh_joint_tours,-0.5089,
"Adult, number of other adults in the household, adults-only party",(adult & tour_composition_is_adults) * (num_adults - 1)
"Adult, number of other adults in the household, mixed party",(adult & tour_composition_is_mixed) * (num_adults - 1)
"Child, number of other children in the household, child-only party",(~adult & tour_composition_is_children) * (num_children - 1)
"Child, number of other children in the household, mixed",(~adult & tour_composition_is_mixed) * (num_children - 1)
"Adult, number of other adults in the household, adults-only party",(adult & tour_composition_is_adults) * (num_adults - 1),,
"Adult, number of other adults in the household, mixed party",(adult & tour_composition_is_mixed) * (num_adults - 1),,
"Child, number of other children in the household, child-only party",(~adult & tour_composition_is_children) * (num_children - 1),,
"Child, number of other children in the household, mixed",(~adult & tour_composition_is_mixed) * (num_children - 1),,
#,,,
"Adult, log of max window overlap with an adult, adult-only party",(adult & tour_composition_is_adults) * log_time_window_overlap_adult,0.8436,
"Adult, log of max window overlap with a child, mixed",(adult & tour_composition_is_mixed) * log_time_window_overlap_adult,2.189,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ local scalar distance skim,_SOVMD_SKIM,"skim_dict.get(('SOV_TIME', 'MD'))"
temp auto_time_to_destination,_auto_time_to_destination,"_SOVMD_SKIM.get(joint_tours.origin, joint_tours.destination)"
temp auto_time_return,_auto_time_return,"_SOVMD_SKIM.get(joint_tours.destination, joint_tours.origin)"
free flow roundtrip_auto_time,roundtrip_auto_time,"_auto_time_to_destination + _auto_time_return"
#"number of joint tours that this joint tour's point_person participates in",,
#"number of joint tours that this joint tours point_person participates in",,
,num_person_joint_tours,"reindex_i(joint_tour_participants.groupby('person_id').size(), joint_tours.person_id)"
2 changes: 1 addition & 1 deletion example/configs/mandatory_tour_frequency_alternatives.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# alt file for building tours even though simulation is simple_simulate not interaction_simulate
#,,alt file for building tours even though simulation is simple_simulate not interaction_simulate
alt,work,school
work1,1,0
work2,2,0
Expand Down
2 changes: 1 addition & 1 deletion example/configs/stop_frequency_alternatives.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# alt file for building tours even though simulation is simple_simulate not interaction_simulate
#,,alt file for building tours even though simulation is simple_simulate not interaction_simulate
alt,out,in
0out_0in,0,0
0out_1in,0,1
Expand Down
2 changes: 1 addition & 1 deletion example/configs/trip_purpose_probs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ atwork,True,5,23,PTYPE_FULL,0.206,0,0,0.122,0.166,0.247,0.241,0.004,0.014
atwork,True,5,23,PTYPE_PART,0.206,0,0,0.122,0.166,0.247,0.241,0.004,0.014
atwork,True,5,23,PTYPE_UNIVERSITY,0.206,0,0,0.122,0.166,0.247,0.241,0.004,0.014
atwork,True,5,23,PTYPE_DRIVING,0.206,0,0,0.122,0.166,0.247,0.241,0.004,0.014
#
#,,,,,,,,,,,,,
work,False,5,14,PTYPE_FULL,0.175,0,0,0.14,0.27,0.162,0.134,0.05,0.069
work,False,5,14,PTYPE_PART,0.097,0,0,0.252,0.211,0.192,0.159,0.089,0
work,False,5,14,PTYPE_UNIVERSITY,0.134,0,0,0.329,0.114,0.212,0.169,0.042,0
Expand Down

0 comments on commit 5097ce8

Please sign in to comment.