Simulation and recording
Use this route to control a Brian2 simulation after its model objects have been
specified. Prefer an explicit Network for reusable experiments, objects held
in containers, staged construction, train/test loops, or any run that must be
unambiguous. Use magic run only for a small, visible, single-scope model.
- Build the network, choose clocks and scheduling, run, snapshot, restore, seed
trials, and diagnose progress/profile/schedule here.
- Send monitor construction, recording variables, and monitor result access to
recording; send equations and units to
modeling and units-and-equations;
send devices, code-generation targets, and standalone builds to
code-generation.
- A
network_operation is a control callback boundary: create/configure and
schedule it here, but keep model/monitor implementation details in their
owning routes.
- Use
collect() to inspect magic membership, but construct
Network(collect()) and add hidden containers before the first run; it is not
a transfer mechanism for objects that have already been simulated.
Read only the reference needed for the operation:
- API reference — objects, arguments, and
invariants.
- Workflows — explicit/magic construction,
clocks, scheduling, progress, and diagnostics.
- Multiple runs —
start_scope, trials, and
store/restore/randomness.
- Troubleshooting — install/import,
optional dependencies, data/configuration, API misuse, and workflow errors.
For a tiny local smoke of explicit Network and snapshot/restore, use
scripts/network_smoke.py. It is intentionally small and does not replace
project-level verification.
1---2name: simulation-and-recording3description: "Assemble and run Brian2 simulations with explicit or magic4 networks, clocks, snapshots, scheduling, progress, and runtime diagnostics."5disable-model-invocation: true6metadata:7 source: https://skillmd.com/skills/vectorspacelab/simulation-and-recording8 disco-role: operating9license: NOASSERTION10---1112# Simulation and recording1314Use this route to control a Brian2 simulation after its model objects have been15specified. Prefer an explicit `Network` for reusable experiments, objects held16in containers, staged construction, train/test loops, or any run that must be17unambiguous. Use magic `run` only for a small, visible, single-scope model.1819- Build the network, choose clocks and scheduling, run, snapshot, restore, seed20 trials, and diagnose progress/profile/schedule here.21- Send monitor construction, recording variables, and monitor result access to22 [recording](../recording/SKILL.md); send equations and units to23 [modeling](../modeling/SKILL.md) and [units-and-equations](../units-and-equations/SKILL.md);24 send devices, code-generation targets, and standalone builds to25 [code-generation](../code-generation/SKILL.md).26- A `network_operation` is a control callback boundary: create/configure and27 schedule it here, but keep model/monitor implementation details in their28 owning routes.29- Use `collect()` to inspect magic membership, but construct30 `Network(collect())` and add hidden containers before the first run; it is not31 a transfer mechanism for objects that have already been simulated.3233Read only the reference needed for the operation:3435- [API reference](references/api-reference.md) — objects, arguments, and36 invariants.37- [Workflows](references/workflows.md) — explicit/magic construction,38 clocks, scheduling, progress, and diagnostics.39- [Multiple runs](references/multiple-runs.md) — `start_scope`, trials, and40 store/restore/randomness.41- [Troubleshooting](references/troubleshooting.md) — install/import,42 optional dependencies, data/configuration, API misuse, and workflow errors.4344For a tiny local smoke of explicit `Network` and snapshot/restore, use45`scripts/network_smoke.py`. It is intentionally small and does not replace46project-level verification.