65 lines
3.2 KiB
Markdown
65 lines
3.2 KiB
Markdown
|
|
# 実装記録 — v41
|
||
|
|
|
||
|
|
## 目的
|
||
|
|
|
||
|
|
v38 の描画・空間探索・水域/岩編集・Web Worker を維持しつつ、生態学コアを実単位ベースへ置換する。ユーザー指定により水深と人為的攪乱は実装しない。初期水域は厳密面積探索を使わず概ね2倍とし、ユーザー編集水域には倍率を掛けない。
|
||
|
|
|
||
|
|
v41 では追加要求により、実験用 API と詳細診断出力を削除した。
|
||
|
|
|
||
|
|
## v41 で削除したもの
|
||
|
|
|
||
|
|
- Worker: `set-interactions`
|
||
|
|
- Worker: `set-climate`
|
||
|
|
- Worker: `run-batch`
|
||
|
|
- batch progress/result/error 出力
|
||
|
|
- `benchmark.mjs`
|
||
|
|
- runtime interaction graph 置換機能
|
||
|
|
- `consumptionFlux`
|
||
|
|
- `assimilationFlux`
|
||
|
|
- `respirationLoss`
|
||
|
|
- `trophicFlux`
|
||
|
|
- `populationByGroup`
|
||
|
|
- `biomassByGroup`
|
||
|
|
- `meanBodyMass`
|
||
|
|
- `occupiedArea`
|
||
|
|
- `resourceTurnover`
|
||
|
|
- これらのためだけに存在した production/consumption counters
|
||
|
|
|
||
|
|
`worker.js` の state message は Canvas/UI の描画に必要な内部通信なので残す。`stats()` は `time / temp / population / plant / species / generation` のみ返す。
|
||
|
|
|
||
|
|
## 生態ロジック
|
||
|
|
|
||
|
|
- `DT = 1/24 day`
|
||
|
|
- producer: grid biomass field
|
||
|
|
- zooplankton: grid cohort biomass
|
||
|
|
- consumers: individual agents
|
||
|
|
- interaction graph: `ecology/feeding.js` の固定 sparse graph
|
||
|
|
- feeding: Holling denominator + Rall allometric/temperature scaling
|
||
|
|
- predation event: continuous rate → `1-exp(-rate*dt)`
|
||
|
|
- metabolism: `M^0.75` + ectotherm Arrhenius response
|
||
|
|
- reproduction: parent survives birth
|
||
|
|
- mortality: background / starvation / thermal / predation / lifespan
|
||
|
|
- movement: Hirt maximum-speed fit + behaviour-specific speed + daily budget + home range + dispersal
|
||
|
|
- growth: structural mass と reserve energy を分離し、juvenile growth は余剰 energy から支払う
|
||
|
|
|
||
|
|
## v41 監査中の修正
|
||
|
|
|
||
|
|
追加監査で、陸上 producer の light field が既に shade を含むのに growth 側でも shade を掛けていた二重適用を発見し、growth 側では light を一度だけ使うよう修正した。
|
||
|
|
|
||
|
|
v40 では aquatic producer growth に dissolved oxygen multiplier を掛けていたが、元仕様の式は
|
||
|
|
|
||
|
|
`mu = muMax(T) * min(fN, fP) * fLight`
|
||
|
|
|
||
|
|
であり DO は phytoplankton growth の直接因子として指定されていなかった。v41 では DO multiplier を producer growth から削除した。
|
||
|
|
|
||
|
|
また、年齢だけで `biomass()` を決めていた処理を廃止し、`structuralMassKg` を個体状態として保持するよう変更した。成長は reserve floor を超えた energy だけを使用し、成長コストは provenance に較正値として明記した。
|
||
|
|
|
||
|
|
## 水域
|
||
|
|
|
||
|
|
初期 procedural water の半径だけ `sqrt(2)` 倍する。重なりのため union 面積は厳密2倍にはならない。面積を計測して二分探索するコードはない。
|
||
|
|
|
||
|
|
ユーザー編集では `setWater()` が渡された円群を clone してそのまま採用する。既定追加半径は 170 m のまま。
|
||
|
|
|
||
|
|
## 文献値と較正値
|
||
|
|
|
||
|
|
Hirt / Rall / Bissinger 等から直接採用した係数と、simulator calibration を `PARAMETER-PROVENANCE.json` で区別する。routine movement、home range、life history、resource K、zooplankton cohort 係数などは普遍的な実測定数とは主張しない。
|