tucoopy.games.airport¶
Airport (cost) games.¶
In the standard airport cost game, each player \(i\) has a runway requirement \(r_i\), and the cost of a coalition is
\[ c(S) = \max_{i \in S} r_i. \]
This module returns a TU worth game by negating the cost: \(v(S) = -c(S)\).
See Also
tucoopy.games.mst.mst_game tucoopy.games.flow.flow_game
Examples:
>>> from tucoopy.games.airport import airport_game
>>> g = airport_game([3, 5, 7])
>>> g.value(0b011)
-5.0
airport_game ¶
airport_game(runway_requirements, *, player_labels=None)
Construct an airport (cost) game as a TU worth game.
Standard airport cost game:
\[c(S) = \max_{i \in S} r_i\]
This constructor returns a worth game by taking \(v(S) = -c(S)\), so that cost allocations can be represented as negative payoffs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
runway_requirements | Sequence[float] | List of runway requirements for each player. | required |
player_labels | list of str | Optional labels for players. | None |
Returns:
| Type | Description |
|---|---|
Game | Cooperative game instance representing the airport cost game. |
Raises:
| Type | Description |
|---|---|
InvalidParameterError | If fewer than 1 player is provided. |
Examples:
>>> from tucoopy.games.airport import airport_game
>>> g = airport_game([3, 5, 7])
>>> g.n_players
3
>>> g.value(1)
-3.0
>>> g.value(3)
-5.0
>>> g.value(7)
-7.0