bundles / scipy latest / scipy / optimize / _highspy / _highs_wrapper / _highs_wrapper
function
scipy.optimize._highspy._highs_wrapper:_highs_wrapper
source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_highspy/_highs_wrapper.py:10
Signature
def _highs_wrapper(c, indptr, indices, data, lhs, rhs, lb, ub, integrality, options)Summary
Solve linear programs using HiGHS [1].
Extended Summary
Assume problems of the form:
MIN c.T @ x s.t. lhs <= A @ x <= rhs lb <= x <= ub
Parameters
c: 1-D array, (n,)Array of objective value coefficients.
astart: 1-D arrayCSC format index array.
aindex: 1-D arrayCSC format index array.
avalue: 1-D arrayData array of the matrix.
lhs: 1-D array (or None), (m,)Array of left hand side values of the inequality constraints. If
lhs=None, then an array of-infis assumed.rhs: 1-D array, (m,)Array of right hand side values of the inequality constraints.
lb: 1-D array (or None), (n,)Lower bounds on solution variables x. If
lb=None, then an array of all0is assumed.ub: 1-D array (or None), (n,)Upper bounds on solution variables x. If
ub=None, then an array ofinfis assumed.options: dictA dictionary of solver options
Returns
res: dictIf model_status is one of kOptimal, kObjectiveBound, kTimeLimit, kIterationLimit:
statusModel status code.
messageMessage corresponding to model status code.
xSolution variables.
slackSlack variables.
lambdaLagrange multipliers associated with the constraints Ax = b.
sLagrange multipliers associated with the constraints x >= 0.
funFinal objective value.
simplex_nitNumber of iterations accomplished by the simplex solver.
ipm_nitNumber of iterations accomplished by the interior- point solver.
If model_status is not one of the above:
statusModel status code.
messageMessage corresponding to model status code.
Notes
If options['write_solution_to_file'] is True but options['solution_file'] is unset or '', then the solution will be printed to stdout.
If any iteration limit is reached, no solution will be available.
OptimizeWarning will be raised if any option value set by the user is found to be incorrect.
Aliases
scipy.optimize._linprog_highs._highs_wrapper