Billing: a recompute after the day tick no longer counts today's 95th-percentile sample twice
dayTick() routes the day, then appends today's transit use to t.hist. Every compute() after that (any click, the intern, the sales trial) took the last 29 entries of t.hist, which now end on today, and added today's use again: today counted twice and the 30th day back dropped out. So compute() gave a different transit bill the second time after each day. p95() now leaves today's sample out once S.hist says the day has been recorded. This was the only part of compute() that was not a pure function of S. The rest of the drift round 1 saw (R right after dayTick vs. a fresh compute) is dayTick itself changing S after its compute (customers churning, events ending), which is intended: the next day routes the new state. Scenic circuits' hysteresis is documented, with a test that two calls converge.
This commit is contained in:
parent
2a5a26a831
commit
94b27eadf3
4 changed files with 50 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ All notable changes to this project are documented here. The project follows
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- Transit bills no longer change when you click something later in the day. After each day, the 95th percentile counted that day twice and dropped the oldest day, so building or changing anything could nudge your transit bill (and the bank's view of it) until the next day came round.
|
||||
- A new start screen with four doors: Puzzles, Sandbox, Normal, and Scenarios & weekly. Every network now picks its rules when it starts, and they stay locked for that network; your saved games carry on exactly as before.
|
||||
- Normal comes in three flavours. Change Freeze has a third of the outages and no DDoS floods, delivers PNIs, cross-connects and builds in days instead of months (#151), and skips the peering inbox, hardware shortages and sold-out routes. On-call is the classic game. BGP at 3 a.m. brings almost twice the outages, lasting half as long again, and twice the DDoS. The HUD and the share card show which one you picked.
|
||||
- Sandbox is a real sandbox now (#188): everything is unlocked from day one, your own subsea cable included, money never runs out, deliveries are quick, and you pick how much chaos you want, from none to spicy.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue