Skip to content

Commit

Permalink
add more variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Jul 10, 2024
1 parent c235c63 commit 0fe2a82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/python/choicemodels/estimate_biogeme_plan_choice.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
default="../../../../plan-choices-bestK_9-tt-only.csv")
parser.add_argument("--mxl-modes", help="Modes to use mixed logit for", nargs="+", type=set, default=["pt", "bike", "ride"])
parser.add_argument("--est-performing", help="Estimate the beta for performing", action="store_true")
parser.add_argument("--est-exp-income", help="Estimate exponent for income", action="store_true")
parser.add_argument("--est-util-money", help="Estimate utility of money", action="store_true")

args = parser.parse_args()

Expand Down Expand Up @@ -47,7 +49,9 @@
SD = {}

# Factor on marginal utility of money
F_UTIl_MONEY = Beta('UTIL_MONEY', 1, 0, 1.5, ESTIMATE)
EXP_INCOME = Beta('EXP_INCOME', 1, 0, 1.5, ESTIMATE if args.est_exp_income else FIXED)

UTIL_MONEY = Beta('UTIL_MONEY', 1, 0, 2, ESTIMATE if args.est_util_money else FIXED)

BETA_PERFORMING = Beta('BETA_PERFORMING', 6.88, 0, 10, ESTIMATE if args.est_performing else FIXED)

Expand All @@ -72,7 +76,7 @@
AV = {}

for i in range(1, ds.k + 1):
u = v[f"plan_{i}_price"] * (ds.global_income / v["income"]) ** F_UTIl_MONEY
u = v[f"plan_{i}_price"] * UTIL_MONEY * (ds.global_income / v["income"]) ** EXP_INCOME
u -= v[f"plan_{i}_pt_n_switches"]

for mode in ds.modes:
Expand Down

0 comments on commit 0fe2a82

Please sign in to comment.