agent_urban_planning.MarketResult

class MarketResult(prices, allocations, convergence_metric, iterations, converged, history=<factory>, cache_hits=0, cache_misses=0, total_input_tokens=0, total_output_tokens=0, damping_final=0.0, price_elasticity_used=0.5, wages=<factory>, commercial_price_diagnostic=<factory>, damping_final_wage=0.0, converged_floor=True, converged_labor=True, eta_wage_used=0.0, productivity_A=<factory>, amenity_B=<factory>, converged_agglomeration=True, agglomeration_trajectory=<factory>, theta_diagnostic=<factory>, arbitrage_gap_by_zone=<factory>, max_arbitrage_gap=0.0, theta_trajectory=<factory>)[source]

Bases: object

Equilibrium output of a HousingMarket or AhlfeldtMarket run.

Carries the equilibrium prices, the agent-id-keyed allocations, convergence diagnostics, and the per-iteration history. The Ahlfeldt-specific fields (wages, productivity_A, amenity_B, theta_diagnostic etc.) are populated only by Berlin runs; Singapore runs leave them empty.

Examples

>>> import agent_urban_planning as aup
>>> # Typically returned by SimulationEngine.run() rather than built directly.
>>> # See the quickstart tutorial for end-to-end usage.
Parameters:
prices: dict[str, float]
allocations: dict[int, ZoneChoice]
convergence_metric: float
iterations: int
converged: bool
history: list[MarketSnapshot]
cache_hits: int = 0
cache_misses: int = 0
total_input_tokens: int = 0
total_output_tokens: int = 0
damping_final: float = 0.0
price_elasticity_used: float = 0.5
wages: dict[str, float]
commercial_price_diagnostic: dict[str, float]
damping_final_wage: float = 0.0
converged_floor: bool = True
converged_labor: bool = True
eta_wage_used: float = 0.0
productivity_A: dict[str, float]
amenity_B: dict[str, float]
converged_agglomeration: bool = True
agglomeration_trajectory: list
theta_diagnostic: dict[str, float]
arbitrage_gap_by_zone: dict[str, float]
max_arbitrage_gap: float = 0.0
theta_trajectory: list