Releases: JWally/jsLPSolver
Releases · JWally/jsLPSolver
v1.0.3
Fixed
- Unrestricted variables with Big-M report false infeasibility - Phase 1 of the simplex incorrectly treated negative-valued unrestricted basic variables as infeasibility violations, causing models with
unrestrictedvariables and Big-M constraints (e.g., absolute value formulations|x| >= C) to returnfeasible: falseor find suboptimal solutions. (#130) - Solver hangs on degenerate LPs - Both phases of the simplex could cycle indefinitely on problems with many redundant bound constraints. Phase 1 now detects non-convergence and falls back to Bland's rule with lazy matrix save/restore; phase 2 detects stalled objectives and terminates degenerate cycling. (#112)
- Variable-name objectives return zero - When
optimizenames a variable directly (e.g.,optimize: "x") rather than a coefficient attribute, the solver now correctly assigns an implicit cost of 1 to that variable. (#121)
Performance
- B&B node pruning - Branch-and-bound now prunes nodes whose LP relaxation bound equals the best known integer solution, avoiding unnecessary LP re-solves on provably non-improving nodes. (#90)
v1.0.2 - Dead code cleanup and quality tooling
What's Changed
Internal cleanup release — no public API changes.
- Remove ~1,600 lines of dead code (sparse simplex, unused pseudo-cost functions, orphaned shim, unused exports)
- Add quality tooling: dependency-cruiser (circular dep detection), knip (dead code detection), eslint complexity budgets
- Fix pre-commit hook to not block on warn-level lint rules
- Fix
GeneratedProblemtype mismatch in benchmark script - Update benchmark table with fresh 10-run averages
- Coverage up from 76% → 82% (dead code removed from denominator)
Full Changelog: v1.0.1...v1.0.2
v1.0.0 - TypeScript Rewrite
🎉 javascript-lp-solver 1.0.0
This is a major release marking the library as production ready after a complete TypeScript rewrite.
Breaking Changes
- Full TypeScript rewrite - The library is now written in TypeScript with full type definitions included
- Build system changed - Migrated from Grunt to Rollup for modern ESM/CJS dual packaging
- Minimum Node.js version - Now requires Node.js 16+ (for ESM support)
Added
- Full TypeScript type definitions (
dist/index.d.ts) - ESM module support (
dist/index.mjs) alongside CommonJS (dist/index.cjs) - Browser-specific bundle (
dist/index.browser.mjs) - Presolve module - Automatic problem simplification before solving
- Enhanced branch-and-cut - New solver options for MIP problems:
useMIRCuts- Mixed Integer Rounding cutsuseGomoryCuts- Gomory fractional cutspresolve- Enable/disable preprocessingtimeout- Time limit for solvingtolerance- Optimality gap tolerance
- Solver options API - Configure solver behavior via options object
- Vitest test suite with coverage reporting
- Security documentation (SECURITY.md)
- Input validation with warnings for common typos
Performance
- ~2-5x faster on large MIP problems due to:
- Flat array matrix storage
- Partial pricing in simplex
- Presolve reductions
- Sparse-aware pivot operations
Install
```bash
npm install javascript-lp-solver
```
See CHANGELOG.md for full details.
fixes and speed enhancements
0.4.16 added web-versions