run_simulation

readSince v1.0

Run the simulation and read back the COMPUTED time series for a scenario. Unlike get_time_series (which returns only stored input cells — manual entry or live data), this evaluates the Rhai property formulas and act scripts on demand and returns the resulting per-agent, per-property, per-timestep values, each with its simulated time, plus formula diagnostics. This is the only way to read formula-driven results via the API: they are computed on the fly and never persisted. scenario_id is required; parameter_set_id defaults to the scenario's twin's default parameter set. Use agent_instance_id, property_id, min_timestep, and max_timestep to scope large series. Check the diagnostics field (formula/act-script compile and runtime errors, cycles, unresolved dependencies) when results look wrong or empty.

Example Request

{"scenario_id": "scenario-uuid", "agent_instance_id": "agent-uuid", "property_id": "inventory"}

Example Response

{"scenario_id": "scenario-uuid", "parameter_set_id": "default", "total_count": 24, "returned_count": 24, "rows": [{"agent_instance_id": "agent-uuid", "property_id": "prop-uuid", "timestep_index": 0, "time": 1.0, "value": 600000.0}], "diagnostics": []}