allocation
Create a matrix with preferences where to move in to per household category.
The marix will have the same dimensions as the inhabit matrix. Each row in the matrix represents one household category. The columns represent the household categories. The cells in each row are filled with values summing up to 1. A value in a cell means the following: The probability that the hosehold with the given configuration (the row) wants to move to the dwelling type of the respective column.
From the input sheet “inputs.csv” a variant for the generation of the preference matrix must be chosen.
Currently available variant: - “current_quintile”: the preferences of the household category
are equal to the distribution of households in the inhabit matrix in the same household category (including the same quintile)
Variants in the future: - “quintile_above”: the preference of the household category in quintile qx
is equal to the distribution of households in the inhabit matrix of the same household category but in the above quintile (q{x+1})
“highest_quintile”: the preference of the household category in quintile x is equal to the distribution of households in the inhabit matrix of the same household category but in the highest quintile (q5)
“avg_highest_current_quintile”: the preference of the household category in quintile qx is equal to the average of a) the distribution of hh in the inhabit matrix of the same hh category and b) the distribution of hh in the inhabit matrix in the same hh category but in the highest quintile ((qx+q5)/2)
Functions
|
|
|
|
|
|
|
|
|
Generate all [current_room, target_room] combinations in oscillating order. - dwell_order: 'oscillate_larger' starts up then down 'oscillate_lower' starts down then up. |
|
|
|
|
|
|
|
|
|
Create preference matrix from inhabit vector that focuses on the same quintile. |
|
Function that calculates the preference matrix for the preference setting 'no_preferred_underoccupation', where the preferences "current_quintile" are manipulated, so that househods want prefere dwellings with a maximum number of rooms of hh_hize+1 |
|
Function that calculates the preference matrix for the preference setting 'quitile 4 aspiration', that is a mix of "current quintile" for all except from q4 that has the preference quintile above Steps: 1. Call the calc_shares function, that calculates the historic preferences. 2. go through the quintiles, starting from the second highest, and copy preferences from the quintile above to it use .xs method of multiindex to access the quintile preferences Args: inhabit: cols_dwell:. |
|
Function that calculates the preference matrix for the preference setting 'quintile above' Steps: 1. Call the calc_shares function, that calculates the historic preferences. 2. go through the quintiles, starting from the second highest, and copy preferences from the quintile above to it use .xs method of multiindex to access the quintile preferences Args: inhabit: cols_dwell:. |
|