Deterministic-first scheduling engine for MO-FJSP-SDST-ARC production planning.
Language: EN | RU
SynAPS is for teams that need not just a schedule, but an explainable and reproducible schedule.
- Explicit solver portfolio with named configurations
- Machine-readable solver portfolio manifest via CLI (
python -m synaps list-solver-configs) - Deterministic routing and auditable metadata
- Independent feasibility validation surface
- Reproducible benchmark harness (including a dedicated 50K study)
In many planning stacks, the hardest production question is not "what did we schedule?" but "why this exact decision?".
SynAPS takes a white-box approach:
- known solver config
- known parameters (including seed where applicable)
- known constraints and validation path
- known artifact saved to disk
What is implemented and verified in this repository:
- 23 public solver configurations in the registry (
available_solver_configs()) - Python requirement:
>=3.12(pyproject.toml) - Core runtime dependencies:
ortools,highspy,pydantic,numpy - Stable solve/repair JSON contracts (
synaps/contracts.py) - End-to-end contract examples (
schema/contracts/examples/) - Dedicated reproducible 50K compare rail plus a staged 500K study harness (
benchmark/study_rhc_50k.py,benchmark/study_rhc_500k.py) - The staged 500K harness now includes scale-aware ALNS pre-search guard scaling and an optional bounded
max_windows_overridefor 100K+ academic runs - Separate feasibility checker (
synaps/solvers/feasibility_checker.py) - ALNS can accept partial warm starts, complete missing assignments, and recompute setups before local search
- ALNS now rejects infeasible full seeds and reanchored warm starts before local search, so final recovery cannot silently fall back to an invalid initial baseline
- RHC can carry unfinished overlap tails into the next ALNS window and exposes warm-start metadata in solver output
- Post-audit RHC hardening adds full-frontier fallback for underfilled admission windows (
admission_full_scan_*metadata) - Post-audit RHC hardening also auto-scales ALNS repair budget per window (
alns_effective_repair_time_limit_stelemetry) - RHC now treats
time_limit_exhausted_before_search && iterations_completed == 0on the ALNS lane as an explicit fallback condition (inner_time_limit_exhausted_before_search) instead of accepting a zero-search inner result - RHC now records
budget_guard_skipped_initial_searchwhen oversized ALNS windows are short-circuited into explicit fallback rather than burning the whole window budget in phase-1 seed generation - RHC candidate scoring is wired through the NumPy/native batch seam when acceleration is available
- Typed RHC policy presets (
RhcPolicy,RhcPolicySpec) replace the 120-line duplicated kwargs literal in the solver registry; backward-compatible legacy-kwargs path emitsDeprecationWarning - Cross-window variable fixing (L-RHO) detects stable operation signatures between consecutive windows and feeds them as
fixed_op_idsinto the ALNS inner solver - May 2026 50K solver improvement (Stages A–E):
- 2 new ALNS destroy operators:
critical_path(DAG longest-path bottleneck removal) anddue_pressure(weighted-tardiness order-tail removal) - Incremental objective evaluation via
_MachineObjectiveCache— recomputes only affected machines per iteration - ALNS convergence diagnostics: bounded iteration trace (
max_iteration_records=500), aggregate metadata (stagnation detection, operator attempt/improvement counts, final weights by name) - RHC warm-start formalization:
WarmStartSelectiondataclass with rejection telemetry (not_in_active_window,frozen_committed,boundary_conflict) - Operator weight persistence by name (dict-keyed, robust to
DESTROY_OPERATORSreordering) - Cross-window quality telemetry:
WindowQualitySummarybuffer (maxlen=5) with feature-flagged operator bias (max 15% bounded boost) - Native SDST batch lookup (
NativeSdstBatchLookupvia PyO3) and native destroy worst scoring (compute_destroy_worst_scoresvia rayon) - Lower-bound soundness fix (removed invalid
max(1.0, ...)clamp incompute_relaxed_makespan_lower_bound) - Benchmark quality gate:
inter_seed_cv_makespan,high_varianceflag,inner_fallback_ratiothreshold validation RhcPolicy.FAST_50Kpreset: 240 min windows, 600 ops/window, 60s ALNS cap, adaptive iteration scaling, warm-start skip (gap < 3%)- Fixed pre-existing timezone bug in
_detect_cross_window_stable_ops
- 2 new ALNS destroy operators:
- Auxiliary-resource pool lower bound (
_compute_auxiliary_resource_lb) is verified by dedicated regression tests (tests/test_lower_bounds_arc.py) - LBBD solvers now emit symmetric
ub_evolutionalongsidelb_evolutionin solver metadata - Release-date admission frontier (
op_earliest) is tested for correct window-boundary blocking (tests/test_rhc_admission_module.py) - Property-based budget predicate tests (
tests/test_rhc_budget_property.py) validate monotonicity, non-negativity, and cap-reduction invariants of the ALNS inner-window budget scaler via Hypothesis - The TypeScript control-plane validates JSON contracts, executes the real Python kernel for solve/repair, and CI bootstraps the Python runtime before
control-planeintegration tests - Pinned GitHub Actions security workflows cover Python, TypeScript, and Rust surfaces via CodeQL, and publish OSSF Scorecards SARIF results
What is not claimed:
- full industrial validation on a live factory
- guaranteed full feasible 50K solve within the current study timeboxes
May 2026 audit re-verification:
- current audit status is tracked in
AUDIT_VERIFICATION_2026_05_01.md - that pass confirmed several stale findings were already closed on current
master, and only the still-live defects were changed: heuristic-only ML advisory can no longer override deterministic routing, public verification is exhaustive, and LBBD / LBBD-HD setup lower bounds are now sequence-safe
Canonical artifacts:
benchmark/studies/2026-04-13-rhc-50k-machine-index/rhc_50k_study.json- Pre-fix live stress artifact:
benchmark/studies/test-50k-academic-matrix-v1/rhc_50k_study.json - Retired guarded-profile artifact:
benchmark/studies/2026-04-26-rhc-alns-postfix-canonical-v4/rhc_50k_study.json - Current-head audit before the profile refresh:
benchmark/studies/2026-04-27-rhc-50k-audit-v1/rhc_50k_study.json - Current-head audit after the profile refresh (pure-Python anchor):
benchmark/studies/2026-04-27-rhc-50k-audit-v2-current-head/rhc_50k_study.json - Fresh post-critical-fixes rerun on pushed
master:benchmark/studies/2026-05-01-rhc-50k-audit-v3-post-critical-fixes/rhc_50k_study.json
Summary from the fresh post-critical-fixes rerun on pushed master:
| Solver | Wall time (s) | Feasibility rate | Mean scheduled ratio | Mean makespan (min) | Mean inner fallback ratio |
|---|---|---|---|---|---|
RHC-GREEDY |
600.514 | 0.0 | 0.4184 | 13622.18 | 0.0 |
RHC-ALNS |
1329.576 | 0.0 | 0.1374 | 4295.25 | 0.3333 |
Interpretation:
- This is still a profiling/evidence slice, not a "50K solved" claim.
- The pre-fix stress matrix remains the honest evidence surface for the old ALNS failure shape, where coverage stayed weak but some windows did enter search.
- The 2026-04-26 guarded artifact captured a second regime, where oversized windows were short-circuited before expensive seed generation could burn the full window budget.
- The 2026-04-27
v1audit established a third regime and corrected the old blanket claim that ALNS "never enters search": the early windows do enter ALNS, but windows 2-3 spend 100 repair attempts on zero-yield CP-SAT micro-repair, and later windows fall back or time out under hybrid CP-SAT routing. - The fresh 2026-05-01
v3rerun is now the latest operational current-head evidence, but it is not a clean algorithm-only delta againstv2:v3ran withnative_acceleration_rate = 1.0, while the 2026-04-27v2anchor ran atnative_acceleration_rate = 0.0. - Even with that caveat, the fresh rerun changes the practical 50K picture:
RHC-GREEDYcoverage rises from0.3563to0.4184,RHC-ALNScoverage rises from0.0845to0.1374, andRHC-ALNScuts its inner fallback ratio from0.6667to0.3333, but the run remains partial and ALNS still spends large time in seed construction (mean_initial_solution_ms = 131959.44,max_initial_solution_ms = 320413). - The
v1and 2026-04-26 artifacts should now be read as failure evidence for the retired CP-SAT-heavy profile, whilev2remains the pure-Python comparison anchor andv3is the native-backed current operational anchor. - For partial RHC outputs (
status=errorwithops_scheduled < ops_total), treatlower_bound_upper_bound_comparableas the gate for bound interpretation: current code reportsgap = nullwhen only a committed subset is scheduled, and rawlower_bound/upper_boundvalues are not directly comparable in that regime.
Key comparison points:
- Pre-fix
RHC-ALNS|throughputintest-50k-academic-matrix-v1reportedmean_scheduled_ratio = 0.0946,mean_makespan_minutes = 4985.85, andmean_inner_fallback_ratio = 0.1. - Guarded-profile
RHC-ALNS|throughputin2026-04-26-rhc-alns-postfix-canonical-v4reportsmean_scheduled_ratio = 0.3028,mean_makespan_minutes = 9675.18, andmean_inner_fallback_ratio = 1.0. - Current-head-before-refresh
RHC-ALNS|throughputin2026-04-27-rhc-50k-audit-v1reportsmean_scheduled_ratio = 0.1243,mean_makespan_minutes = 4134.84, andmean_inner_fallback_ratio = 0.625. - Current-head-after-refresh
RHC-ALNS|throughputin2026-04-27-rhc-50k-audit-v2-current-headreportsmean_scheduled_ratio = 0.0845,mean_makespan_minutes = 3059.82, andmean_inner_fallback_ratio = 0.6667. - Fresh post-critical-fixes
RHC-ALNS|throughputin2026-05-01-rhc-50k-audit-v3-post-critical-fixesreportsmean_scheduled_ratio = 0.1374,mean_makespan_minutes = 4295.25,mean_inner_fallback_ratio = 0.3333,search_active_window_rate = 0.6667, andnative_acceleration_rate = 1.0. - Fresh post-critical-fixes
RHC-GREEDY|throughputin2026-05-01-rhc-50k-audit-v3-post-critical-fixesreportsmean_scheduled_ratio = 0.4184,mean_makespan_minutes = 13622.18, andnative_acceleration_rate = 1.0. - May 2026 improvement session (
benchmark/studies/2026-05-12-quick-evidence): After Stages A–E implementation (7 new destroy operators, incremental evaluation, native scoring, cross-window learning, operator weight persistence),RHC-GREEDYschedules0.3551ratio in600.9s,RHC-ALNSschedules0.3871ratio in1201.1s. Both still hit time limits. Key finding:inner_fallback_ratio = 1.0on ALNS — initial seed generation in Python consumes the entire per-window budget, preventing ALNS iterations from running. Next priority: native greedy repair (Task 20). - The unresolved research problem is now split in two: the fresh 50K rerun improved coverage under a native-backed environment but did not reach feasibility, while
100k+has now recovered stable bounded fallback parity but still lacks productive active-search yield.
Current 100K+ status is a staged research surface, not a production-readiness claim.
What is now implemented and verified:
benchmark.study_rhc_500khas a scale ladder (50k -> 100k -> 200k -> 300k -> 500k)- resource projection and gated execution are active
- bounded staged
100kruns keep the validatedalns_presearch_max_window_ops=1000/alns_presearch_min_time_limit_s=240.0guard envelope while using the namedRHC-ALNS-100Kgeometry - a bounded academic run can be forced with
--max-windows-overridefor reproducible 100K+ evidence slices
What the latest audit established:
200kis still within the current public model operation limit300kand500kare presently blocked byoperations_exceed_model_limit, not by projected RAM pressure- The bounded 2026-04-27
100kaudit on the retired CP-SAT-heavy profile showedRHC-GREEDYscheduling8144/100000operations in90.226s, whileRHC-ALNSscheduled0/100000operations and spent400518 msin initial solution generation before the first ALNS iteration. - That 100K result is why the public
RHC-ALNSdefaults now disable hybrid CP-SAT routing and CP-SAT micro-repair, but it also shows that a deeper initial-seed bottleneck remains unresolved above the retired profile. - A second bounded 2026-04-27
100kslice on the staged geometry-refresh harness (300/90instead of the retired480/120first-window geometry for100k+) reachedALNS starting, completed55iterations with43improvements and0inner fallback, and finished at4678/100000scheduled operations in90.118s. - That geometry-refresh evidence is now promoted into the public portfolio as the named runtime profile
RHC-ALNS-100K, so the300/90search-entry geometry is no longer trapped inside the staged harness. - The fresh same-run current-head comparison in
benchmark/studies/2026-04-27-rhc-100k-audit-v4-current-head/rhc_500k_study.jsonkeeps that search-entry result but puts it against a same-run baseline:RHC-GREEDYschedules7852/100000operations in90.213s, whileRHC-ALNSschedules3420/100000in90.113safter entering search in both bounded windows (56and30iterations,45and18improvements,0CP-SAT repairs,0inner fallback). - The fresh post-critical-fixes bounded rerun on pushed
masterinbenchmark/studies/2026-05-01-rhc-100k-audit-v5-post-critical-fixes/rhc_500k_study.jsonshifts the picture again:RHC-GREEDYimproves to9287/100000scheduled operations in90.282s, butRHC-ALNSregresses to0/100000scheduled operations in445.213s, ends after one window, skips fallback repair, and reportssolver_metadata.error = "no assignments produced". - That fresh
v5comparison is also environment-shifted: the 2026-04-27v4anchor ran pure-Python backends, while the 2026-05-01v5rerun usedsynaps_nativeacross the candidate and capacity path. - The staged
v7guard-restoration rerun (benchmark/studies/2026-05-01-rhc-100k-audit-v7-post-guard-harness-fix/rhc_500k_study.json) closed the catastrophic0/100000collapse by skipping oversized ALNS pre-search windows and falling back safely to greedy, but it still left the bounded rail fallback-only. - The staged
v8predicate-follow-up rerun (benchmark/studies/2026-05-01-rhc-100k-audit-v8-post-predicate-fix/rhc_500k_study.json) proved thatR1really re-opened ALNS entry on the1501-operation bounded window, but it also exposed the next controlling bottleneck: initial solution generation consumed about808843 ms, completed0search iterations, and regressed back to0/100000scheduled operations. - The fresh bounded rerun in
benchmark/studies/2026-05-08-rhc-100k-audit-v11-post-bounded-seed-cap/rhc_500k_study.jsoncloses that deeper initial-seed stall family on currentmaster:RHC-ALNSnow schedules7236/100000operations in90.255s, while same-runRHC-GREEDYschedules7230/100000in90.365s, withwindows_observed = 2,fallback_repair_skipped = false, and nosolver_metadata.error. - That
v11artifact does not yet establish productive active ALNS search at100k:search_active_window_rateis still0.0andinner_fallback_ratioremains1.0. It does, however, close the bounded-stability acceptance gate that previously blocked the next algorithm wave. - So the next hard engineering boundary is split: model/schema capacity still blocks
300kand500k, while100kand200know need active-search yield improvement and simpler admission/seed policies rather than catastrophic-stall containment or heavier CP-SAT side paths.
Main families:
- Exact / near-exact: CP-SAT, LBBD, LBBD-HD
- Constructive: Greedy ATCS, Beam
- Trade-off slices: epsilon/Pareto CP-SAT profiles
- Large-scale paths: ALNS, RHC with overlap-tail propagation and optional native batch scoring
- Repair: IncrementalRepair
- Validation: FeasibilityChecker
Authoritative registry:
synaps/solvers/registry.py
Routing policy:
synaps/solvers/router.py
Parts of the portfolio are stochastic by design and accept seeds.
For CP-SAT (OR-Tools), be explicit:
num_workers > 1can reduce bit-for-bit repeatability across runs/machines- for stricter reproducibility, pin
random_seedand use single-thread mode (num_workers = 1) - the strict benchmark lane also disables variability-oriented CP-SAT knobs (
randomize_search,permute_variable_randomly,permute_presolve_constraint_order,use_absl_random) and records the effective SatParameters snapshot in solver metadata for replay/audit
git clone https://github.com/KonkovDV/SynAPS.git
cd SynAPS
python -m pip install -e ".[dev]"Run a tiny example:
python -m synaps solve benchmark/instances/tiny_3x3.jsonCompare solvers on a benchmark instance:
python -m benchmark.run_benchmark benchmark/instances/tiny_3x3.json \
--solvers GREED CPSAT-30 --compareExport the public solver portfolio for external control-plane/UI integration:
python -m synaps list-solver-configsRun the dedicated 50K study:
python -m benchmark.study_rhc_50k \
--preset industrial-50k \
--seeds 1 \
--solvers RHC-GREEDY RHC-ALNS \
--write-dir benchmark/studies/_local-rhc-50kRun the named max-push 50K profile (aggressive ALNS budget + RHC-ALNS-REFINE default set):
python -m benchmark.study_rhc_50k \
--preset industrial-50k \
--seeds 1 \
--study-profile max-push-50k \
--write-dir benchmark/studies/_local-rhc-50k-maxRun a bounded 100K ALNS audit slice:
python -m benchmark.study_rhc_500k \
--execution-mode gated \
--scales 100000 \
--solvers RHC-ALNS \
--lane throughput \
--seeds 1 \
--time-limit-cap-s 90 \
--max-windows-override 2 \
--write-dir benchmark/studies/_local-rhc-100kRun tests:
python -m pytest tests -qRun the strict type check used in CI:
python -m mypy synaps --strict --no-error-summaryRun the TypeScript control-plane boundary tests:
cd control-plane
npm install
npm testThe control-plane package shells out to python -m synaps, so keep the repository
Python package installed in the active interpreter first (python -m pip install -e ".[dev]").
SynAPS includes an optional Rust-based acceleration kernel (synaps_native v0.3.0) for hot-path scheduling computations via PyO3.
Profiled target hardware: Intel 12th–14th Gen (Raptor Lake) hybrid P/E architectures with AVX2+FMA3. AVX-512 is not used on this profiled path because it is hardware-disabled on hybrid CPUs.
Implemented optimizations (v0.3.0):
| Optimization | Mechanism | Expected Impact |
|---|---|---|
| Branchless scoring | cmov/blend instead of branch for overdue boost |
5–15% (eliminates ~50% misprediction rate) |
| Hybrid-aware parallelism | Rayon with_min_len(256) for P/E core work-stealing |
10–25% (prevents E-core straggler effect) |
| Zero-copy NumPy + CSR | Direct buffer writes, no intermediate allocations | 2–3× over Vec path |
| target-cpu=native | LLVM AVX2/FMA3 auto-vectorization | 10–40% (depends on loop structure) |
| fast_exp (Schraudolph) | IEEE-754 bit trick with residual correction, clamp, and endian guard | Free vs libm::exp() while preserving close-score ordering |
The kernel is optional — SynAPS falls back to pure Python when not available.
These optimization notes describe the profiled Raptor Lake workstation, not a universal ISA ceiling for every future SynAPS deployment. On AVX-512-capable non-hybrid servers, a separate runtime-dispatch or wheel-split strategy remains possible in principle; the current repository ships and benchmarks the AVX2/FMA3 path only.
Recent native hardening also covers finite behavior on extreme slack inputs and a regression test for very close positive slack values, so the installed native path keeps candidate pressures strictly ordered where the earlier bucketed approximation could collapse ties.
Build the native extension:
cd native/synaps_native
maturin develop --releaseConfirm that the active runtime sees the native backend and then measure the large-candidate speedup surface:
python -c "from synaps import accelerators; print(accelerators.get_acceleration_status())"
python -m benchmark.study_native_rhc_candidate_acceleration \
--sizes 50000,100000,500000 \
--repeats 5 \
--output benchmark/results/native-rhc-candidate-acceleration.jsonFor geometry-driven 50K admission/search studies, run the bounded DOE rail directly:
python -m benchmark.study_rhc_alns_geometry_doe \
--lane throughput \
--seeds 1 \
--max-windows 2 \
--time-limit-s 300 \
--geometries 480:120 360:90 300:90 240:60 \
--write-dir benchmark/studies/_local-geo-doeSee: HPC Silicon-Level Optimization Roadmap
synaps/solvers/- solver implementations and registrysynaps/solvers/rhc/- Receding Horizon Control subpackage (R7 structural decomposition complete:_state.pytyped window state,_metadata.pytelemetry builders,_admission.pycandidate-frontier kernels,_budget.pyper-window budget arithmetic,_window.pycommit/reanchor/backtrack/stabilize kernels;_solver.pyis the orchestrating main loop)synaps/model.py- core Pydantic modelssynaps/contracts.py- stable JSON contractsschema/contracts/examples/- solve/repair example payloads for integration smoke testssynaps/problem_profile.py- instance profilingsynaps/validation.py- solve-result verification pathbenchmark/- benchmark harness and studiescontrol-plane/- minimal TypeScript BFF over the checked-in solve/repair contractstests/- test suitedocs/- architecture, audits, publication drafts
- Habr draft (RU):
docs/habr/synaps-open-source-habr-v7.md - Publication pack:
docs/habr/synaps-open-source-habr-v7-pack.md - Benchmark guide:
benchmark/README.md - Post-audit implementation note:
docs/audit/SYNAPS_UPDATE_AUDIT_2026_04_25.md - HPC optimization roadmap:
docs/architecture/08_HPC_SILICON_OPTIMIZATION_ROADMAP.md - Reproducibility and robustness protocol:
docs/architecture/06_BENCHMARK_REPRODUCIBILITY_AND_ROBUSTNESS.md - Contributing:
CONTRIBUTING.md - Security policy:
SECURITY.md
This README distinguishes verified repository evidence from future intent.
- Verified claims are tied to executable artifacts, checked-in contracts, benchmark outputs, or CI-visible checks.
- Planned items are explicitly labeled as roadmap work and are not presented as delivered capabilities.
- Performance numbers are context-bound to the referenced artifact and hardware profile, not universal guarantees.
Use this minimal protocol when validating or citing results:
python -m pip install -e ".[dev]"
python -m pytest tests -q
python -m mypy synaps --strict --no-error-summary
python -m synaps list-solver-configsFor benchmark claims, publish the exact command line, seed list, solver profile, and resulting JSON artifact path under benchmark/studies/.
- Preferred citation metadata:
CITATION.cff - If citing benchmark outcomes, include repository URL, commit SHA, artifact path, and execution date.
- When comparing against external methods, report both feasibility and wall-time boundaries to avoid selective reporting.
SUPPORT.mdCONTRIBUTING.mdSECURITY.mdMAINTAINERS.mdRELEASE_POLICY.mdCITATION.cff
MIT. See LICENSE.