Commit Graph

2 Commits

Author SHA1 Message Date
zack3d a7638c411a feat(examples): add colorized dashboard to demo
Revamp the console monitor UI in examples/demo_app.rs with ANSI-colored
sections and improved layout for readability.

- Add color palette, dashboard width, and styling helpers
- Introduce banner, section, and stat line builders
- Colorize prompt, status lines, and organ snapshots
- Display validity tags for measurements and styled warnings/errors
- Restructure output into Simulation, Circulation, Heart, Organ
  Snapshots, and Status sections
- Cache TTY color detection via OnceLock and respect NO_COLOR

No API changes; improvements are limited to the example app.
2025-09-24 03:06:22 -07:00
zack3d 886484919d feat(organs): retune heart and bladder dynamics
- Heart:
  - Raise baseline SVR to 18.5 and derive initial CO/afterload from baseline
  - Correct baroreflex direction: SVR increases with sympathetic tone
  - Recompute BP via raw diastolic + pulse pressure relationship
  - Tighten clamps for physiologic ranges and stabilize resting state
  - Add unit test: resting_state_stays_stable
- Bladder:
  - Replace steep nonlinear compliance with scaled linear compliance
  - Add volume-based abdominal term and nonlinear passive gain
  - Reduce active pressure gain and clamp max pressure to 80 cm H2O
- Patient/tests:
  - Add multi-organ homeostasis stability integration test (5h sim)
  - Assert physiologic bounds across lungs, brain, kidneys, liver,
    GI, pancreas, spleen, bladder, esophagus, and spinal cord
- Build/examples:
  - Add demo-monitor feature flag and demo_app example

These changes improve physiologic realism and long-run stability while
adding coverage to prevent regressions.
2025-09-24 02:55:29 -07:00