API reference¶
The library’s public API. All names listed here are importable directly
from the top-level agent_urban_planning package (or its short alias aup):
import agent_urban_planning as aup
Core simulation¶
|
Orchestrate one end-to-end simulation: config to environment to market to metrics. |
|
Spatial environment holding zones and transportation network. |
|
One geographic unit (planning area or block) in a scenario. |
|
One representative household type (a weighted demographic record). |
|
Collection of weighted representative agent types. |
|
Four-axis preference weights for an agent or archetype. |
|
Elasticity-based tatonnement with adaptive damping and two-segment clearing. |
|
Two-market tatonnement clearing Q (residential floor) AND w (wages). |
|
Equilibrium output of a |
|
Aggregate welfare metrics summarizing one simulation run. |
|
Top-level container for one simulation run's output. |
|
Per-agent record summarizing an agent's outcome in one run. |
|
Reproducibility metadata for a single simulation run. |
|
Produce a stable, human-readable one-line persona from an agent's demographics. |
|
Compute aggregate welfare metrics from per-agent allocations. |
Decision engines (public API)¶
The three first-class decision-engine classes — configurable via constructor kwargs to reproduce V1-V5 from the paper:
|
Protocol every decision engine implements. |
|
Closed-form Cobb-Douglas + Fréchet utility decision engine. |
|
LLM-elicited preferences + closed-form mixed-logit choice (V4). |
|
Full LLM-as-decision-maker hierarchical engine (V5). |
|
An agent's chosen (residence, workplace) pair plus diagnostic utilities. |
|
Backward-compatible alias for |
Decision engines (paper-internal — advanced)¶
The underlying paper-internal classes that the public API delegates to. Most users should not need to import these directly.
|
Cobb-Douglas + Fréchet joint residence-workplace decision engine. |
|
Monte Carlo argmax decision engine with configurable shock distribution. |
|
Pure argmax with LLM-elicited per-type |
|
LLM-as-decision-maker engine with clustering and two-stage prompts. |