0.7.2 • Published 7 months ago

highs-solver v0.7.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 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.7.2

7 months ago

0.6.6

1 year ago

0.6.5

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

2 years ago

0.5.10

2 years ago

0.5.11

2 years ago

0.5.8

2 years ago

0.5.7

2 years ago

0.5.9

2 years ago

0.5.14

2 years ago

0.5.13

2 years ago

0.5.6

2 years ago

0.5.4

2 years ago

0.5.3

2 years ago

0.5.5

2 years ago

0.5.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.3.0

2 years ago

0.4.5

2 years ago

0.4.4

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.13

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago