laser.measles.mixing.competing_destinations
laser.measles.mixing.competing_destinations
laser.measles.mixing.competing_destinations.CompetingDestinationsMixing(scenario=None, params=None)
Bases: BaseMixing
Competing-destinations migration model for spatial mixing.
Extends the gravity kernel with a correction that accounts for the attractiveness of alternative destinations:
When \(\delta < 0\), destinations that are surrounded by many other attractive locations receive less travel — the nearby alternatives "compete" for travellers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
DataFrame | None
|
Patch data. |
None
|
params
|
CompetingDestinationsParams | None
|
Model parameters. |
None
|
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
laser.measles.mixing.competing_destinations.CompetingDestinationsMixing.get_migration_matrix()
Compute the competing-destinations migration matrix.
Returns:
| Type | Description |
|---|---|
ndarray
|
Migration matrix of shape |
laser.measles.mixing.competing_destinations.CompetingDestinationsParams
Bases: BaseModel
Parameters for the competing-destinations mixing model.
Extends the gravity kernel with a correction factor that penalises destinations surrounded by many other attractive alternatives.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
a
|
float
|
Population source exponent. |
required |
b
|
float
|
Population destination exponent. |
required |
c
|
float
|
Distance decay exponent. |
required |
k
|
float
|
Average trip probability. |
required |
delta
|
float
|
Destination-competition exponent — negative values penalise destinations with many nearby competitors. |
required |
Example:
1 2 3 4 5 | |