osmose.engine_cs.build¶
Build the parameter bundle the C# engine runs from (spec section 8.2, plan task 1.2).
Python resolves, C# computes (spec 8.1): every table here is what the Python engine itself reads, already parsed, per species and, where a value can change, per step. The C# engine never sees a config key, a file or a species name it must interpret.
Tasks 1.2a/b build the header, the static tables (contract, run, time, grid, species, growth, predation with feeding stages, stage accessibility, non-fishing mortality, output settings) and the per-step fishing and reproduction tables. Resources, movement and the result buffers (1.2c) follow.
Entry names, dtypes and shapes are the contract. Every array is validated against
n_total = n_focal + n_background (or n_focal) here, so a mis-sized table fails at build
time with its name rather than inside the engine.
Module Attributes
|
|
|
|
|
|
|
|
|
|
|
|
|
the patches get their own stream, derived from the run seed, so they never share one with anything else. |
|
The life-stage buffers, named as the |
|
Bits of |
|
Columns of |
Functions
|
Where each focal species' age classes start in a by-age record ( |
|
Allocate the result buffers and the control block and register them in |
|
The bundle for one run of |
|
The diet's prey columns, as |
|
The shape of ONE record of every family that is on, by buffer name (the |
|
How many records a run writes: one per full window plus a trailing partial one (as |
|
The families |
|
The left edges of the length classes, as |
Classes
|
The arrays the C# engine writes into, owned by Python (spec 8.4/8.5). |
Exceptions
|
The config cannot be expressed as a bundle (a table has the wrong size, etc.). |