New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

highs-solver

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highs-solver

Node.js binding for the HiGHS optimization solver

latest
Source
npmnpm
Version
0.10.3
Version published
Weekly downloads
92
135.9%
Maintainers
1
Weekly downloads
 
Created
Source

HiGHS solver NPM version

Node.js binding for the HiGHS optimization solver.

Features

  • Native solver performance, equivalent to running the C++ HiGHS executable directly
  • Non-blocking solves, optionally emitting progress updates (optimality gap, LP iterations, ...)
  • Performance boosters: warm start, live objective and constraint updates, ...

Installation

npm i highs-solver

If your system's architecture doesn't match one of the prebuilt addons, the addon will be built automatically during installation. This requires a compatible toolchain, refer to the corresponding installation steps for details.

Examples

import * as highs from 'highs-solver';

Solve LP file

const solution = await highs.solve('my-model.lp', {
  options: {time_limit: 30, mip_rel_gap: 0.05, /* ... */},
  style: highs.SolutionStyle.PRETTY,
});

All file formats (.lp, .mps, ...) and options supported by HiGHS may be passed in.

Monitor solving progress

const solution = await highs.solve('my-large-model.mps', {
  monitor: highs.solveMonitor().on('progress', (prog) => {
    // Called each time the solver emits a progress notification.
    console.log(prog);
  }),
  // Other options...
});

The monitor's 'progress' event includes information such as optimality gap, number of LP iterations, ...

Warm start

const solver = highs.Solver.create();
solver.setModel(/* Model instance */);
solver.warmStart({primalColumns: new Float64Array(/* Starting point */)});
await solver.solve();
const solution = solver.getSolution();

Models set from a file can be warmstarted similarly.

Keywords

highs

FAQs

Package last updated on 07 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts