Skip to content

Commit

Permalink
Merge pull request #539 from jpn--/args-on-location-est
Browse files Browse the repository at this point in the history
pass through kwargs for location choice model estimation
  • Loading branch information
jpn-- committed Mar 15, 2022
2 parents 5495553 + d6b6d68 commit c5f437e
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions activitysim/estimation/larch/location_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,46 +287,53 @@ def update_size_spec(model, data, result_dir=Path('.'), output_file=None):
return master_size_spec


def workplace_location_model(return_data=False):
def workplace_location_model(**kwargs):
unused = kwargs.pop('name', None)
return location_choice_model(
name="workplace_location",
return_data=return_data,
**kwargs,
)


def school_location_model(return_data=False):
def school_location_model(**kwargs):
unused = kwargs.pop('name', None)
return location_choice_model(
name="school_location",
return_data=return_data,
**kwargs,
)


def atwork_subtour_destination_model(return_data=False):
def atwork_subtour_destination_model(**kwargs):
unused = kwargs.pop('name', None)
return location_choice_model(
name="atwork_subtour_destination",
return_data=return_data,
**kwargs,
)


def joint_tour_destination_model(return_data=False):
def joint_tour_destination_model(**kwargs):
# goes with non_mandatory_tour_destination
unused = kwargs.pop('name', None)
if 'coefficients_file' not in kwargs:
kwargs['coefficients_file'] = "non_mandatory_tour_destination_coefficients.csv"
return location_choice_model(
name="joint_tour_destination",
coefficients_file="non_mandatory_tour_destination_coefficients.csv",
return_data=return_data,
**kwargs,
)


def non_mandatory_tour_destination_model(return_data=False):
def non_mandatory_tour_destination_model(**kwargs):
# goes with joint_tour_destination
unused = kwargs.pop('name', None)
return location_choice_model(
name="non_mandatory_tour_destination",
return_data=return_data,
**kwargs,
)


def trip_destination_model(return_data=False):
def trip_destination_model(**kwargs):
unused = kwargs.pop('name', None)
return location_choice_model(
name="trip_destination",
return_data=return_data,
**kwargs,
)

0 comments on commit c5f437e

Please sign in to comment.