Skip to content

feat: implement solver registry architecture core#225

Merged
pesap merged 65 commits into
mainfrom
solver-registry-redesign
May 9, 2026
Merged

feat: implement solver registry architecture core#225
pesap merged 65 commits into
mainfrom
solver-registry-redesign

Conversation

@pesap
Copy link
Copy Markdown
Collaborator

@pesap pesap commented May 2, 2026

Summary

  • implement core solver registry architecture in arco-solver (families, profiles, selection resolution, preflight, transport model)
  • migrate CLI solver config to versioned TOML with layered profile merge and exact selection persistence
  • add first-class Python SolverSelection/SolverProfile types and run registry preflight before solve
  • add umbrella ADR docs/adr/0002-solver-registry-architecture.md and update solver configuration docs

Validation

  • cargo check -p arco-solver
  • cargo check -p arco-cli
  • cargo check -p arco-python
  • cargo test -p arco-solver
  • cargo test -p arco-cli config::tests
  • cargo clippy -p arco-solver -p arco-cli --all-targets -- -D warnings
  • cargo fmt

Notes

  • legacy solver.json migration is intentionally disabled per ADR/context decisions
  • full workspace check requires Xpress SDK (XPRESSDIR) in this environment

pesap added 19 commits May 2, 2026 12:34
Result: {"status":"keep","quality":6403,"unresolved":1692,"import_edges":214}
Result: {"status":"keep","quality":6408,"unresolved":1693,"import_edges":214}
…cle hotspot (retry commit)

Result: {"status":"keep","quality":7376,"unresolved":1691,"import_edges":206}
Result: {"status":"keep","quality":7377,"unresolved":1709,"import_edges":208}
… via crate reexports

Result: {"status":"keep","quality":7381,"unresolved":1709,"import_edges":207}
…e seam

Result: {"status":"keep","quality":7385,"unresolved":1708,"import_edges":206}
…/parsing helpers

Result: {"status":"keep","quality":7390,"unresolved":1708,"import_edges":206}
…e max_cc hotspot

Result: {"status":"keep","quality":7398,"unresolved":1710,"import_edges":206}
…lear final max_cc hotspot (retry commit)

Result: {"status":"keep","quality":7404,"unresolved":1710,"import_edges":206}
…validate to local report types

Result: {"status":"keep","quality":7407,"unresolved":1710,"import_edges":205}
…ts away from compile/mod

Result: {"status":"keep","quality":7421,"unresolved":1717,"import_edges":202}
…s for export/scip/debug_shell

Result: {"status":"keep","quality":7407,"unresolved":1710,"import_edges":205}
…compile-type imports

Result: {"status":"keep","quality":7421,"unresolved":1717,"import_edges":202}
* fix(kdl): lower reduce projection reports

* refactor(kdl): name reduce projection lowering scope

* feat: centralize validation seam

Move canonical solve-target validation into arco-validate and delegate the operations facade to it. Reuse the shared validation crate for duplicate tuple-row diagnostic rendering so existing KDL errors keep their provenance details.

Resolves #230

* refactor: move solver target artifacts to arco-targets

Move solver-facing linear compile output types into the arco-targets crate and re-export them through existing KDL artifact seams for compatibility. Update solver/export consumers to import the shared target types directly where appropriate.

Resolves #228

* refactor: centralize solver contracts

Move solver contract coverage to arco-contracts and remove obsolete duplicate arco-solver source files so selection, capabilities, request/result, and trait contracts have a single seam. Expand arco-solver-types compatibility re-exports to cover the full contract surface.

Resolves #229

* refactor: centralize core scalar validation

Resolves #236

* refactor: move solver backend contract

Resolves #232

* feat: route export through portable IR

Resolves #233

* feat: introduce arco ops CLI facade

Resolves #231

* fix: route cli orchestration through ops facade

Resolves #234

* fix: route python solve through ops

Resolves #235

* refactor: retire transitional pass-through modules

Remove proven-unused solver-types and CLI export pass-through seams now that shared contracts, targets, and ops/export facades are in place. Update the architecture plan to mark the retired transitional modules. Include rustfmt normalization from the affected CLI surface after removing the pass-through module.

Resolves #237

* fix: satisfy clippy on architecture branch

Rewrite solver profile count branching without comparison-chain and avoid float equality in ops tests so CI clippy jobs pass with -D warnings.
@github-actions github-actions Bot added the tests label May 6, 2026
@pesap pesap merged commit fa16aa4 into main May 9, 2026
25 checks passed
@pesap pesap deleted the solver-registry-redesign branch May 9, 2026 02:44
@github-actions github-actions Bot mentioned this pull request May 1, 2026
mcllerena pushed a commit that referenced this pull request May 10, 2026
…peline

Merges origin/main (PR #225 solver registry) into ml/nlp-ipopt:
- Adopt new SolverRegistry / ModelViewBackend / OptimizationAdapter
  architecture from arco-solver and arco-ops.
- Move arco-kdl/src/compile/* contents (including nonlinear.rs from
  4891eb7) into the new arco-ops/src/compile/compile/* location.
- Re-add NonlinearProblem / NonlinearObjective / NonlinearConstraint /
  NonlinearReport / NonlinearExpr to crate::compile::compile and extend
  AlgebraicProblem in compile/targets.rs with linearized + nonlinear
  fields (with serde defaults for backwards compat).
- Port the IPOPT adapter (IpoptArcoAdapter, NonlinearIpoptProblem,
  tape AD evaluation, exact-Hessian path, status mapping, etc.) from
  the old arco-cli/src/execution.rs into arco-ops/src/execution.rs,
  gated behind feature = "ipopt".
- Wire IpoptArcoAdapter into adapter_for_selection in
  arco-ops/src/execution_backends.rs for the embedded ipopt family.
- Update arco-ops Cargo.toml to add arco-ipopt + ipopt as optional
  dependencies behind a new ipopt feature.
- Update arco-cli Cargo.toml to forward the ipopt feature to arco-ops.
- Keep arco-ipopt/src/solver.rs aligned with main (stub
  IpoptModelViewBackend) so the registry-side path stays consistent.

Validated:
- cargo check -p arco-ops -p arco-ipopt -p arco-cli --features ipopt
- cargo clippy -p arco-ops -p arco-ipopt -p arco-cli --features ipopt -- -D warnings
- arco run dc-opf-24bus-wind-load-shedding (highs)  -> OF = 432,292.56
- arco run ac-opf-24bus-wind-load-shedding (ipopt)  -> OF = 449,240.74
This was referenced May 16, 2026
This was referenced May 23, 2026
@github-actions github-actions Bot mentioned this pull request May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant