Skip to content

Solvers Overview ​

WaSHI is designed around a pluggable, decoupled solver architecture. You formulate mathematical models using a unified algebraic API, then solve them with the engine best suited for your problem class.


⚡ Solvers Matrix & Comparison ​

SolverEngine LicenseProblem ClassesBest ForStatus in WaSHI
HiGHSMITLP, MIP, Convex QPIndustrial-scale optimization, operations research, financeBuilt-in default (zero configuration)
Z3MITSMT, SAT, Logic, MIPPropositional logic, conflict diagnosis (unsatCore), rule enginesOptional plugin (@ohtaman/washi/solvers/z3)
GLPKGPL-3.0LP, MIPAcademic benchmarks, legacy GLPK compatibilityOptional plugin (@ohtaman/washi/solvers/glpk)
MockMITAnyUltra-fast unit testing in CI without loading WebAssemblyBuilt-in

Selecting a Solver ​

Specify the solver by name when creating your Model:

typescript
// 1. Built-in HiGHS (default)
const m1 = new Model({ solver: "highs" });

// 2. Z3 SMT solver
import "@ohtaman/washi/solvers/z3";
const m2 = new Model({ solver: "z3" });

// 3. GLPK solver
import "@ohtaman/washi/solvers/glpk";
const m3 = new Model({ solver: "glpk" });

Solver Guides ​

  • HiGHS Guide: Web Worker multithreading, MIP tolerances, and QP solving.
  • Z3 Guide: SMT assertions, logic modeling, and Unsat Core analysis.
  • GLPK Guide: GLPK adapter, GPL-3.0 licensing considerations, and browser usage.
  • Custom Solvers: Step-by-step developer tutorial for integrating proprietary or cloud REST solvers.

Released under the MIT License.