@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.
@@ -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
- commands.push(`set ${key} ${value}`);
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");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@areb0s/scip.js",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "SCIP Optimization Solver compiled to WebAssembly - LP, MIP, and MINLP support",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",