ReadonlydisposedWhether dispose() has destroyed the owned native instance.
ReadonlyinfoSolve-information facade scoped to this instance.
ReadonlylastMetadata from the most recent successful throwing-wrapper operation.
ReadonlyoptionsOption facade scoped to this instance.
ReadonlyrawStatus-preserving view of the same native instance; disposing either view disposes both.
Appends one column; entry indices are zero-based existing rows.
Appends copied CSC columns. Cost/lower/upper lengths are equal, matrix
numCols equals that length, and matrix numRows equals current model rows.
Appends one linear objective, changing multi-objective solve behavior.
Appends one row; entry indices are zero-based existing columns.
Appends copied CSR rows. Lower/upper lengths are equal, matrix numRows
equals that length, and matrix numCols equals current model columns.
Appends one zero-cost column with no matrix entries.
Appends zero-cost columns; lower/upper arrays must have equal length.
Inserts, changes, or removes (value === 0) one matrix coefficient.
Changes lower and upper bounds of one zero-based column.
Changes one zero-based column's linear objective coefficient.
Changes one zero-based column's variable domain.
Arrays follow selected entries; mask arrays instead span every column.
Values follow selected entries; mask values instead span every column.
Values follow selected entries; mask values instead span every column.
Changes minimize/maximize direction and invalidates relevant solver state.
Changes lower and upper bounds of one zero-based row.
Arrays follow selected entries; mask arrays instead span every row.
Resets model, solver state, and options to defaults while retaining native ownership.
Makes every column continuous.
Removes all auxiliary linear objectives and their solve priorities.
Resets model and solver state while retaining options.
Clears solution, basis, and solver state while retaining the model.
Runs crossover for an LP. colValue is required; colDual and rowDual
must be supplied together or both omitted. rowValue is ignored.
Deletes selected columns and renumbers all later columns.
Deletes selected rows and renumbers all later rows.
Destroys shared native ownership; idempotent and invalidates raw, options, and info.
Converts internal matrix storage to column-wise form; coefficients are unchanged.
Converts internal matrix storage to row-wise form; coefficients are unchanged.
Serializes the current model to detached LP text via private temporary storage.
Serializes the current model to detached MPS bytes via private temporary storage.
Serializes the last presolved model to LP text; call presolve() first.
Serializes the presolved model to detached MPS bytes; call presolve() first.
Serializes current solution state as machine-readable text.
Optionalpretty: falseSerializes human-readable solution text; unavailable primal, dual, or basis fields are represented by the native pretty writer rather than rejected.
Solves a feasibility relaxation synchronously, then restores the original model and prior model status. The relaxation solution and objective value remain available; negative penalties prohibit their corresponding violation, local vectors override globals, and the retained basis is invalidated.
Returns one identifier per basis row: columns use their zero-based index and
a row activity/slack uses exactly -rowIndex - 1.
Copies current basis-status buffers. Inspect basis_validity; a solved MIP
or an interior-point solve without crossover need not have a valid basis.
Returns one of numRows columns of square B^-1; col is a basis-matrix index.
Optionalsparse: booleanReturns one of numRows rows of square B^-1; output length is numRows.
Optionalsparse: booleanSolves B x = rhs; rhs.length must equal numRows.
Optionalsparse: booleanSolves B^-T x = rhs; input and output lengths equal numRows.
Optionalsparse: booleanResolves an exact column name to a zero-based index.
Returns the name of a zero-based column; throws for invalid index/status.
Copies selected columns in ascending current index order with a CSC matrix.
Returns current model row, column, matrix, and Hessian counts.
Returns a primal-infeasibility dual ray, possibly after an additional LP solve.
Returns a dual direction certifying primal infeasibility, possibly after an LP solve.
Returns an LP with discrete variables fixed; requires a MIP and valid primal solution.
Optionalformat: MatrixFormatAttempts to compute an infeasible subsystem for an LP/QP or MIP relaxation. It may run multiple blocking solves. Empty indices mean none was found; limited/warning results may be candidates rather than proved irreducible IISs.
Returns IIS working-model data; meaningful after a non-error getIis() found a subsystem.
Optionalformat: MatrixFormatReturns current linear-model data without Hessian, names, or auxiliary objectives.
Optionalformat: MatrixFormatReturns detached LP/MIP/QP coefficient data in the requested orientation. Names and auxiliary multi-objective linear objectives are not included.
Optionalformat: MatrixFormatReturns current model status without running the solver.
Returns the constant objective offset.
Returns the current branded objective direction.
Returns current objective value; meaningful only when a primal solution exists.
Returns a presolved column name by zero-based presolved index.
Returns dimensions of the most recently generated presolved LP.
Returns the last presolved LP; call presolve() first.
Optionalformat: MatrixFormatReturns a presolved row name by zero-based presolved index.
Returns a primal-unboundedness certificate, possibly after an additional LP solve.
Requires an optimal LP simplex solution with initialized valid basis state; IPM alone is insufficient.
Returns one original model column of B^-1 A; output length is numRows.
Optionalsparse: booleanReturns one row of B^-1 A; output length is numCols.
Optionalsparse: booleanResolves an exact row name to a zero-based index.
Returns the name of a zero-based row.
Copies selected rows in ascending current index order with a CSR matrix.
Returns cumulative wall-clock seconds spent in solver runs since the last clock reset.
Copies current solution buffers when model state permits the native query.
This is not an availability guarantee: inspect model status plus the
primal_solution_status and dual_solution_status info values.
Assigns a copied name to one zero-based column.
Replaces the quadratic objective Hessian; dimension must match model columns.
Replaces all auxiliary linear objectives with copied entries.
Replaces current numerical state; integrality and Hessian independently select MIP/QP features.
Assigns a copied name to one zero-based row.
Maps values in the current presolved model's ordering back to original model
space. Vector lengths must match getPresolvedDimensions() and model
mutation may invalidate presolve state. Read the recovered values with
getSolution().
Presolves the current model synchronously and stores presolved state.
Replaces current model state by parsing copied LP/MPS content synchronously.
Clears model and solver state, releases retained vector capacity, and resets native clocks. The native instance and its options remain reusable.
Runs synchronously to termination, callback interruption, or a configured
limit. Put long browser solves in a Web Worker so this blocking call does
not freeze the UI. Supplied handlers are active only for this call and are
removed in finally.
During a handler, only controls on that event are reentrant. Every model/raw method, including queries and callback registration, throws. Event data is detached and can be retained or posted to another thread after the handler.
Optionalcallbacks: HighsCallbackMapApplies variable substitution x[index] = factor * xNew[index]: matrix
coefficients and cost are multiplied by factor, while variable bounds are
divided by it and reordered when it is negative. factor must be nonzero.
Multiplies one row's coefficients and bounds by a nonzero factor, reordering bounds if negative.
Installs a complete basis; omission is exactly equivalent to setLogicalBasis().
Optionalbasis: BasisInputConstructs the logical basis with columns nonbasic and row slacks basic.
Supplies copied dense or sparse values as a solver start; it does not set a basis.
Resets timing accumulators, restoring the full cumulative time_limit budget.
Persistent model owning one native HiGHS instance. Methods are synchronous, copy inputs, and throw on validation/native errors unless explicitly noted. The caller must eventually dispose the model; garbage collection does not free the native instance and undisposed models leak Wasm memory. Prefer
Highs.withModel(),using, ortry/finallywithdispose(). Returned strings and typed arrays remain usable after disposal. Value-returning methods record a native warning inlastCallwhen they do not return metadata directly.