Appearance
grABM behavior and interpretation
This is the authoritative behavioral guide for the reusable ABM engine and the caller-supplied modeling assumptions. The model is a deterministic discrete-event comparative design tool. It is synthetic and uncalibrated; it is not a travel-demand forecast.
The same normalized input, seed, engine version, and model settings produce the same run hash. There is one current scenario and result contract.
For the execution timeline and queue ordering, start with event-based simulation. See space, routing, and capacity for network mechanics and reading results for observations and reproducibility.
What the engine simulates
The engine advances directly from one event to the next. It does not recompute every agent on every simulated minute. A quiet interval normally means agents are dwelling at facilities. Moving travelers are visible in playback, while stationary load is represented by facility occupancy and utilization.
Each run moves through six reported phases:
- Validating scenario checks facilities, units, schedules, modes, and references.
- Resolving population creates explicit and synthetic agents and samples each agent's schedule.
- Assigning work and learning chooses interval-capacity-aware anchors.
- Scheduling the day creates the stable event queue.
- Simulating events advances through departures, arrivals, completions, breaks, decisions, entries, and exits.
- Preparing results aggregates diagnostics, checks accounting, and computes the result hash. Overall progress reaches 100% only here.
Events at the same time are ordered by time, event priority, stable agent order, and sequence. Named PRNG streams isolate population, schedule sampling, anchor assignment, and destination choice. Legacy mode choice minimizes cost; optional mobility.travelChoice uses reproducible seeded probabilistic choice among feasible modes. Separate streams reduce random-sequence coupling; shared capacity and changed schedules can still alter downstream behavior.
Schedules and protected anchors
Schedules are explicit caller inputs, including fixed work, learning, and home periods plus discretionary decisions. The engine also supports bounded distributions and breaks when supplied by the caller; these are capabilities, not automatically inferred behavior.
Agenda items have two distinct flags: fixed enables advance destination assignment and constrains later decisions; protected prevents ordinary decisions within the item's time interval. fixed is required; protected defaults to true. Work, learning, and home are common activity IDs, but protection comes from the explicit flag, not the name. An agenda item with an assigned destination still schedules a departure even if fixed is false.
A decision template creates a timed activity choice. activityIds restrict its candidate activities; profile preferences weight those activities. An empty agenda does not synthesize work or home trips, and an empty decision list does not spontaneously create discretionary outings. Templates use fixed or bounded triangular distributions; resolved values are stored on the agents.
Ordinary decisions cannot interrupt protected anchors. A declared break temporarily releases physical occupancy but holds the anchor's return slot. The engine requires reachable outbound and return paths, shortens break dwell when necessary, and schedules the return before the deadline using free-flow estimates. Other discretionary choices are accepted only when outbound travel, dwell, and travel to the next fixed anchor fit.
Destination, mode, and capacity behavior
Home anchors use the assigned home. Fixed agenda items without a supplied destination are assigned during initialization with seeded cosine-logit sampling over reachable facilities with remaining overlapping anchor capacity. Discretionary destination utility is:
text
U = 4 × cosineFit
+ ln(attractiveness)
− 0.08 × generalizedTravelMinutes
− 1.5 × occupancyRatioAll coefficients, temperature, and stay probability are scenario settings and are recorded in result.input.scenario.behavior. Candidate IDs are stably ordered. Choice sets are indexed and route impedance is cached. The engine first shortlists up to 48 destinations using activity fit, attractiveness, straight-line distance, and crowding, then evaluates routed utility. Positive temperature controls how strongly sampling favors higher utility; it does not always pick the highest score. stayProbability can skip destination choice entirely (default 0.12). A selected destination still has to pass the subsequent agenda-time check; the engine does not search all other candidates after an insufficient-time outcome.
Hosts may tag gateway facilities as external fallbacks and attach an explicit activity-offering vector. The built-in choice strategy treats them as a second tier: it samples reachable in-model facilities when at least one is in the routed candidate set and considers external gateways otherwise. Fixed work and learning anchors use the same precedence. A trip to such a gateway represents crossing the model boundary; the engine records the routed boundary trip, capacity, occupancy, and dwell, but does not invent an outside network or destination.
For each enabled mode, routing uses metric length, speed, penalties, and mode preferences. Fixed-anchor departures use route travel time plus the configured arrival buffer (five minutes by default) instead of a hard-coded lead. Destination capacity is reserved at departure, converted to occupancy on arrival, and released on a later departure or presence exit. Completion ends planned dwell but does not release physical occupancy; declared breaks retain a return reservation. Capacity is nominal: a caller can allow committed occupancy (present people plus inbound reservations) up to 130% of nominal capacity before rejecting further demand. Crowding and reported utilization continue to use nominal capacity, so ratios above 1.0 explicitly mean overload. This is a synthetic planning-pressure allowance, not a life-safety limit. Same-bin road congestion affects recorded traversal time through 1 + 0.15 × (volume / capacity)^4 with default coefficients; route choice remains free-flow based. See the congestion approximation, including how the independent congestion window and event order affect it. Observation intervals change reporting only.
Why peaks still occur
Sampled distributions spread departures through time, but the day still has intentional waves around work, learning, lunch, home, and gateway windows. Those waves are schedule-driven, not proof of observed rush-hour demand. Shared shortest paths can concentrate them at a small number of graph bottlenecks.
Every run stores sparse diagnostics at the configured observation interval by cause, cohort, activity, mode, and outcome. Causes include anchors, break outbound/return, discretionary choices, home returns, and gateway entry/exit. Outcomes distinguish started, completed, stayed, protected skips, insufficient time, unreachable demand, capacity rejection, and cancellation. Analytics uses these aggregates to show:
- stacked departures by cause;
- decision and constraint outcomes;
- cohort, activity, and mode breakdowns;
- dominant causes for peak periods; and
- plain-language capacity, reachability, protection, and congestion notes.
These diagnostics are included in downloaded/restored runs and printed report cards. The engine does not store a full event log.
Playback time
Playback time is intentionally independent of wall-clock simulation execution. For a playback rate of five simulation minutes per real second:
text
elapsed simulation minutes
= elapsed real seconds × simulationMinutesPerSecond × speed multiplierAt 1×, a 24-hour run takes 288 seconds (4 minutes 48 seconds) to play from start to finish. The 0.25×, 0.5×, 1×, 2×, and 4× controls change the effective rate. Seeking remains exact against recorded edge traversals.
Modeling assumptions
Callers supply population, schedules, opening hours, dwell times, occupancy densities, mode speeds, path capacities, and gateway semantics. Unknown required semantics are errors. Source JSON is data, never instructions.
Configure fallback activities at gateways explicitly to represent external travel. Without fallback settings, unavailable activities remain unmet demand.
How to interpret a run
- Compare schemes with the same profile, settings, population, seed set, and package versions.
- Read time-of-day cause charts before calling a peak a network problem.
- Read constraint outcomes before treating low movement as low demand.
- Check disconnected-network and unreachable-demand warnings.
- Use several seeds to expose stochastic sensitivity.
- Keep all values labeled synthetic until calibrated against observed counts, schedules, occupancies, travel times, and mode shares.
Remaining limitations and next steps
- Coefficients, preferences, densities, schedules, and capacities are not calibrated.
- Household membership and authored activity needs are supported contracts, with recorded fulfillment outcomes. Hosts must supply those inputs; the engine does not infer household resources, flexible work days, learning across days, or endogenous demand. Optional vehicle continuity, shared journeys and conservative school escort duties require explicit inputs; see travel policies.
- Same-time stable ordering means earlier reservations can influence later agents.
- Congestion does not trigger dynamic rerouting. Optional caller-prepared timetables support scheduled transit and transfers, but not live service or transit crowding.
- Network behavior depends on the supplied graph topology. Drawn crossings connect only when explicitly linked through node IDs and graph edges.
- External fallback gateways are boundary proxies. They quantify that demand leaves the modeled neighborhood, but not its true regional destination, onward mode, or off-model travel time.
- Results remain detailed and self-contained. The codec stores large arrays as independently validated gzip segments, avoiding a full event log and the JavaScript giant-string failure seen at 50,500 agents. Production stores may still prefer columnar server-side persistence for cross-run queries.
The next modeling work should be evidence-led: define the design decisions the model must support, collect corresponding time-of-day counts, mode shares, travel times, and occupancies, then calibrate one layer at a time. Separately, benchmark simulation, serialization, analytics, loading, and playback at 10k, 50k, and the intended production population.
The future-work guide turns these limitations into proposed priorities, acceptance criteria, and possible later extensions.
Related documentation
abm-packages.mddescribes package and host boundaries.- The package README describes public APIs.
- Application implementation links to the external host repository.