Parses problem as a CPLEX LP-format model, solves it, and returns detached
JavaScript objects containing the available result.
problem is model text, not a path. options are applied to a fresh native
instance before solving; omitted options use the defaults compiled into
HiGHS. The call blocks the current JavaScript thread. A native read,
option-setting, run, or solution-extraction error throws. Unknown options,
wrong value types, and integer option values that are non-integral or do
not fit a signed 32-bit integer also throw. In contrast, an optimization
outcome such as infeasible, unbounded, or time-limited is returned in
HighsSolution.Status and is not a JavaScript exception.
All returned objects and arrays are copies. Mutating them cannot affect HiGHS, and the native instance is destroyed before this method returns.
Optionaloptions: Readonly<
Compatibility API for solving one model at a time.
The asynchronous loader creates this object, but
solve()itself is synchronous: JavaScript execution is blocked until HiGHS finishes or reaches a configured limit. Each call creates a fresh native solver, so models, options, solutions, clocks, and basis state are never shared between calls.