Commit Graph

4 Commits

Author SHA1 Message Date
60c36e5d27 urban_commuting: mission requirements, maintenance, cruise-speed decision
Some checks failed
tests / pytest (3.11) (push) Has been cancelled
tests / pytest (3.13) (push) Has been cancelled
- ratio-log normalization (scale-invariant) replacing log1p
- domain requirements (payload, trip_range) as hard mission constraints
- platform payload_ratio, rotorcraft hover floor (min_specific_power)
- maintenance_multiple + service_life folded into cost per metre
- cruise speed searched between domain speed floor and build top speed
- default-deny "domain" requires: Wind Sail / Gravity Coast need the
  domain to declare prevailing_wind / net_descent
- LOGIC DOCS/004: cost per passenger and infrastructure cost, tabled

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-25 23:12:36 -05:00
b2ccd94fd5 simplify: one scoring path, bare AST formulas, localhost-only dev server
- move _score_raw into scorer.score_raw; Scorer delegates to it
- compile_formula returns ast.Expression directly (drop CompiledFormula)
- secret key from env or random; drop hand-rolled .env parsing/appending
- dev server binds 127.0.0.1 by default (HOST env override); Docker sets
  HOST=0.0.0.0 so container port mapping still works
- trim pipeline comments narrating past bugs (history lives in git)
- snapshot free-var/formula (de)serialization via asdict/**kwargs
- domains routes: shared form parsing and partial rendering helpers

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-25 15:03:59 -05:00
3429bce8d0 let domains author their own pass-2 estimator as formulas, not Python
Pass 2 previously only knew one estimator: a hardcoded physics model that
matches dimensions literally named platform/actuator/energy_storage. Any
domain outside that shape (e.g. archery) got all-zero estimates and failed
every combo. Domains can now declare free variables and per-metric formulas
as data instead; a safe AST-based evaluator (engine/formula.py, no eval())
resolves declared entity properties via dep(key, constraint_type) and
generalizes the existing hand-nested mass-budget search into an N-variable
recursive optimizer. Fully additive -- the legacy platform/actuator/
energy_storage path is untouched and still runs unchanged for every domain
that declares no formulas.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-16 21:28:15 -05:00
fc5b3cd795 we do a little exporting 2026-03-04 17:49:26 -06:00