
Commuting choice model
The terms highlighted in orange relate to functional assumptions needed to solve the model. For each mode
is the (calibrated) wage earned. is the employment rate of the household, composed of two agents (household_size
parameter). is the monetary transport cost. is a time opportunity cost parameter (the fraction of working time spent commuting). follows a Gumbel minimum distribution of mean and (estimated) parameter .
Then, commuters choose the mode that minimizes their transport cost (according to the properties of the Gumbel distribution):
also follows a Gumbel minimum distribution of mean and scale parameter .
In the import_transport_data
function (inputs.data
module), for a given income group, this is imported with:
2022 (transportCostModes, transportCost, _, valueMax, minIncome
2023 ) = calcmp.compute_ODflows(
2024 householdSize, monetaryCost, costTime, incomeCentersGroup,
2025 whichCenters, param_lambda, options)
Looking into the body of the compute_ODflows
function (calibration.sub.compute_income
module), we see that the definitions of the transportCostModes
and transportCost
variables correspond to the above definitions of
615 # We first compute expected (hourly) total commuting cost per mode
616 # Note that incomeCentersFull is already defined at the household level,
617 # whereas monetaryCost is defined at the individual level: hence, we need
618 # to multiply monetaryCost by householdsSize to get the value of the
619 # monetary costs for all members of the households
620 transportCostModes = (
621 householdSize * monetaryCost[whichCenters, :, :]
622 + (costTime[whichCenters, :, :] * incomeCentersFull[:, None, None])
623 )
647 transportCost = (
648 - 1 / param_lambda
649 * np.log(
650 np.nansum(np.exp(- param_lambda * transportCostModes), 2))
651 )
Given their residential location
(income_centers_init
parameter)
This yields the probability to choose to work in location
In the import_transport_data
function, this corresponds to:
2064 ODflows[whichCenters, :, j] = (
2065 np.exp(
2066 param_lambda
2067 * (incomeCentersGroup[:, None] - transportCost))
2068 / np.nansum(
2069 np.exp(param_lambda
2070 * (incomeCentersGroup[:, None] - transportCost)),
2071 0)[None, :]
2072 )
From there, we calculate the expected income net of commuting costs for residents of group
In the import_transport_data
function, this corresponds to:
2097 incomeNetOfCommuting[j, :] = np.nansum(
2098 ODflows[whichCenters, :, j]
2099 * (incomeCentersGroup[:, None] - transportCost), 0)