osmose.engine.initialization

Warm-start standing-stock initialization (opt-in, inert by default).

Given a per-species initial biomass, seed an age-structured standing adult population at t=0 (numbers-at-age ~ exp(-Z*age), Von Bertalanffy length, allometric weight), so a genuine adult community — including a clupeid-dominated alternative state — can exist at t=0 for a reciprocal-invasion / hysteresis test. Mirrors osmose/engine/incoming_flux.py. Gated by the canonical config flag module.population.initialisation.enabled (default false => empty init, byte-identical to the current Java-convention empty population).

When the flag is on, egg-seeding is disabled (config sets seeding_max_step=0) so the standing stock evolves under fixed parameters without the SSB==0 egg-rescue continuously re-injecting a suppressed species — see config._load_reproduction.

The age structure is a COARSE starting shape: the decay rate is a life-history proxy (max of the residual additional mortality and 1.5*K), not a true total Z, so the seeded stock re-equilibrates under the model’s own dynamics within a few years. It is an initial condition, not an equilibrium the model must preserve.

Functions

age_structured_population(target_biomass, ...)

Distribute target_biomass (tonnes) across integer age classes 0..floor(lifespan).

build_initial_population(config, grid, rng)

Age-structured standing population at t=0, or an empty SchoolState if the flag is off.