Skip to content

Commit

Permalink
Update HiGHS to its latest version
Browse files Browse the repository at this point in the history
Fixes #10
  • Loading branch information
lovasoa committed Jan 22, 2022
1 parent 77bbabd commit 8edbeb7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HiGHS
Submodule HiGHS updated 259 files
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![package size](https://badgen.net/bundlephobia/minzip/highs)](https://bundlephobia.com/result?p=highs)

This is a javascript mixed integer linear programming library.
It is built by compiling [HiGHS](https://highs.dev) to WebAssembly using emscripten.
It is built by compiling a high-performance C++ solver developed by the University of Edinburgh, (HiGHS)[HiGHS](https://highs.dev), to WebAssembly using emscripten.

## Demo

Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "highs",
"version": "0.4.7",
"description": "This is a javascript mixed integer linear programming library. It is built by compiling HiGHS to WebAssembly using emscripten.",
"version": "0.5.0",
"description": "Mixed integer linear programming library, built by compiling a high-performance C++ solver developed by the University of Edinburgh (HiGHS) to WebAssembly.",
"main": "build/highs.js",
"types": "types.d.ts",
"directories": {
Expand Down
10 changes: 9 additions & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const SOLUTION = {
},
{
Index: 2,
Status: 'FX',
Status: 'UB',
Lower: 0,
Upper: 0,
Primal: 0,
Expand Down Expand Up @@ -211,6 +211,13 @@ function test_big(Module) {
Module.solve(pb);
}

function test_many_solves(Module) {
// See https://github.com/lovasoa/highs-js/issues/10
for (let i = 0; i < 5000; i++) {
Module.solve(`Maximize a subject to a <= 1`);
}
}

async function test() {
const Module = await highs();
test_optimal(Module);
Expand All @@ -220,6 +227,7 @@ async function test() {
test_infeasible(Module);
test_unbounded(Module);
test_big(Module);
test_many_solves(Module);
console.log("test succeeded");
}

Expand Down

0 comments on commit 8edbeb7

Please sign in to comment.