Skip to main content

Module optimize

Module optimize 

Source
Expand description

SRD-86 — the optimizer service boundary: the Optimizer/Objective contract + registry the phase-execution driver uses, defined here in the core with no dependency on any algorithm crate. Public so algorithm crates (e.g. nmbrs-optimizers) can register against it and the CLI can discover. SRD-86 — the optimizer seam on the runtime side.

The contract (the [Optimizer] / [Objective] traits, the search-space types, the registry) lives in [contract] — defined in the core with no dependency on any optimizer-algorithm crate. Algorithm crates (e.g. nmbrs-optimizers) register implementations via inventory and are discovered through [contract::by_name] / [contract::describe] at link time; the core never names them.

The live optimizer integration is owned by the executor (crate::executor): dispatch_optimization builds the search space from a phase’s for_each comprehension and drives the chosen optimizer, actuating each axis by its changeover class —

  • Coordinate / Fixture → phase-rerun: the adaptive loop runs the phase once per proposed coordinate (CoordEval::Enumerated looks a discrete coordinate up in the grid; CoordEval::Synthesized binds a sampled continuous coordinate);
  • Control → the in-phase servoing daemon ([servo]), tokio::join!’d with one continuous phase, live-retargeting the SRD-23 control per setting;
  • mixed → the hybrid (run_hybrid_search): coordinate axes form the outer rerun grid, control axes servo interior to each cell.

Settling a windowed objective per evaluation is [settle], driven by the cadence-pulse [phase_pulse] callback. This module proper is the contract re-export surface over those submodules.

Re-exports§

pub use contract::Axis;
pub use contract::AxisImpact;
pub use contract::AxisKind;
pub use contract::AxisValue;
pub use contract::Budget;
pub use contract::Changeover;
pub use contract::Coord;
pub use contract::CoordinateSource;
pub use contract::FeedbackSource;
pub use contract::LexSource;
pub use contract::Objective;
pub use contract::Observation;
pub use contract::Optimizer;
pub use contract::OptimizerInfo;
pub use contract::OptimizerParams;
pub use contract::OptimizerRegistration;
pub use contract::PullOnly;
pub use contract::PullSource;
pub use contract::Report;
pub use contract::SearchSpace;
pub use contract::StopReason;
pub use contract::SweepOptimizer;
pub use contract::by_name;
pub use contract::describe;
pub use contract::registered_names;

Modules§

contract
SRD-86 — the core optimizer contract.
phase_pulse
SRD-86 §“Settling” — a cadence-pulse phase evaluator.
servo
SRD-86 §4–§6 — the Control-class actuation daemon.
settle
SRD-86 §“Settling via the cadence pulse” — the per-pulse settle interpreter and its PulseEvaluator adapter.