Skip to content

Model state format #574

Closed
Closed
@dmasad

Description

@dmasad

At the moment, the state of the model at any given time is captured by the model object itself, and by the agent objects under it. These are all dynamic, and change with every activation. The data collector stores a subset of the model state values, and the server generates a static data structure that's tied to the specific visualization.

An idea for an alternative approach is defining a static model state data structure. This could be as simple as a JSON-type object which stores (by default) all model- and agent-level variable values at the time its called. This could supplement the current DataCollector, and potentially provide a standardized data format to send the client side of the visualization. It would also make it easier to log and store an entire run for later analysis, or for scrubbing forward and back video-style. The downside is that JSON specifically is heavy with lots of redundancies (especially if we store each agent's unique_id with hundreds+ of agents and hundreds+ of steps). That might make sending data to the browser slower. Even a more efficient format might slow models down by collecting and storing a lot of redundant or unnecessary data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions