0.6.0 • Published 6 months ago

highs-solver v0.6.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

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.

0.6.0

6 months ago

0.5.10

11 months ago

0.5.11

9 months ago

0.5.8

11 months ago

0.5.7

11 months ago

0.5.9

11 months ago

0.5.14

9 months ago

0.5.13

9 months ago

0.5.6

11 months ago

0.5.4

12 months ago

0.5.3

12 months ago

0.5.5

12 months ago

0.5.0

12 months ago

0.5.2

12 months ago

0.5.1

12 months ago

0.3.0

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.1

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago