Skip to content

Commit

Permalink
adding calls to larch for new simple simulate models
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensle committed Mar 11, 2024
1 parent 6d817be commit d8af5b8
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions activitysim/estimation/larch/simple_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,22 @@ def free_parking_model(
)


def work_from_home_model(
name="work_from_home",
edb_directory="output/estimation_data_bundle/{name}/",
return_data=False,
):
return simple_simulate_model(
name=name,
edb_directory=edb_directory,
return_data=return_data,
choices={
True: 1,
False: 2,
}, # True is work from home, false is does not work from home, names match spec positions
)


def mandatory_tour_frequency_model(
name="mandatory_tour_frequency",
edb_directory="output/estimation_data_bundle/{name}/",
Expand Down Expand Up @@ -295,3 +311,54 @@ def joint_tour_participation_model(
1: 2, # 1 means not participate, alternative 2
},
)


def transit_pass_subsidy_model(
name="transit_pass_subsidy",
edb_directory="output/estimation_data_bundle/{name}/",
return_data=False,
):
print("transit pass subsidy")
return simple_simulate_model(
name=name,
edb_directory=edb_directory,
return_data=return_data,
choices={
0: 1, # 0 means no subsidy, alternative 1
1: 2, # 1 means subsidy, alternative 2
},
)


def transit_pass_ownership_model(
name="transit_pass_ownership",
edb_directory="output/estimation_data_bundle/{name}/",
return_data=False,
):
return simple_simulate_model(
name=name,
edb_directory=edb_directory,
return_data=return_data,
choices={
0: 1, # 0 means no pass, alternative 1
1: 2, # 1 means pass, alternative 2
},
)


def telecommute_frequency_model(
name="telecommute_frequency",
edb_directory="output/estimation_data_bundle/{name}/",
return_data=False,
):
return simple_simulate_model(
name=name,
edb_directory=edb_directory,
return_data=return_data,
choices={
"No_Telecommute" : 1,
"1_day_week" : 2,
"2_3_days_week" : 3,
"4_days_week" : 4,
},
)

0 comments on commit d8af5b8

Please sign in to comment.