executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
units-and-equationsUse Brian2 physical units, equation declarations and flags, parser-supported expressions, stochastic terms, namespaces, state updaters, and unit-aware custom functions safely.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this route when a task is about dimensional correctness, equation-string syntax, stochastic symbols, numerical integration method selection, namespaces, or unit-aware custom functions. Load only the reference needed for the current question:
Equations,
check_units, Function, and implementation boundaries.For a quick, read-only probe of unit declarations and unit-aware functions, run
python scripts/unit_equation_smoke.py --help, then --all in an environment
where the brian2 package imports successfully. The smoke script intentionally
checks both passing and failing dimensional cases; it is not a replacement for
model or device tests.
: is the variable's unit; the right-hand side must be that unit per
second.volt, second, amp,
metre, etc.), including compound dimensions. Use scaled units (mV,
ms, nA) for assigned values and external namespaces. Use mmolar/mM
for molar concentration in equations.Equations object first. Then instantiate the owning group
or call its unit check so unknown names, namespaces, flags, dependency cycles,
and dimensional errors are actually validated. Equations construction
alone does not perform all context-dependent checks.namespace or the
Network.run(..., namespace=...) argument when reproducibility matters.
Avoid relying on implicit locals/globals when a name could be shadowed.method only after classifying the ODE (linear, conditionally linear,
deterministic nonlinear, additive noise, or multiplicative noise). If a
method rejects the equations, change the method or the equation form; do
not hide the rejection by disabling unit checks.@check_units (or a complete Function). Add target implementations only
when the selected code-generation target needs them, and keep the
implementation decorator outside the unit decorator. Test the Python/NumPy
path separately from C++/Cython compiler integration.The bundled smoke covers a valid and invalid dimensional operation, equation
flags and parser rejection, explicit namespaces, suffixed-noise rules, a
unit-checked Function, a NumPy implementation, exact versus Euler decay,
and finite additive noise. Treat --all as a bounded contract check, not as a
substitute for owner-specific synapse, linked-variable, or device tests.
Route high-level neuron/synapse construction to the modeling or synapses-and-inputs routes. Route device, compiler, standalone build, and backend installation problems to code-generation. Keep this route focused on the contracts above.