Projection
A relational or positional structure layered over an AgentModel.Context. Borrowed from Repast Simphony's terminology: a context owns membership (who is in this collection), while projections add structure (where each member is, who's related to whom). A single context can have multiple projections layered on top — an agent can simultaneously have a 2D position and membership in a network without those abstractions interfering.
Concrete projections in Phase 3 v1:
ContinuousProjection — 2D Euclidean positions with neighbor queries.
Grid and network projections may be added in a later phase. The interface stays minimal so adding new projection types is purely additive.
Lifecycle: a projection is attached to its context via AgentModel.Context.addProjection. When agents join or leave the context, the context calls onAgentJoined / onAgentLeft on each attached projection so the projection can update its bookkeeping (drop the agent's position, edges, etc.).
Inheritors
Functions
Called by the AgentModel.Context when agent joins. Default no-op — projections that need to do something (e.g., place the agent at a default position) override.
Called by the AgentModel.Context when agent leaves. Default no-op — projections that track per-agent state (positions, edges) typically override to drop their bookkeeping for the departing agent.