feat(solver): Phase 4 — second solver plugin (API validation) #290
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement a second solver plugin to validate that the
IKCSolverAPI genuinely supports different solving strategies.Scope
Pure-Python solver implementation
kcsolve.IKCSolver(the abstract base class from Phase 2)name(),supported_joints(),solve(ctx)kcsolve.register_solver("relaxation", RelaxationSolver)SolveContext(parts withTransformplacements, constraints with marker-based attachment points)API validation
SolverRegistryhandles multiple solvers:kcsolve.available()returns both"ondsel"and the new solverSolveContextsolves with either solver, results match within tolerancekcsolve.load("relaxation")andkcsolve.load("ondsel")return independent instancesjoints_for()returns different capability sets per solverset_default()/get_default()work correctly with multiple solversBenchmarking
SolveResult.placementsbetween OndselAdapter and the new solver within tolerancesolve()wall time on representative assembliesSolveResult.dofandSolveResult.diagnosticsparitySolver capabilities
The new solver need not support all 20 joint types that OndselAdapter handles. A minimal subset (e.g.
Fixed,Revolute,Coincident,Slider) is sufficient to validate the multi-solver architecture.Example
Deliverable
Two interchangeable solvers, selectable per-assembly via
SolverRegistry.Dependencies
References
docs/INTER_SOLVER.md§6.3 — pure-Python solver supportdocs/INTER_SOLVER.md§9 — Phase 4docs/src/reference/kcsolve-python.md— full Python API reference