@ohtaman/washi 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +58 -19
- package/README.md +58 -19
- package/README.zh-CN.md +58 -19
- package/THIRD_PARTY_LICENSES.md +34 -1
- package/dist/browser/__vite-browser-external-rTVKos2U.js +7 -0
- package/dist/browser/browser-runtime-AG5QFtKf.js +2021 -0
- package/dist/browser/highs-worker.js +26 -11
- package/dist/browser/highs.wasm +0 -0
- package/dist/browser/{loader-DewlSho8.js → loader-i3FnqMes.js} +183 -149
- package/dist/browser/solvers/glpk.js +289 -238
- package/dist/browser/solvers/glpk.min.js +1 -1
- package/dist/browser/solvers/pumpkin-_washi-pumpkin-node-runtime-CEKUDK6d.js +9 -0
- package/dist/browser/solvers/pumpkin-loader-CvdaKxf4.js +320 -0
- package/dist/browser/solvers/pumpkin-worker.js +45 -0
- package/dist/browser/solvers/pumpkin.js +1777 -0
- package/dist/browser/solvers/pumpkin.min.js +1 -0
- package/dist/browser/solvers/pumpkin.wasm +0 -0
- package/dist/browser/solvers/pumpkin.wasm.LICENSE +21 -0
- package/dist/browser/solvers/z3.js +1600 -1335
- package/dist/browser/solvers/z3.min.js +2 -2
- package/dist/browser/washi.js +3374 -1377
- package/dist/browser/washi.min.js +5 -3
- package/dist/lib/__vite-browser-external-oLchLuMx.js +7 -0
- package/dist/lib/highs-browser-runtime.js +1846 -1618
- package/dist/lib/highs-runtime.js +16 -2
- package/dist/lib/highs-worker.js +26 -11
- package/dist/lib/highs.wasm +0 -0
- package/dist/lib/{loader-BZUQNvh4.js → loader-CDpPXN_F.js} +138 -116
- package/dist/lib/registry-dx7x4e5c.js +1694 -0
- package/dist/lib/rolldown-runtime-DtPi1Y-2.js +13 -0
- package/dist/lib/solvers/glpk.js +161 -121
- package/dist/lib/solvers/pumpkin-assets.js +1 -0
- package/dist/lib/solvers/pumpkin-loader-Ow74Fa1B.js +311 -0
- package/dist/lib/solvers/pumpkin-node-runtime.js +15 -0
- package/dist/lib/solvers/pumpkin-worker-factory.js +1 -0
- package/dist/lib/solvers/pumpkin-worker.js +45 -0
- package/dist/lib/solvers/pumpkin.js +1767 -0
- package/dist/lib/solvers/pumpkin.wasm +0 -0
- package/dist/lib/solvers/pumpkin.wasm.LICENSE +21 -0
- package/dist/lib/solvers/z3.js +486 -306
- package/dist/lib/washi.js +2563 -1154
- package/dist/types/decomposition/benders.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modeler/boolean-expr.d.ts +137 -29
- package/dist/types/modeler/boolean-expr.d.ts.map +1 -1
- package/dist/types/modeler/constraint.d.ts +40 -4
- package/dist/types/modeler/constraint.d.ts.map +1 -1
- package/dist/types/modeler/expression.d.ts +129 -2
- package/dist/types/modeler/expression.d.ts.map +1 -1
- package/dist/types/modeler/index.d.ts +4 -5
- package/dist/types/modeler/index.d.ts.map +1 -1
- package/dist/types/modeler/linearizer.d.ts +11 -2
- package/dist/types/modeler/linearizer.d.ts.map +1 -1
- package/dist/types/modeler/lp-writer.d.ts.map +1 -1
- package/dist/types/modeler/model.d.ts +85 -124
- package/dist/types/modeler/model.d.ts.map +1 -1
- package/dist/types/modeler/parser.d.ts.map +1 -1
- package/dist/types/modeler/quad-expr.d.ts +8 -2
- package/dist/types/modeler/quad-expr.d.ts.map +1 -1
- package/dist/types/modeler/solution-validator.d.ts +12 -12
- package/dist/types/modeler/solution-validator.d.ts.map +1 -1
- package/dist/types/modeler/solvers/glpk/loader.d.ts +4 -0
- package/dist/types/modeler/solvers/glpk/loader.d.ts.map +1 -1
- package/dist/types/modeler/solvers/glpk/solver.d.ts +2 -2
- package/dist/types/modeler/solvers/glpk/solver.d.ts.map +1 -1
- package/dist/types/modeler/solvers/highs/driver.d.ts.map +1 -1
- package/dist/types/modeler/solvers/highs/loader.d.ts +8 -6
- package/dist/types/modeler/solvers/highs/loader.d.ts.map +1 -1
- package/dist/types/modeler/solvers/highs/solver.d.ts.map +1 -1
- package/dist/types/modeler/solvers/highs/worker-client.d.ts +16 -0
- package/dist/types/modeler/solvers/highs/worker-client.d.ts.map +1 -1
- package/dist/types/modeler/solvers/mock.d.ts +2 -3
- package/dist/types/modeler/solvers/mock.d.ts.map +1 -1
- package/dist/types/modeler/solvers/pumpkin/assets.d.ts +2 -0
- package/dist/types/modeler/solvers/pumpkin/assets.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/index.d.ts +6 -0
- package/dist/types/modeler/solvers/pumpkin/index.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/loader.d.ts +40 -0
- package/dist/types/modeler/solvers/pumpkin/loader.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/node-runtime.d.ts +3 -0
- package/dist/types/modeler/solvers/pumpkin/node-runtime.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/solver.d.ts +23 -0
- package/dist/types/modeler/solvers/pumpkin/solver.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/worker-client.d.ts +74 -0
- package/dist/types/modeler/solvers/pumpkin/worker-client.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/worker-factory.d.ts +3 -0
- package/dist/types/modeler/solvers/pumpkin/worker-factory.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin/worker.d.ts +7 -0
- package/dist/types/modeler/solvers/pumpkin/worker.d.ts.map +1 -0
- package/dist/types/modeler/solvers/pumpkin.d.ts +2 -0
- package/dist/types/modeler/solvers/pumpkin.d.ts.map +1 -0
- package/dist/types/modeler/solvers/registry.d.ts.map +1 -1
- package/dist/types/modeler/solvers/types.d.ts +7 -9
- package/dist/types/modeler/solvers/types.d.ts.map +1 -1
- package/dist/types/modeler/solvers/z3/loader.d.ts +4 -0
- package/dist/types/modeler/solvers/z3/loader.d.ts.map +1 -1
- package/dist/types/modeler/solvers/z3/solver.d.ts +2 -15
- package/dist/types/modeler/solvers/z3/solver.d.ts.map +1 -1
- package/dist/types/modeler/types.d.ts +12 -15
- package/dist/types/modeler/types.d.ts.map +1 -1
- package/dist/types/modeler/validation.d.ts +26 -2
- package/dist/types/modeler/validation.d.ts.map +1 -1
- package/dist/types/modeler/variable.d.ts +9 -5
- package/dist/types/modeler/variable.d.ts.map +1 -1
- package/docs/examples/index.md +6 -1
- package/docs/examples/project-scheduling.md +106 -0
- package/docs/examples/shift-scheduling.md +3 -0
- package/docs/examples/smt-security.md +1 -0
- package/docs/examples/traveling-salesperson.md +1 -1
- package/docs/examples/unsat-core.md +3 -2
- package/docs/getting-started/ai-agents.md +94 -25
- package/docs/getting-started/coding-agents.md +158 -0
- package/docs/getting-started/cross-origin.md +2 -2
- package/docs/getting-started/index.md +40 -41
- package/docs/getting-started/runtimes.md +42 -18
- package/docs/guide/constraint-programming.md +141 -0
- package/docs/guide/constraints.md +64 -14
- package/docs/guide/decomposition.md +59 -59
- package/docs/guide/expressions.md +42 -10
- package/docs/guide/formulation-tips.md +6 -6
- package/docs/guide/objectives.md +65 -62
- package/docs/guide/unsat-core.md +36 -27
- package/docs/guide/variables.md +30 -17
- package/docs/solvers/custom-solver.md +18 -13
- package/docs/solvers/highs.md +18 -23
- package/docs/solvers/index.md +12 -6
- package/docs/solvers/pumpkin.md +163 -0
- package/docs/solvers/z3.md +2 -2
- package/llms-full.txt +944 -314
- package/llms.txt +43 -22
- package/package.json +38 -11
- package/skills/washi/SKILL.md +79 -27
- package/dist/browser/_washi-node-only-BvRk9kiK.js +0 -0
- package/dist/browser/browser-runtime-TLCY0hkc.js +0 -1793
- package/dist/lib/_washi-node-only-BvRk9kiK.js +0 -0
- package/dist/lib/registry-D7TZ3Wh_.js +0 -1034
- package/docs/ja/getting-started/ai-agents.md +0 -280
- package/docs/zh/getting-started/ai-agents.md +0 -280
|
@@ -1,22 +1,37 @@
|
|
|
1
|
-
import { a as e } from "./loader-
|
|
1
|
+
import { a as e, t } from "./loader-i3FnqMes.js";
|
|
2
2
|
//#region src/modeler/solvers/highs/worker.ts
|
|
3
|
-
self.onmessage = async (
|
|
4
|
-
let { type:
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
self.onmessage = async (n) => {
|
|
4
|
+
let { type: r, id: i, lpString: a, options: o, reportProgress: s } = n.data;
|
|
5
|
+
if (r === "WARMUP") {
|
|
6
|
+
try {
|
|
7
|
+
await t(o), self.postMessage({
|
|
8
|
+
type: "WARMUP_SUCCESS",
|
|
9
|
+
id: i
|
|
10
|
+
});
|
|
11
|
+
} catch (e) {
|
|
12
|
+
self.postMessage({
|
|
13
|
+
type: "WARMUP_ERROR",
|
|
14
|
+
id: i,
|
|
15
|
+
error: e?.message || String(e)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (r === "SOLVE") try {
|
|
21
|
+
let { result: t, runTime: n } = await e(a, {
|
|
22
|
+
...o,
|
|
23
|
+
...s ? {
|
|
9
24
|
onProgress: (e) => {
|
|
10
25
|
self.postMessage({
|
|
11
26
|
type: "SOLVE_PROGRESS",
|
|
12
|
-
id:
|
|
27
|
+
id: i,
|
|
13
28
|
progress: e
|
|
14
29
|
});
|
|
15
30
|
},
|
|
16
31
|
onIncumbent: (e) => {
|
|
17
32
|
self.postMessage({
|
|
18
33
|
type: "SOLVE_INCUMBENT",
|
|
19
|
-
id:
|
|
34
|
+
id: i,
|
|
20
35
|
incumbent: e
|
|
21
36
|
});
|
|
22
37
|
}
|
|
@@ -24,14 +39,14 @@ self.onmessage = async (t) => {
|
|
|
24
39
|
});
|
|
25
40
|
self.postMessage({
|
|
26
41
|
type: "SOLVE_SUCCESS",
|
|
27
|
-
id:
|
|
42
|
+
id: i,
|
|
28
43
|
result: t,
|
|
29
44
|
runTime: n
|
|
30
45
|
});
|
|
31
46
|
} catch (e) {
|
|
32
47
|
self.postMessage({
|
|
33
48
|
type: "SOLVE_ERROR",
|
|
34
|
-
id:
|
|
49
|
+
id: i,
|
|
35
50
|
error: e?.message || String(e)
|
|
36
51
|
});
|
|
37
52
|
}
|
package/dist/browser/highs.wasm
CHANGED
|
Binary file
|
|
@@ -8,8 +8,13 @@ function n() {
|
|
|
8
8
|
return t("highs.wasm");
|
|
9
9
|
}
|
|
10
10
|
//#endregion
|
|
11
|
+
//#region \0washi-node-runtime
|
|
12
|
+
function r() {
|
|
13
|
+
throw Error("This distribution is for browsers. Use the npm entry in Node.js.");
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
11
16
|
//#region src/modeler/solvers/highs/driver.ts
|
|
12
|
-
function
|
|
17
|
+
function i(e, t, n) {
|
|
13
18
|
if (n <= 0 || !t) return /* @__PURE__ */ new Float64Array();
|
|
14
19
|
let r = e.wasmMemory ? e.wasmMemory.buffer : e.HEAPF64 ? e.HEAPF64.buffer : e.HEAP8?.buffer;
|
|
15
20
|
if (r) return new Float64Array(r, t, n).slice();
|
|
@@ -17,15 +22,15 @@ function r(e, t, n) {
|
|
|
17
22
|
for (let r = 0; r < n; r++) i[r] = e.getValue(t + r * 8, "double");
|
|
18
23
|
return i;
|
|
19
24
|
}
|
|
20
|
-
var
|
|
25
|
+
var a = class extends Error {
|
|
21
26
|
constructor(e) {
|
|
22
27
|
super(e), this.name = "HighsError";
|
|
23
28
|
}
|
|
24
|
-
},
|
|
29
|
+
}, o = class extends a {
|
|
25
30
|
constructor(e) {
|
|
26
31
|
super(e), this.name = "HighsUnsupportedOptionError";
|
|
27
32
|
}
|
|
28
|
-
},
|
|
33
|
+
}, s = {
|
|
29
34
|
0: "Not Set",
|
|
30
35
|
1: "Load error",
|
|
31
36
|
2: "Model error",
|
|
@@ -45,7 +50,7 @@ var i = class extends Error {
|
|
|
45
50
|
16: "Solution limit reached",
|
|
46
51
|
17: "Interrupted",
|
|
47
52
|
18: "Memory limit reached"
|
|
48
|
-
},
|
|
53
|
+
}, c = {
|
|
49
54
|
callbackType: {
|
|
50
55
|
logging: 0,
|
|
51
56
|
simplexInterrupt: 1,
|
|
@@ -84,7 +89,7 @@ var i = class extends Error {
|
|
|
84
89
|
interrupt: 17
|
|
85
90
|
}
|
|
86
91
|
};
|
|
87
|
-
function
|
|
92
|
+
function l(e) {
|
|
88
93
|
return {
|
|
89
94
|
create: e.cwrap("Highs_create", "number", []),
|
|
90
95
|
destroy: e.cwrap("Highs_destroy", "void", ["number"]),
|
|
@@ -178,7 +183,7 @@ function c(e) {
|
|
|
178
183
|
stopCallback: e.cwrap("Highs_stopCallback", "number", ["number", "number"])
|
|
179
184
|
};
|
|
180
185
|
}
|
|
181
|
-
var
|
|
186
|
+
var u = 0, d = class {
|
|
182
187
|
highs;
|
|
183
188
|
module;
|
|
184
189
|
bindings;
|
|
@@ -189,7 +194,7 @@ var l = 0, u = class {
|
|
|
189
194
|
}
|
|
190
195
|
changeObjectiveOffset(e) {
|
|
191
196
|
let t = this.bindings.changeObjectiveOffset(this.highs, e);
|
|
192
|
-
if (t !== 0) throw new
|
|
197
|
+
if (t !== 0) throw new a(`Highs_changeObjectiveOffset failed with status ${t}`);
|
|
193
198
|
}
|
|
194
199
|
getObjectiveOffset() {
|
|
195
200
|
let e = this.module._malloc(8);
|
|
@@ -201,7 +206,7 @@ var l = 0, u = class {
|
|
|
201
206
|
}
|
|
202
207
|
options = { set: (e, t) => {
|
|
203
208
|
let n = -1;
|
|
204
|
-
if (typeof t == "boolean" ? n = this.bindings.setBoolOptionValue(this.highs, e, +!!t) : typeof t == "number" ? Number.isInteger(t) ? (n = this.bindings.setIntOptionValue(this.highs, e, t), n !== 0 && (n = this.bindings.setDoubleOptionValue(this.highs, e, t))) : n = this.bindings.setDoubleOptionValue(this.highs, e, t) : typeof t == "string" && (n = this.bindings.setStringOptionValue(this.highs, e, t)), n !== 0) throw new
|
|
209
|
+
if (typeof t == "boolean" ? n = this.bindings.setBoolOptionValue(this.highs, e, +!!t) : typeof t == "number" ? Number.isInteger(t) ? (n = this.bindings.setIntOptionValue(this.highs, e, t), n !== 0 && (n = this.bindings.setDoubleOptionValue(this.highs, e, t))) : n = this.bindings.setDoubleOptionValue(this.highs, e, t) : typeof t == "string" && (n = this.bindings.setStringOptionValue(this.highs, e, t)), n !== 0) throw new o(`Option "${e}" with value ${JSON.stringify(t)} is not supported or invalid in HiGHS`);
|
|
205
210
|
} };
|
|
206
211
|
getDimensions() {
|
|
207
212
|
return {
|
|
@@ -229,7 +234,7 @@ var l = 0, u = class {
|
|
|
229
234
|
try {
|
|
230
235
|
for (let r = 0; r < t; r++) this.module.setValue(n + r * 8, e.colValue[r], "double");
|
|
231
236
|
let r = this.bindings.setSolution(this.highs, n, 0, 0, 0);
|
|
232
|
-
if (r !== 0) throw new
|
|
237
|
+
if (r !== 0) throw new a(`Highs_setSolution failed with status ${r}`);
|
|
233
238
|
} finally {
|
|
234
239
|
this.module._free(n);
|
|
235
240
|
}
|
|
@@ -239,25 +244,26 @@ var l = 0, u = class {
|
|
|
239
244
|
let t = e.indices.length, n = this.module._malloc(t * 4), r = this.module._malloc(t * 8);
|
|
240
245
|
try {
|
|
241
246
|
for (let i = 0; i < t; i++) this.module.setValue(n + i * 4, e.indices[i], "i32"), this.module.setValue(r + i * 8, e.values[i], "double");
|
|
242
|
-
let
|
|
243
|
-
if (
|
|
247
|
+
let i = this.bindings.setSparseSolution(this.highs, t, n, r);
|
|
248
|
+
if (i !== 0) throw new a(`Highs_setSparseSolution failed with status ${i}`);
|
|
244
249
|
} finally {
|
|
245
250
|
this.module._free(n), this.module._free(r);
|
|
246
251
|
}
|
|
247
252
|
return;
|
|
248
253
|
}
|
|
249
|
-
throw new
|
|
254
|
+
throw new a("Invalid argument to setSolution (expected { colValue } or { indices, values })");
|
|
250
255
|
}
|
|
251
256
|
run(e) {
|
|
252
257
|
let t = 0, n = [];
|
|
253
|
-
if (e
|
|
254
|
-
|
|
258
|
+
if (e) {
|
|
259
|
+
if (typeof this.module.addFunction != "function") throw new a("HiGHS WebAssembly runtime does not support module.addFunction; progress and interrupt callbacks are unavailable.");
|
|
260
|
+
t = this.module.addFunction((t, n, r, a) => {
|
|
255
261
|
let o = e[t];
|
|
256
262
|
if (!o) return;
|
|
257
263
|
let s = {};
|
|
258
|
-
if (
|
|
259
|
-
let e = this.module.getValue(
|
|
260
|
-
p && m > 0 && (h =
|
|
264
|
+
if (r) {
|
|
265
|
+
let e = this.module.getValue(r + 8, "double"), t = this.module.getValue(r + 16, "i32"), n = this.module.getValue(r + 20, "i32"), a = this.module.getValue(r + 24, "i32"), o = this.module.getValue(r + 32, "double"), c = Number(this.module.getValue(r + 40, "i32")), l = Number(this.module.getValue(r + 48, "i32")), u = this.module.getValue(r + 56, "double"), d = this.module.getValue(r + 64, "double"), f = this.module.getValue(r + 72, "double"), p = this.module.getValue(r + 80, "i32"), m = this.module.getValue(r + 84, "i32"), h;
|
|
266
|
+
p && m > 0 && (h = i(this.module, p, m)), s = {
|
|
261
267
|
running_time: e,
|
|
262
268
|
simplex_iteration_count: t,
|
|
263
269
|
ipm_iteration_count: n,
|
|
@@ -314,19 +320,19 @@ var l = 0, u = class {
|
|
|
314
320
|
} finally {
|
|
315
321
|
this.module._free(n);
|
|
316
322
|
}
|
|
317
|
-
throw new
|
|
323
|
+
throw new a(`Info item "${e}" not available or unknown in HiGHS`);
|
|
318
324
|
} };
|
|
319
325
|
getSolution() {
|
|
320
|
-
let e = this.getDimensions(), t = e.numCols > 0 ? this.module._malloc(e.numCols * 8) : 0, n = e.numCols > 0 ? this.module._malloc(e.numCols * 8) : 0,
|
|
326
|
+
let e = this.getDimensions(), t = e.numCols > 0 ? this.module._malloc(e.numCols * 8) : 0, n = e.numCols > 0 ? this.module._malloc(e.numCols * 8) : 0, r = e.numRows > 0 ? this.module._malloc(e.numRows * 8) : 0, a = e.numRows > 0 ? this.module._malloc(e.numRows * 8) : 0;
|
|
321
327
|
try {
|
|
322
|
-
return this.bindings.getSolution(this.highs, t, n,
|
|
323
|
-
colValue:
|
|
324
|
-
colDual:
|
|
325
|
-
rowValue:
|
|
326
|
-
rowDual:
|
|
328
|
+
return this.bindings.getSolution(this.highs, t, n, r, a), {
|
|
329
|
+
colValue: i(this.module, t, e.numCols),
|
|
330
|
+
colDual: i(this.module, n, e.numCols),
|
|
331
|
+
rowValue: i(this.module, r, e.numRows),
|
|
332
|
+
rowDual: i(this.module, a, e.numRows)
|
|
327
333
|
};
|
|
328
334
|
} finally {
|
|
329
|
-
t && this.module._free(t), n && this.module._free(n),
|
|
335
|
+
t && this.module._free(t), n && this.module._free(n), r && this.module._free(r), a && this.module._free(a);
|
|
330
336
|
}
|
|
331
337
|
}
|
|
332
338
|
getObjectiveValue() {
|
|
@@ -346,29 +352,29 @@ var l = 0, u = class {
|
|
|
346
352
|
[Symbol.dispose]() {
|
|
347
353
|
this.destroy();
|
|
348
354
|
}
|
|
349
|
-
},
|
|
355
|
+
}, f = class {
|
|
350
356
|
module;
|
|
351
357
|
bindings;
|
|
352
|
-
constants =
|
|
358
|
+
constants = c;
|
|
353
359
|
errors = {
|
|
354
|
-
HighsError:
|
|
355
|
-
HighsUnsupportedOptionError:
|
|
360
|
+
HighsError: a,
|
|
361
|
+
HighsUnsupportedOptionError: o
|
|
356
362
|
};
|
|
357
363
|
constructor(e) {
|
|
358
|
-
this.module = e, this.bindings =
|
|
364
|
+
this.module = e, this.bindings = l(e);
|
|
359
365
|
}
|
|
360
366
|
withModel(e, t) {
|
|
361
|
-
let n = this.bindings.create(), r = new
|
|
362
|
-
if (!this.module.FS) throw new
|
|
367
|
+
let n = this.bindings.create(), r = new d(this.module, this.bindings, n), i = `/model_${++u}.${e.format}`;
|
|
368
|
+
if (!this.module.FS) throw new a("Emscripten FS is not initialized on this HiGHS module instance");
|
|
363
369
|
let o = this.module.FS;
|
|
364
370
|
try {
|
|
365
|
-
o.writeFile(
|
|
366
|
-
let s = this.bindings.readModel(n,
|
|
367
|
-
if (s !== 0) throw new
|
|
371
|
+
o.writeFile(i, e.data);
|
|
372
|
+
let s = this.bindings.readModel(n, i);
|
|
373
|
+
if (s !== 0) throw new a(`Failed to load ${e.format.toUpperCase()} model into HiGHS (status ${s})`);
|
|
368
374
|
return t(r);
|
|
369
375
|
} finally {
|
|
370
376
|
try {
|
|
371
|
-
o.unlink(
|
|
377
|
+
o.unlink(i);
|
|
372
378
|
} catch {}
|
|
373
379
|
r.destroy();
|
|
374
380
|
}
|
|
@@ -378,9 +384,7 @@ var l = 0, u = class {
|
|
|
378
384
|
format: "lp",
|
|
379
385
|
data: e
|
|
380
386
|
}, (e) => {
|
|
381
|
-
for (let [n, r] of Object.entries(t))
|
|
382
|
-
e.options.set(n, r);
|
|
383
|
-
} catch {}
|
|
387
|
+
for (let [n, r] of Object.entries(t)) e.options.set(n, r);
|
|
384
388
|
e.run();
|
|
385
389
|
let n = e.getModelStatus(), r = e.getDimensions(), i = e.getSolution(), a = {};
|
|
386
390
|
for (let t = 0; t < r.numCols; t++) {
|
|
@@ -393,39 +397,84 @@ var l = 0, u = class {
|
|
|
393
397
|
};
|
|
394
398
|
}
|
|
395
399
|
return {
|
|
396
|
-
Status:
|
|
400
|
+
Status: s[n] ?? "Unknown",
|
|
397
401
|
StatusCode: n,
|
|
398
402
|
ObjectiveValue: e.getObjectiveValue(),
|
|
399
403
|
Columns: a
|
|
400
404
|
};
|
|
401
405
|
});
|
|
402
406
|
}
|
|
403
|
-
},
|
|
404
|
-
|
|
405
|
-
|
|
407
|
+
}, p = [
|
|
408
|
+
"mip_max_nodes",
|
|
409
|
+
"mip_max_improving_sols",
|
|
410
|
+
"mip_max_leaves",
|
|
411
|
+
"simplex_iteration_limit",
|
|
412
|
+
"ipm_iteration_limit"
|
|
413
|
+
], m = /* @__PURE__ */ new Set([
|
|
414
|
+
"timeLimit",
|
|
415
|
+
"outputFlag",
|
|
416
|
+
"presolve",
|
|
417
|
+
"solver",
|
|
418
|
+
"relativeGap",
|
|
419
|
+
"absoluteGap",
|
|
420
|
+
"wasmUrl",
|
|
421
|
+
"signal",
|
|
422
|
+
"onProgress",
|
|
423
|
+
"onIncumbent",
|
|
424
|
+
"relax",
|
|
425
|
+
"useWorker",
|
|
426
|
+
"objectiveOffset",
|
|
427
|
+
"initialValues",
|
|
428
|
+
...p
|
|
429
|
+
]);
|
|
430
|
+
function h(e = {}) {
|
|
431
|
+
if (e.threads !== void 0) throw Error("Solver \"HiGHS\" does not support option \"threads\" (HiGHS WebAssembly runs single-threaded).");
|
|
432
|
+
if (e.verbose !== void 0) throw Error("Solver \"HiGHS\" does not support option \"verbose\"; use \"outputFlag\" instead.");
|
|
433
|
+
for (let [t, n] of Object.entries(e)) if (n !== void 0 && !m.has(t)) throw Error(`Solver "HiGHS" does not support option "${t}".`);
|
|
434
|
+
if (e.useWorker !== void 0 && typeof e.useWorker != "boolean") throw Error(`Invalid HiGHS option "useWorker": expected boolean, got ${typeof e.useWorker}.`);
|
|
435
|
+
if (e.outputFlag !== void 0 && typeof e.outputFlag != "boolean") throw Error(`Invalid HiGHS option "outputFlag": expected boolean, got ${typeof e.outputFlag}.`);
|
|
436
|
+
if (e.relax !== void 0 && typeof e.relax != "boolean") throw Error(`Invalid HiGHS option "relax": expected boolean, got ${typeof e.relax}.`);
|
|
437
|
+
if (e.presolve !== void 0 && e.presolve !== "on" && e.presolve !== "off" && e.presolve !== "choose") throw Error(`Invalid HiGHS option "presolve" (${String(e.presolve)}): expected "on", "off", or "choose".`);
|
|
438
|
+
if (e.timeLimit !== void 0 && (typeof e.timeLimit != "number" || !Number.isFinite(e.timeLimit) || e.timeLimit < 0)) throw Error(`Invalid HiGHS option "timeLimit" (${String(e.timeLimit)}): expected a finite non-negative number of seconds.`);
|
|
439
|
+
if (e.relativeGap !== void 0 && (typeof e.relativeGap != "number" || !Number.isFinite(e.relativeGap) || e.relativeGap < 0)) throw Error(`Invalid HiGHS option "relativeGap" (${String(e.relativeGap)}): expected a finite non-negative number.`);
|
|
440
|
+
if (e.absoluteGap !== void 0 && (typeof e.absoluteGap != "number" || !Number.isFinite(e.absoluteGap) || e.absoluteGap < 0)) throw Error(`Invalid HiGHS option "absoluteGap" (${String(e.absoluteGap)}): expected a finite non-negative number.`);
|
|
441
|
+
if (e.objectiveOffset !== void 0 && (typeof e.objectiveOffset != "number" || !Number.isFinite(e.objectiveOffset))) throw Error(`Invalid HiGHS option "objectiveOffset" (${String(e.objectiveOffset)}): expected a finite number.`);
|
|
442
|
+
if (e.wasmUrl !== void 0 && e.wasmUrl !== null && (typeof e.wasmUrl != "string" || e.wasmUrl === "")) throw Error("Invalid HiGHS option \"wasmUrl\": expected a non-empty string or null.");
|
|
406
443
|
}
|
|
407
|
-
|
|
408
|
-
|
|
444
|
+
var g = null, _ = null, v = null;
|
|
445
|
+
function y(e) {
|
|
446
|
+
v = e, g = null, _ = null;
|
|
409
447
|
}
|
|
410
|
-
|
|
411
|
-
return
|
|
448
|
+
function b() {
|
|
449
|
+
return v;
|
|
412
450
|
}
|
|
413
|
-
async function
|
|
414
|
-
|
|
415
|
-
if (f && p === n) return f;
|
|
416
|
-
p = n;
|
|
417
|
-
let r = (async () => {
|
|
418
|
-
let e = (await import("./browser-runtime-TLCY0hkc.js")).default;
|
|
419
|
-
return await e({ locateFile: (e) => e.endsWith(".wasm") ? t : e });
|
|
420
|
-
})().catch((e) => {
|
|
421
|
-
f === r && (f = null, p = null);
|
|
422
|
-
let n = e instanceof Error ? e.message : String(e);
|
|
423
|
-
throw Error(`[WaSHI] Failed to initialize HiGHS${t ? ` from "${t}"` : ""}. Deploy the package's WASM asset or explicitly set wasmUrl; no CDN fallback is attempted. ${n}`, { cause: e });
|
|
424
|
-
});
|
|
425
|
-
return f = r, r;
|
|
451
|
+
async function x(e) {
|
|
452
|
+
return e || v || n();
|
|
426
453
|
}
|
|
427
|
-
async function
|
|
428
|
-
|
|
454
|
+
async function S(e = {}) {
|
|
455
|
+
let t = await x(e.wasmUrl);
|
|
456
|
+
return {
|
|
457
|
+
isNode: !1,
|
|
458
|
+
wasmUrl: t,
|
|
459
|
+
key: t ?? "node"
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
async function C(e = {}) {
|
|
463
|
+
let { isNode: t, wasmUrl: n, key: i } = await S(e);
|
|
464
|
+
if (g && _ === i) return g;
|
|
465
|
+
_ = i;
|
|
466
|
+
let a = null;
|
|
467
|
+
return a = (async () => {
|
|
468
|
+
let e = t ? await r() : (await import("./browser-runtime-AG5QFtKf.js")).default;
|
|
469
|
+
return t ? await e() : await e({ locateFile: (e) => e.endsWith(".wasm") ? n : e });
|
|
470
|
+
})().then((e) => e).catch((e) => {
|
|
471
|
+
g === a && (g = null, _ = null);
|
|
472
|
+
let t = e instanceof Error ? e.message : String(e);
|
|
473
|
+
throw Error(`[WaSHI] Failed to initialize HiGHS${n ? ` from "${n}"` : ""}. Deploy the package's WASM asset or explicitly set wasmUrl; no CDN fallback is attempted. ${t}`, { cause: e });
|
|
474
|
+
}), g = a, a;
|
|
475
|
+
}
|
|
476
|
+
async function w(e, t = {}) {
|
|
477
|
+
if (h(t), t.signal?.aborted) return {
|
|
429
478
|
result: {
|
|
430
479
|
Status: "Interrupted",
|
|
431
480
|
StatusCode: 17,
|
|
@@ -436,7 +485,7 @@ async function y(e, t = {}) {
|
|
|
436
485
|
},
|
|
437
486
|
runTime: 0
|
|
438
487
|
};
|
|
439
|
-
let n = await
|
|
488
|
+
let n = await C(t);
|
|
440
489
|
if (t.signal?.aborted) return {
|
|
441
490
|
result: {
|
|
442
491
|
Status: "Interrupted",
|
|
@@ -449,86 +498,76 @@ async function y(e, t = {}) {
|
|
|
449
498
|
runTime: 0
|
|
450
499
|
};
|
|
451
500
|
let r = performance.now(), i = { output_flag: t.outputFlag ?? !1 };
|
|
452
|
-
t.timeLimit !== void 0 && (i.time_limit = t.timeLimit), t.presolve !== void 0 && (i.presolve = t.presolve), t.solver !== void 0 && (i.solver = t.solver), t.
|
|
453
|
-
for (let e of [
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
"simplex_iteration_limit",
|
|
458
|
-
"ipm_iteration_limit"
|
|
459
|
-
]) t[e] !== void 0 && (i[e] = t[e]);
|
|
460
|
-
let a = typeof t.objectiveOffset == "number" && Number.isFinite(t.objectiveOffset) ? t.objectiveOffset : 0, s = t.initialValues, c = !1;
|
|
461
|
-
if (s) {
|
|
462
|
-
for (let [e, t] of Object.entries(s)) if (t !== void 0) {
|
|
501
|
+
t.timeLimit !== void 0 && (i.time_limit = t.timeLimit), t.presolve !== void 0 && (i.presolve = t.presolve), t.solver !== void 0 && (i.solver = t.solver), t.relativeGap !== void 0 && (i.mip_rel_gap = t.relativeGap), t.absoluteGap !== void 0 && (i.mip_abs_gap = t.absoluteGap);
|
|
502
|
+
for (let e of p) t[e] !== void 0 && (i[e] = t[e]);
|
|
503
|
+
let a = t.objectiveOffset ?? 0, o = t.initialValues, c = !1;
|
|
504
|
+
if (o) {
|
|
505
|
+
for (let [e, t] of Object.entries(o)) if (t !== void 0) {
|
|
463
506
|
if (typeof t != "number" || !Number.isFinite(t)) throw Error(`Invalid initial value for column "${e}": ${String(t)} (must be a finite number).`);
|
|
464
507
|
c = !0;
|
|
465
508
|
}
|
|
466
509
|
}
|
|
467
|
-
if (typeof n.withModel
|
|
510
|
+
if (typeof n.withModel != "function") throw Error("[WaSHI] HiGHS runtime is missing required withModel() API (legacy highs.solve fallback has been removed).");
|
|
511
|
+
return {
|
|
468
512
|
result: n.withModel({
|
|
469
513
|
format: "lp",
|
|
470
514
|
data: e
|
|
471
515
|
}, (e) => {
|
|
472
|
-
|
|
516
|
+
let l = !1;
|
|
517
|
+
if (a !== 0) {
|
|
518
|
+
if (typeof e.changeObjectiveOffset != "function") throw Error("[WaSHI] HiGHS runtime does not support changeObjectiveOffset() for non-zero objectiveOffset.");
|
|
473
519
|
let t = typeof e.getObjectiveOffset == "function" ? e.getObjectiveOffset() : 0;
|
|
474
|
-
e.changeObjectiveOffset(t + a);
|
|
475
|
-
}
|
|
476
|
-
for (let [t, r] of Object.entries(i)) try {
|
|
477
|
-
e.options.set(t, r);
|
|
478
|
-
} catch (e) {
|
|
479
|
-
if (e?.name !== "HighsUnsupportedOptionError" && !(n.errors?.HighsUnsupportedOptionError && e instanceof n.errors.HighsUnsupportedOptionError)) throw e;
|
|
520
|
+
e.changeObjectiveOffset(t + a), l = !0;
|
|
480
521
|
}
|
|
481
|
-
let
|
|
482
|
-
|
|
522
|
+
for (let [t, n] of Object.entries(i)) e.options.set(t, n);
|
|
523
|
+
let u = e.getDimensions(), d = [], f = !1;
|
|
524
|
+
for (let t = 0; t < u.numCols; t++) {
|
|
483
525
|
let n = e.getColIntegrality(t);
|
|
484
|
-
n !== 0 && (
|
|
526
|
+
n !== 0 && (f = !0), d.push({
|
|
485
527
|
name: e.getColName(t),
|
|
486
528
|
type: n === 1 ? "Integer" : "Continuous"
|
|
487
529
|
});
|
|
488
530
|
}
|
|
489
|
-
if (c &&
|
|
531
|
+
if (c && o) {
|
|
490
532
|
if (typeof e.setSolution != "function") throw Error("HiGHS runtime does not support setting primal initial values (setSolution is unavailable).");
|
|
491
533
|
let t = /* @__PURE__ */ new Map();
|
|
492
|
-
for (let e = 0; e <
|
|
493
|
-
for (let [e, n] of Object.entries(
|
|
534
|
+
for (let e = 0; e < u.numCols; e++) t.set(d[e].name, e);
|
|
535
|
+
for (let [e, n] of Object.entries(o)) if (n !== void 0 && !t.has(e)) throw Error(`Unknown column "${e}" in initialValues (column does not exist in the HiGHS LP model).`);
|
|
494
536
|
let n = [], r = [];
|
|
495
|
-
for (let e = 0; e <
|
|
496
|
-
let t =
|
|
497
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
498
|
-
let i =
|
|
537
|
+
for (let e = 0; e < u.numCols; e++) {
|
|
538
|
+
let t = d[e].name;
|
|
539
|
+
if (Object.prototype.hasOwnProperty.call(o, t)) {
|
|
540
|
+
let i = o[t];
|
|
499
541
|
i !== void 0 && (n.push(e), r.push(i));
|
|
500
542
|
}
|
|
501
543
|
}
|
|
502
|
-
n.length > 0 && (n.length ===
|
|
544
|
+
n.length > 0 && (n.length === u.numCols ? e.setSolution({ colValue: r }) : e.setSolution({
|
|
503
545
|
indices: n,
|
|
504
546
|
values: r
|
|
505
547
|
}));
|
|
506
548
|
}
|
|
507
|
-
let
|
|
549
|
+
let p = null, m = null, h = 0, g = (e) => {
|
|
508
550
|
let t = e?.data ?? {}, n = typeof t.running_time == "number" && Number.isFinite(t.running_time) ? t.running_time : (performance.now() - r) / 1e3, i = typeof t.mip_primal_bound == "number" && Number.isFinite(t.mip_primal_bound) ? t.mip_primal_bound : typeof t.objective_function_value == "number" && Number.isFinite(t.objective_function_value) ? t.objective_function_value : void 0, a = typeof t.mip_dual_bound == "number" && Number.isFinite(t.mip_dual_bound) ? t.mip_dual_bound : void 0, o = typeof t.mip_gap == "number" && Number.isFinite(t.mip_gap) ? t.mip_gap : void 0, s = i !== void 0 && a !== void 0 ? Math.abs(i - a) : void 0, c = typeof t.mip_node_count == "bigint" ? Number(t.mip_node_count) : typeof t.mip_node_count == "number" && Number.isFinite(t.mip_node_count) ? t.mip_node_count : void 0, l = typeof t.mip_total_lp_iterations == "bigint" ? Number(t.mip_total_lp_iterations) : typeof t.simplex_iteration_count == "number" && Number.isFinite(t.simplex_iteration_count) ? t.simplex_iteration_count : typeof t.ipm_iteration_count == "number" && Number.isFinite(t.ipm_iteration_count) ? t.ipm_iteration_count : void 0, u = typeof e?.message == "string" && e.message.trim().length > 0 ? e.message.trim() : void 0, d = {
|
|
509
551
|
elapsedTime: n,
|
|
510
552
|
elapsedSeconds: n,
|
|
511
553
|
...i === void 0 ? {} : { objectiveValue: i },
|
|
512
554
|
...a === void 0 ? {} : { objectiveBound: a },
|
|
513
|
-
...o === void 0 ? {} : {
|
|
514
|
-
|
|
515
|
-
mipGap: o
|
|
516
|
-
},
|
|
517
|
-
...s === void 0 ? {} : { absGap: s },
|
|
555
|
+
...o === void 0 ? {} : { relativeGap: o },
|
|
556
|
+
...s === void 0 ? {} : { absoluteGap: s },
|
|
518
557
|
...c === void 0 ? {} : { nodes: c },
|
|
519
558
|
...l === void 0 ? {} : { iterations: l },
|
|
520
559
|
...u === void 0 ? {} : { message: u }
|
|
521
560
|
};
|
|
522
|
-
return
|
|
523
|
-
},
|
|
561
|
+
return m = d, d;
|
|
562
|
+
}, _ = (e) => {
|
|
524
563
|
let n = e?.data;
|
|
525
564
|
if (!n || !(n.mip_solution instanceof Float64Array)) return;
|
|
526
565
|
let r = n.mip_solution, i = {};
|
|
527
|
-
for (let e = 0; e <
|
|
566
|
+
for (let e = 0; e < d.length && e < r.length; e++) Object.defineProperty(i, d[e].name, {
|
|
528
567
|
value: {
|
|
529
568
|
Index: e,
|
|
530
|
-
Type:
|
|
531
|
-
Name:
|
|
569
|
+
Type: d[e].type,
|
|
570
|
+
Name: d[e].name,
|
|
532
571
|
Primal: r[e]
|
|
533
572
|
},
|
|
534
573
|
enumerable: !0,
|
|
@@ -536,13 +575,13 @@ async function y(e, t = {}) {
|
|
|
536
575
|
configurable: !0
|
|
537
576
|
});
|
|
538
577
|
let a = typeof n.objective_function_value == "number" && Number.isFinite(n.objective_function_value) ? n.objective_function_value : typeof n.mip_primal_bound == "number" && Number.isFinite(n.mip_primal_bound) ? n.mip_primal_bound : NaN;
|
|
539
|
-
Number.isFinite(a) && (
|
|
578
|
+
Number.isFinite(a) && (p = {
|
|
540
579
|
objectiveValue: a,
|
|
541
580
|
...typeof n.mip_dual_bound == "number" && Number.isFinite(n.mip_dual_bound) ? { mipDualBound: n.mip_dual_bound } : {},
|
|
542
581
|
...typeof n.mip_gap == "number" && Number.isFinite(n.mip_gap) ? { mipGap: n.mip_gap } : {},
|
|
543
582
|
columns: i
|
|
544
|
-
}, t.onIncumbent?.(
|
|
545
|
-
},
|
|
583
|
+
}, t.onIncumbent?.(p));
|
|
584
|
+
}, v = !1;
|
|
546
585
|
if (t.signal || t.onProgress || t.onIncumbent) {
|
|
547
586
|
let r = n.constants?.callbackType ?? {
|
|
548
587
|
logging: 0,
|
|
@@ -554,90 +593,85 @@ async function y(e, t = {}) {
|
|
|
554
593
|
mipInterrupt: 6
|
|
555
594
|
}, i = (e) => {
|
|
556
595
|
if (t.signal?.aborted) {
|
|
557
|
-
|
|
596
|
+
v = !0, e.interrupt();
|
|
558
597
|
return;
|
|
559
598
|
}
|
|
560
|
-
t.onProgress && (
|
|
599
|
+
t.onProgress && (h++, t.onProgress(g(e)), t.signal?.aborted && (v = !0, e.interrupt()));
|
|
561
600
|
}, a = {
|
|
562
601
|
[r.simplexInterrupt]: i,
|
|
563
602
|
[r.ipmInterrupt]: i,
|
|
564
603
|
[r.mipInterrupt]: i,
|
|
565
604
|
[r.mipImprovingSolution]: (e) => {
|
|
566
|
-
|
|
605
|
+
_(e), t.onProgress && !t.signal?.aborted && (h++, t.onProgress(g(e)));
|
|
567
606
|
},
|
|
568
607
|
[r.mipLogging]: (e) => {
|
|
569
|
-
t.onProgress && !t.signal?.aborted && (
|
|
608
|
+
t.onProgress && !t.signal?.aborted && (h++, t.onProgress(g(e)));
|
|
570
609
|
}
|
|
571
610
|
};
|
|
572
611
|
e.run(a);
|
|
573
612
|
} else e.run();
|
|
574
|
-
let
|
|
575
|
-
|
|
576
|
-
let
|
|
613
|
+
let y = e.getModelStatus();
|
|
614
|
+
v && (y = 17);
|
|
615
|
+
let b = s[y] ?? "Unknown", x = 0, S = 0;
|
|
577
616
|
try {
|
|
578
|
-
|
|
617
|
+
x = Number(e.info.get("primal_solution_status"));
|
|
579
618
|
} catch {}
|
|
580
619
|
try {
|
|
581
|
-
|
|
620
|
+
S = Number(e.info.get("dual_solution_status"));
|
|
582
621
|
} catch {}
|
|
583
|
-
let
|
|
584
|
-
if (!
|
|
585
|
-
else for (let e = 0; e <
|
|
586
|
-
let t =
|
|
622
|
+
let C = n.constants?.solutionStatus?.feasible ?? 2, w = x === C, T = S === C, E = w || T ? e.getSolution() : null, D = w, O = {};
|
|
623
|
+
if (!w && p !== null) D = !0, O = p.columns;
|
|
624
|
+
else for (let e = 0; e < u.numCols; e++) {
|
|
625
|
+
let t = d[e], n = {
|
|
587
626
|
Index: e,
|
|
588
627
|
Type: t.type,
|
|
589
628
|
Name: t.name
|
|
590
629
|
};
|
|
591
|
-
|
|
630
|
+
w && E && (n.Primal = E.colValue[e]), !f && T && E && (n.Dual = E.colDual[e]), Object.defineProperty(O, t.name, {
|
|
592
631
|
value: n,
|
|
593
632
|
enumerable: !0,
|
|
594
633
|
writable: !0,
|
|
595
634
|
configurable: !0
|
|
596
635
|
});
|
|
597
636
|
}
|
|
598
|
-
let
|
|
599
|
-
for (let t = 0; t <
|
|
637
|
+
let k = [];
|
|
638
|
+
for (let t = 0; t < u.numRows; t++) {
|
|
600
639
|
let n = e.getRowName(t), r = {
|
|
601
640
|
Index: t,
|
|
602
641
|
Name: n
|
|
603
642
|
};
|
|
604
|
-
|
|
643
|
+
w && E && (r.Primal = E.rowValue[t]), !f && T && E && (r.Dual = E.rowDual[t]), k.push(r);
|
|
605
644
|
}
|
|
606
|
-
let
|
|
607
|
-
if (
|
|
645
|
+
let A = w ? e.getObjectiveValue() : p === null ? NaN : p.objectiveValue, j, M;
|
|
646
|
+
if (f) {
|
|
608
647
|
try {
|
|
609
648
|
let t = Number(e.info.get("mip_dual_bound"));
|
|
610
|
-
Number.isFinite(t) && (
|
|
649
|
+
Number.isFinite(t) && (j = t);
|
|
611
650
|
} catch {}
|
|
612
|
-
|
|
651
|
+
j === void 0 && m && m.objectiveBound !== void 0 && (j = m.objectiveBound);
|
|
613
652
|
try {
|
|
614
653
|
let t = Number(e.info.get("mip_gap"));
|
|
615
|
-
Number.isFinite(t) && (
|
|
654
|
+
Number.isFinite(t) && (M = t);
|
|
616
655
|
} catch {}
|
|
617
|
-
|
|
656
|
+
M === void 0 && m && m.relativeGap !== void 0 && (M = m.relativeGap);
|
|
618
657
|
}
|
|
619
658
|
return {
|
|
620
|
-
Status:
|
|
621
|
-
StatusCode:
|
|
622
|
-
PrimalSolutionStatus:
|
|
623
|
-
DualSolutionStatus:
|
|
624
|
-
HasPrimalSolution:
|
|
625
|
-
IsMip:
|
|
626
|
-
ObjectiveValue:
|
|
627
|
-
ObjectiveOffsetApplied:
|
|
628
|
-
MipDualBound:
|
|
629
|
-
MipGap:
|
|
630
|
-
Columns:
|
|
631
|
-
Rows:
|
|
659
|
+
Status: s[y] ?? b,
|
|
660
|
+
StatusCode: y,
|
|
661
|
+
PrimalSolutionStatus: x,
|
|
662
|
+
DualSolutionStatus: S,
|
|
663
|
+
HasPrimalSolution: D,
|
|
664
|
+
IsMip: f,
|
|
665
|
+
ObjectiveValue: A,
|
|
666
|
+
ObjectiveOffsetApplied: l,
|
|
667
|
+
MipDualBound: j,
|
|
668
|
+
MipGap: M,
|
|
669
|
+
Columns: O,
|
|
670
|
+
Rows: k
|
|
632
671
|
};
|
|
633
672
|
}),
|
|
634
673
|
runTime: (performance.now() - r) / 1e3
|
|
635
674
|
};
|
|
636
|
-
if (c) throw Error("HiGHS runtime does not support setting primal initial values (withModel/setSolution is unavailable).");
|
|
637
|
-
return {
|
|
638
|
-
result: n.solve(e, i),
|
|
639
|
-
runTime: (performance.now() - r) / 1e3
|
|
640
|
-
};
|
|
641
675
|
}
|
|
642
676
|
//#endregion
|
|
643
|
-
export {
|
|
677
|
+
export { w as a, t as c, y as i, b as n, h as o, x as r, f as s, C as t };
|