Worked Examples

Developer reference for parameter sweeps — Sustainable Catalyst Workbench

Developer reference for parameter sweeps — Sustainable Catalyst Workbench Availability: Implemented source and a local, isolated-router example are TESTED at the pinned Workbench commit. Full application startup, browser interacti

ProductSustainable Catalyst WorkbenchUpdatedNovember 11, 2026Reading time5 minutes

Developer reference for parameter sweeps — Sustainable Catalyst Workbench

Availability: Implemented source and a local, isolated-router example are TESTED at the pinned Workbench commit. Full application startup, browser interaction, authentication, WordPress execution and deployed behavior remain UNVERIFIED. These articles remain internal drafts with publication blocked.

The selected implementation is the historical v750 simulation runtime. It imports the current canonical version 14.0.0; the README says v10.4.0 and older tests contain historical expectations. Identify this behavior by source commit and route, not by assuming those labels establish installed-release compatibility.

Selected implementation and schema

This topic verifies backend/app/v750.py, specifically SweepRequest, parameter_sweep, _metric and POST /simulations/parameter-sweep. The implementation normalizes a baseSimulation, deep-copies its model for every value, sets one dotted parameter path through v730._set_path, calls run_simulation and collects metric/hash/diagnostics rows. It runs synchronously in a loop; it is not the v920 persistent campaign coordinator.

Field Actual contract
baseSimulation SimulationRequest: supported simulationKind plus model dictionary and optional references/events/metadata
parameterPath String length 1–200; passed to the dotted dictionary path setter
values 2–101 float values; validator rejects nonfinite numbers; order and duplicates retained
metric final-state, maximum-state, minimum-state, or duration; default final-state
requestKey String maximum 180 characters, default parameter-sweep; child keys receive an index suffix

The model is a dictionary at this outer layer. A syntactically accepted path is not guaranteed to name a real underlying model parameter. _set_path can create missing dictionaries/fields; a tested gaim path was accepted and ineffective for the first-order model. Collision with an existing scalar was observed as 422. Do not document the path field as a complete model-schema validator.

Supported simulation kinds are scalar-dynamic, linear-state-space, ode-ivp and digital-twin. Only the scalar first-order gain example is verified by this batch. No claim is made that all model/path combinations, event behavior or heterogeneous state metrics are scientifically appropriate.

Execution, result and failure behavior

For each supplied value, the function runs a fresh model and adds index, parameterValue, metricValue, simulationRunHash and diagnostics to runs. The top-level schema is sc-workbench-dynamical-parameter-sweep/1.0, with version, parameterPath, metric, runCount, minimumMetric, maximumMetric, automaticOptimizationPerformed: false and sweepHash. Non-null metric values determine the summary extrema; retain missing metric rows rather than silently dropping them from a research table.

_metric takes final-state from the last sample of the first state. Maximum/minimum-state use all non-null sampled state values; duration is last minus first trajectory time. There is no arbitrary user-defined metric expression in this request model. A metric is not automatically a unit-aware physical observable.

There is no per-point exception accumulator in the loop. An exception can terminate the request; do not promise partial-result return, checkpoint resume, asynchronous jobs or idempotent persistence. Reusing requestKey does not implement caching or duplicate suppression. Local repeated numbers matched while sweep hashes differed, so compare the declared outputs numerically and retain execution fingerprints separately.

Observed local router cases returned 422 for one value, 102 values, an invalid metric, scalar path collision and zero time_constant. Nonfinite values were rejected directly by the request model. These observations used the actual router in a minimal FastAPI application; they do not certify a deployed middleware/error contract. The quantity HTTP errors tracked in issue #49 belong to a different endpoint.

Related source contracts, not interchangeable APIs

The legacy v250 module declares a /v250 prefix, so its separate scenario route is /v250/scenarios/sweep. It accepts minimum/maximum/steps (2–501), supplies its own fixed integration settings and returns parameterValues/outcomes plus fitted slope/R². It is not the explicit-list v750 route and was not exercised as the tutorial endpoint.

The campaign-manager documentation describes deterministic axis expansion, budgets, resumable state and prepared jobs. That source documents separate planning/state authority, not automatic execution of the v750 sweep. No campaign API or persistence is verified in this topic.

The inspected v750 WordPress adapter exposes a status shortcode and a status proxy. That file does not establish a browser sweep editor or a WordPress POST proxy for this example. Deployment, browser UI and access control were not tested. The selected sweep route contains no module-local auth dependency; full-app protection must be verified separately.

Tests and release evidence

test_parameter_sweep_is_bounded_and_does_not_optimize passed unchanged against the isolated actual router. Nineteen focused checks include analytic accuracy, timestep refinement, ordered/duplicate values, numerical repetition, finite diagnostics, bounds and parameter-path behavior. The normal test module remains blocked by missing app.v10110. Static source tests have one pass and three failures covering stale version/plugin expectations and absent retired root release artifacts. Do not present those results as a green full Workbench test suite.

Source evidence, test status and related guides

SweepRequest, parameter_sweep, metric extraction and the actual route; Underlying first-order derivative and RK4 integrator; Parameter path setter; Existing simulation/sweep regressions.

On 2026-11-10, 19 focused local checks passed, including the unchanged test_parameter_sweep_is_bounded_and_does_not_optimize function, using the actual v750 router in a minimal FastAPI app. The full upstream test command could not collect because app.main imports missing app.v10110. tests/test_v750_static.py produced 1 pass and 3 failures from historical release/plugin assertions and missing retired root release artifacts. No source repair or deployed acceptance was performed.

Engineering tracking, checked for existing issues first: startup blocker #47, release-reference inconsistencies #48, and quantity HTTP error handling #49. Issue #49 concerns the separate quantity route; do not assume the same errors occur in every sweep request.

Related: overview, worked how-to, research protocol, developer reference, troubleshooting. Technical/scientific review remains pending and the review owner is unassigned.

Scroll to Top