nx_build_plan_sim.nx
buildroot/runtime/nx_build_plan_sim.nx
about
nx_build_plan_sim.nx -- simulator for the multi-process build plan.
=====================================================================
CARDINAL: [[feedback-simulation-discipline-for-every-substrate]]
Second-substrate demonstration of the simulation discipline. First
stone was nx_print_sim (3d-print physics). THIS file applies the
same SimulatorState + step + sealed-enum issue framework to a
completely different substrate (multi-process schedule solver) --
proving the discipline generalizes.
Industry: there is no production cross-process build-plan
scheduler at all (humans + spreadsheets coordinate today), let
alone a simulator that predicts schedule failures.
What this simulator predicts on a SOLVED build plan:
DEADLINE_MISSED total schedule > caller-supplied deadline
POST_CURE_OVERRUN any part's post-cure > caller max
PRINTER_IDLE_WASTE one process's printer idle most of its
used window (heuristic candidate -- queued
per the cardinal's no-heuristic rule)
FIRST STONE here ships the first two (real time-arithmetic, not
heuristic). PRINTER_IDLE_WASTE deferred until we have a clearer
physical definition.
=====================================================================
license_tier: ORIGINAL
dependencies 3 imports · 1 importers
imports: nx_syscalls.nxnx_print_process.nxnx_build_plan.nx
imported by: nx_build_plan_sim_test.nx
structs
| 53 | struct NxBuildPlanSimIssue |
consts
| 36 | const NX_BUILD_SIM_ISSUE_NONE: i64 = 0 |
| 37 | const NX_BUILD_SIM_ISSUE_DEADLINE_MISSED: i64 = 1 |
| 38 | const NX_BUILD_SIM_ISSUE_POST_CURE_OVERRUN: i64 = 2 |
| 39 | const NX_BUILD_SIM_ISSUE_PRINTER_IDLE_WASTE: i64 = 3 // queued (next stone) |
| 40 | const NX_BUILD_SIM_ISSUE_N: i64 = 4 |
| 60 | const NX_BUILD_PLAN_SIM_ISSUE_BYTES: i64 = 32 |
functions
| 42 | func nx_build_sim_issue_is_valid(k: i64) -> i64 called by 1: main |
| 78 | func nx_build_plan_sim_check(plan: *NxBuildPlan, called by 1: main |