is provided, then ``min`` and ``max`` will serve as bounds for all decision variables. method : str This is the method-specific documentation for 'highs-ipm'. :ref:`'highs-ipm' `, :ref:`'highs-ds' `, :ref:`'interior-point' ` (default), :ref:`'revised simplex' `, and :ref:`'simplex' ` (legacy) are also available. Options ------- maxiter : int The maximum number of iterations to perform in either phase. For :ref:`'highs-ipm' `, this does not include the number of crossover iterations. Default is the largest possible value for an ``int`` on the platform. disp : bool (default: ``False``) Set to ``True`` if indicators of optimization status are to be printed to the console during optimization. presolve : bool (default: ``True``) Presolve attempts to identify trivial infeasibilities, identify trivial unboundedness, and simplify the problem before sending it to the main solver. It is generally recommended to keep the default setting ``True``; set to ``False`` if presolve is to be disabled. time_limit : float The maximum time in seconds allotted to solve the problem; default is the largest possible value for a ``double`` on the platform. dual_feasibility_tolerance : double (default: 1e-07) The minimum of this and ``primal_feasibility_tolerance`` is used for the feasibility tolerance of :ref:`'highs-ipm' `. primal_feasibility_tolerance : double (default: 1e-07) The minimum of this and ``dual_feasibility_tolerance`` is used for the feasibility tolerance of :ref:`'highs-ipm' `. ipm_optimality_tolerance : double (default: ``1e-08``) Optimality tolerance for :ref:`'highs-ipm' `. Minimum allowable value is 1e-12. unknown_options : dict Optional arguments not used by this particular solver. If ``unknown_options`` is non-empty, a warning is issued listing all unused options. Returns ------- res : OptimizeResult A :class:`scipy.optimize.OptimizeResult` consisting of the fields: x : 1D array The values of the decision variables that minimizes the objective function while satisfying the constraints. fun : float The optimal value of the objective function ``c @ x``. slack : 1D array The (nominally positive) values of the slack, ``b_ub - A_ub @ x``. con : 1D array The (nominally zero) residuals of the equality constraints, ``b_eq - A_eq @ x``. success : bool ``True`` when the algorithm succeeds in finding an optimal solution. status : int An integer representing the exit status of the algorithm. ``0`` : Optimization terminated successfully. ``1`` : Iteration or time limit reached. ``2`` : Problem appears to be infeasible. ``3`` : Problem appears to be unbounded. ``4`` : The HiGHS solver ran into a problem. message : str A string descriptor of the exit status of the algorithm. nit : int The total number of iterations performed. For the HiGHS interior-point method, this does not include crossover iterations. crossover_nit : int The number of primal/dual pushes performed during the crossover routine for the HiGHS interior-point method. ineqlin : OptimizeResult Solution and sensitivity information corresponding to the inequality constraints, `b_ub`. A dictionary consisting of the fields: residual : np.ndnarray The (nominally positive) values of the slack variables, ``b_ub - A_ub @ x``. This quantity is also commonly referred to as "slack". marginals : np.ndarray The sensitivity (partial derivative) of the objective function with respect to the right-hand side of the inequality constraints, `b_ub`. eqlin : OptimizeResult Solution and sensitivity information corresponding to the equality constraints, `b_eq`. A dictionary consisting of the fields: residual : np.ndarray The (nominally zero) residuals of the equality constraints, ``b_eq - A_eq @ x``. marginals : np.ndarray The sensitivity (partial derivative) of the objective function with respect to the right-hand side of the equality constraints, `b_eq`. lower, upper : OptimizeResult Solution and sensitivity information corresponding to the lower and upper bounds on decision variables, `bounds`. residual : np.ndarray The (nominally positive) values of the quantity ``x - lb`` (lower) or ``ub - x`` (upper). marginals : np.ndarray The sensitivity (partial derivative) of the objective function with respect to the lower and upper `bounds`. Notes ----- Method :ref:`'highs-ipm' ` is a wrapper of a C++ implementation of an **i**\ nterior-\ **p**\ oint **m**\ ethod [13]_; it features a crossover routine, so it is as accurate as a simplex solver. Method :ref:`'highs-ds' ` is a wrapper of the C++ high performance dual revised simplex implementation (HSOL) [13]_, [14]_. Method :ref:`'highs' ` chooses between the two automatically. For new code involving `linprog`, we recommend explicitly choosing one of these three method values instead of :ref:`'interior-point' ` (default), :ref:`'revised simplex' `, and :ref:`'simplex' ` (legacy). The result fields `ineqlin`, `eqlin`, `lower`, and `upper` all contain `marginals`, or partial derivatives of the objective function with respect to the right-hand side of each constraint. These partial derivatives are also referred to as "Lagrange multipliers", "dual values", and "shadow prices". The sign convention of `marginals` is opposite that of Lagrange multipliers produced by many nonlinear solvers. References ---------- .. [13] Huangfu, Q., Galabova, I., Feldmeier, M., and Hall, J. A. J. "HiGHS - high performance software for linear optimization." https://highs.dev/ .. [14] Huangfu, Q. and Hall, J. A. J. "Parallelizing the dual revised simplex method." Mathematical Programming Computation, 10 (1), 119-142, 2018. DOI: 10.1007/s12532-017-0130-5 Nr