@areb0s/scip.js 1.2.5 → 1.2.7
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/dist/scip-wrapper.js +5 -2
- package/package.json +1 -1
package/dist/scip-wrapper.js
CHANGED
|
@@ -330,8 +330,11 @@ export async function solve(problem, options = {}) {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
// Custom parameters
|
|
333
|
+
// SCIP CLI format: "set category param value" (space-separated, not slash)
|
|
333
334
|
for (const [key, value] of Object.entries(parameters)) {
|
|
334
|
-
|
|
335
|
+
// Convert "limits/objectivelimit" to "limits objectivelimit"
|
|
336
|
+
const paramPath = key.replace(/\//g, ' ');
|
|
337
|
+
commands.push(`set ${paramPath} ${value}`);
|
|
335
338
|
}
|
|
336
339
|
|
|
337
340
|
// Read problem
|
|
@@ -347,7 +350,7 @@ export async function solve(problem, options = {}) {
|
|
|
347
350
|
}
|
|
348
351
|
const initialSolutionFile = '/solutions/initial.sol';
|
|
349
352
|
scipModule.FS.writeFile(initialSolutionFile, solLines.join('\n'));
|
|
350
|
-
commands.push(`read ${initialSolutionFile}`);
|
|
353
|
+
commands.push(`read solution ${initialSolutionFile}`);
|
|
351
354
|
}
|
|
352
355
|
commands.push("optimize");
|
|
353
356
|
commands.push("display solution");
|