docs(sim): point code comments at the current equation and table numbers
Four references still used the numbering from before the note was extended: the crime dynamics are equation (12), the court queue is equation (28) and the parameter table is table 3. Comments and one printed heading only. Verified by running sim.py before and after: 22/22 data files byte-identical, output differs in that one heading. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
e6e9d3c74d
commit
4a9170c3b7
1 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ def Omega(t, p):
|
|||
def removal(K, L, T, p):
|
||||
"""Fjerningsleddet F = gamma' Lambda^eta T K / (1 + K/K_sat), der
|
||||
gamma' = gamma (1 + K_ref/K_sat) er rekalibrert slik at F er uendret i
|
||||
referanselikevekten (K_ref = 1). K_sat = inf gir eksakt lign. (9)."""
|
||||
referanselikevekten (K_ref = 1). K_sat = inf gir eksakt lign. (12)."""
|
||||
g_eff = p["gamma"] * (1.0 + 1.0 / p["ksat"])
|
||||
return g_eff * L ** p["eta"] * T * K / (1.0 + K / p["ksat"])
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ def chain_at(ch, t):
|
|||
def court(ch, Q, JD, t, tau_ref):
|
||||
"""Returnerer (R_D, tau_D, dQ/dt, g)."""
|
||||
Z, _ = chain_at(ch, t)
|
||||
if Z is None or np.isinf(Z): # ingen flaskehals: R_D = J_D, lign. (9) eksakt
|
||||
if Z is None or np.isinf(Z): # ingen flaskehals: R_D = J_D, lign. (12) eksakt
|
||||
RD, tauD, dQ = JD, tau_ref, 0.0
|
||||
else:
|
||||
RD = Z * Q / (Q + ch["m"] * Z)
|
||||
|
|
@ -289,7 +289,7 @@ def extrema(r, every=20):
|
|||
# (b) Domstol med to sakstyper (A: alvorlige, B: øvrige), prioritet og c "spor".
|
||||
# Kapasitetsfunksjonen for c parallelle spor bygger på M/M/c-sammenhengen
|
||||
# mellom beholdning L (antall saker) og utnyttelse rho (Erlang C), invertert
|
||||
# numerisk; c = 1 gir eksakt R = Z Q/(Q + m Z) som i lign. (25).
|
||||
# numerisk; c = 1 gir eksakt R = Z Q/(Q + m Z) som i lign. (28).
|
||||
# (c) Rekruttering/smitte: Omega_soc = eps K^p / (K_h^p + K^p) i tilstrømningen.
|
||||
|
||||
def erlang_L(rho, c):
|
||||
|
|
@ -682,7 +682,7 @@ def pure_capacity_loop(kZ, L1=6.0, L2=24.0, supply_line=True, tend=600.0, J=0.13
|
|||
if __name__ == "__main__":
|
||||
import os
|
||||
os.makedirs("data", exist_ok=True)
|
||||
print("=== Del 1: styringsregimer uten kjede (tabell 2, avsnitt 8.1 og 9.3) ===")
|
||||
print("=== Del 1: styringsregimer uten kjede (tabell 3, avsnitt 8.1 og 9.3) ===")
|
||||
a = P["gamma"] * P["Lam0"] * P["T0"] + P["delta"]
|
||||
for kp in (1.0, 3.0, 6.0):
|
||||
b = P["gamma"] * P["Lam0"] * 1.0 * kp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue