{ } Raw JSON

bundles / scipy 1.17.1 / scipy / optimize / _highspy / _highs_wrapper / _highs_wrapper

function

scipy.optimize._highspy._highs_wrapper:_highs_wrapper

source: /scipy/optimize/_highspy/_highs_wrapper.py :9

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 array

CSC format index array.

aindex : 1-D array

CSC format index array.

avalue : 1-D array

Data 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 -inf is 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 all 0 is assumed.

ub : 1-D array (or None), (n,)

Upper bounds on solution variables x. If ub=None, then an array of inf is assumed.

options : dict

A dictionary of solver options

Returns

res : dict

If model_status is one of kOptimal, kObjectiveBound, kTimeLimit, kIterationLimit:

  • status

    status

  • message

    message

  • x

    x

  • slack

    slack

  • lambda

    lambda

  • s

    s

  • fun

    Final objective value.

  • simplex_nit

    simplex_nit

  • ipm_nit

    ipm_nit

If model_status is not one of the above:

  • status

    status

  • message

    message

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