agent_urban_planning.ZoneChoice

class ZoneChoice(zone_name=None, utility=0.0, zone_utilities=None, *, residence=None, workplace=None)[source]

Bases: LocationChoice

Backward-compatible alias for LocationChoice.

Accepts the legacy keyword-argument style ZoneChoice(zone_name=..., utility=..., zone_utilities=...) and maps zone_name to both residence and workplace (since Singapore scenarios conflated them). Also accepts the new residence= / workplace= keywords for forward compatibility. New code should use LocationChoice directly; this class remains so that the large existing codebase (utility engines, LLM engines, clustering, cache serialization) continues to work unchanged.

Examples

>>> from agent_urban_planning import ZoneChoice
>>> legacy = ZoneChoice(zone_name="Mitte", utility=1.5)
>>> legacy.residence == legacy.workplace == "Mitte"
True
>>> # New code SHOULD use the explicit residence/workplace kwargs:
>>> modern = ZoneChoice(residence="Mitte", workplace="Charlottenburg",
...                     utility=2.1)
>>> modern.workplace
'Charlottenburg'
Parameters: