{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This section describes the available solvers that can be selected by the 'method' parameter."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs-ds' <optimize.linprog-highs-ds>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", and "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs-ipm' <optimize.linprog-highs-ipm>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are interfaces to the HiGHS simplex and interior-point method solvers "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "13"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", respectively. "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs' <optimize.linprog-highs>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (default) chooses between the two automatically. These are the fastest linear programming solvers in SciPy, especially for large, sparse problems; which of these two is faster is problem-dependent. The other solvers are legacy methods and will be removed when "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "callback"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is supported by the HiGHS methods."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs-ds' <optimize.linprog-highs-ds>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", is a wrapper of the C++ high performance dual revised simplex implementation (HSOL) "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "13"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "14"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs-ipm' <optimize.linprog-highs-ipm>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a wrapper of a C++ implementation of an "
            },
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "i"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "terior-\\ "
            },
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "p"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "oint "
            },
            {
              "__type": "Strong",
              "__tag": 4048,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "m"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "ethod "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "13"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "; it features a crossover routine, so it is as accurate as a simplex solver. Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'highs' <optimize.linprog-highs>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " chooses between the two automatically. For new code involving "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "linprog",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.optimize._linprog:linprog"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", we recommend explicitly choosing one of these three method values."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "versionadded",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "versionadded 1.6.0"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'interior-point' <optimize.linprog-interior-point>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " uses the primal-dual path following algorithm as outlined in "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "4"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". This algorithm supports sparse constraint matrices and is typically faster than the simplex methods, especially for large, sparse problems. Note, however, that the solution returned may be slightly less accurate than those of the simplex methods and will not, in general, correspond with a vertex of the polytope defined by the constraints."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "versionadded",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "versionadded 1.0.0"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'revised simplex' <optimize.linprog-revised_simplex>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " uses the revised simplex method as described in "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "9"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", except that a factorization "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "11"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " of the basis matrix, rather than its inverse, is efficiently maintained and used to solve the linear systems at each iteration of the algorithm."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "versionadded",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "versionadded 1.3.0"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Method "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'simplex' <optimize.linprog-simplex>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " uses a traditional, full-tableau implementation of Dantzig's simplex algorithm "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "2"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " ("
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "not"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " the Nelder-Mead simplex). This algorithm is included for backwards compatibility and educational purposes."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "versionadded",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "versionadded 0.15.0"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Before applying "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'interior-point' <optimize.linprog-interior-point>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'revised simplex' <optimize.linprog-revised_simplex>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", or "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "'simplex' <optimize.linprog-simplex>",
              "domain": null,
              "role": "ref",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", a presolve procedure based on "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "8"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " attempts to identify trivial infeasibilities, trivial unboundedness, and potential problem simplifications. Specifically, it checks for:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "rows of zeros in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_eq"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_ub"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", representing trivial constraints;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "columns of zeros in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_eq"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "and",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_ub"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", representing unconstrained   variables;"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "column singletons in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_eq"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", representing fixed variables; and"
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "column singletons in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_ub"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", representing simple bounds."
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If presolve reveals that the problem is unbounded (e.g. an unconstrained and unbounded variable has negative cost) or infeasible (e.g., a row of zeros in "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A_eq"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " corresponds with a nonzero in "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "b_eq"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "), the solver terminates with the appropriate status code. Note that presolve terminates as soon as any sign of unboundedness is detected; consequently, a problem may be reported as unbounded when in reality the problem is infeasible (but infeasibility has not been detected yet). Therefore, if it is important to know whether the problem is actually infeasible, solve the problem again with option "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "presolve=False"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If neither infeasibility nor unboundedness are detected in a single pass of the presolve, bounds are tightened where possible and fixed variables are removed from the problem. Then, linearly dependent rows of the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "A_eq"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " matrix are removed, (unless they represent an infeasibility) to avoid numerical difficulties in the primary solve routine. Note that rows that are nearly linearly dependent (within a prescribed tolerance) may also be removed, which can change the optimal solution in rare cases. If this is a concern, eliminate redundancy from your problem formulation and run with option "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "rr=False"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " or "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "presolve=False"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Several potential improvements can be made here: additional presolve checks outlined in "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "8"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " should be implemented, the presolve routine should be run multiple times (until no further simplifications can be made), and more of the efficiency improvements from "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "5"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " should be implemented in the redundancy removal routines."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "After presolve, the problem is transformed to standard form by converting the (tightened) simple bounds to upper bound constraints, introducing non-negative slack variables for inequality constraints, and expressing unbounded variables as the difference between two non-negative variables. Optionally, the problem is automatically scaled via equilibration "
            },
            {
              "__type": "FootnoteReference",
              "__tag": 4066,
              "label": "12"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". The selected algorithm solves the standard form problem, and a postprocessing routine converts the result to a solution to the original problem."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "res",
              "annotation": "OptimizeResult",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "scipy.optimize.OptimizeResult",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "scipy",
                        "version": "*",
                        "kind": "api",
                        "path": "scipy.optimize._optimize:OptimizeResult"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " consisting of the fields below. Note that the return types of the fields may depend on whether the optimization was successful, therefore it is recommended to check "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "OptimizeResult.status",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " before relying on the other fields:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "x"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "x"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "fun"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "fun"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "slack"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "slack"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "con"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "con"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "success"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "success"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "status"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "status"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "nit"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "nit"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "message"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "message"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Linear programming: minimize a linear objective function subject to linear equality and inequality constraints."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "c",
              "annotation": "1-D array",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The coefficients of the linear objective function to be minimized."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "A_ub",
              "annotation": "2-D array, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The inequality constraint matrix. Each row of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_ub"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " specifies the coefficients of a linear inequality constraint on "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "b_ub",
              "annotation": "1-D array, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The inequality constraint vector. Each element represents an upper bound on the corresponding value of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_ub @ x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "A_eq",
              "annotation": "2-D array, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The equality constraint matrix. Each row of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_eq"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " specifies the coefficients of a linear equality constraint on "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "b_eq",
              "annotation": "1-D array, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The equality constraint vector. Each element of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "A_eq @ x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must equal the corresponding element of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "b_eq"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "bounds",
              "annotation": "sequence, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A sequence of "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(min, max)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " pairs for each element in "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "x"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", defining the minimum and maximum values of that decision variable. If a single tuple "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(min, max)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is provided, then "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "min"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "max"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " will serve as bounds for all decision variables. Use "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to indicate that there is no bound. For instance, the default bound "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(0, None)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " means that all decision variables are non-negative, and the pair "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(None, None)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " means no bounds at all, i.e. all variables are allowed to be any real."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "method",
              "annotation": "str, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The algorithm used to solve the standard form problem. The following are supported."
                    }
                  ]
                },
                {
                  "__type": "BulletList",
                  "__tag": 4053,
                  "ordered": false,
                  "start": 1,
                  "children": [
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'highs' <optimize.linprog-highs>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " (default)"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'highs-ds' <optimize.linprog-highs-ds>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'highs-ipm' <optimize.linprog-highs-ipm>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'interior-point' <optimize.linprog-interior-point>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " (legacy)"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'revised simplex' <optimize.linprog-revised_simplex>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " (legacy)"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "ListItem",
                      "__tag": 4054,
                      "children": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "InlineRole",
                              "__tag": 4003,
                              "value": "'simplex' <optimize.linprog-simplex>",
                              "domain": null,
                              "role": "ref",
                              "inventory": null
                            },
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": " (legacy)"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The legacy methods are deprecated and will be removed in SciPy 1.11.0."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "callback",
              "annotation": "callable, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If a callback function is provided, it will be called at least once per iteration of the algorithm. The callback function must accept a single "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "scipy.optimize.OptimizeResult",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "scipy",
                        "version": "*",
                        "kind": "api",
                        "path": "scipy.optimize._optimize:OptimizeResult"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " consisting of the following fields:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "x"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "x"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "fun"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "fun"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "success"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "success"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "slack"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "slack"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "con"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "con"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "phase"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "phase"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "status"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "status"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "nit"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "nit"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "message"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "message"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Callback functions are not currently supported by the HiGHS methods."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "options",
              "annotation": "dict, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A dictionary of solver options. All methods accept the following options:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "maxiter"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "maxiter"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "disp"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "disp"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "presolve"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "presolve"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "All methods except the HiGHS solvers also accept:"
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "tol"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "tol"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "autoscale"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "autoscale"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "rr"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "rr"
                            }
                          ]
                        }
                      ]
                    },
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "rr_method"
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "rr_method"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For method-specific options, see "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "show_options('linprog')",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy.optimize._optimize:show_options"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "x0",
              "annotation": "1-D array, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Guess values of the decision variables, which will be refined by the optimization algorithm. This argument is currently used only by the "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "'revised simplex' <optimize.linprog-revised_simplex>",
                      "domain": null,
                      "role": "ref",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method, and can only be used if "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "x0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " represents a basic feasible solution."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "integrality",
              "annotation": "1-D array or int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Indicates the type of integrality constraint on each decision variable."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Continuous variable; no integrality constraint."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Integer variable; decision variable must be an integer within "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "bounds"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "2"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Semi-continuous variable; decision variable must be within "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "bounds"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or take value "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "3"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Semi-integer variable; decision variable must be an integer within "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "bounds"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or take value "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "0"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "By default, all variables are continuous."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For mixed integrality constraints, supply an array of shape "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "c.shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". To infer a constraint on each decision variable from shorter inputs, the argument will be broadcast to "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "c.shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " using "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.broadcast_to",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy:broadcast_to"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This argument is currently used only by the "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "'highs' <optimize.linprog-highs>",
                      "domain": null,
                      "role": "ref",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " method and is ignored otherwise."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Linear programming solves problems of the following form:"
            }
          ]
        },
        {
          "__type": "Math",
          "__tag": 4058,
          "value": "\\min_x \\ & c^T x \\\\\n\\mbox{such that} \\ & A_{ub} x \\leq b_{ub},\\\\\n& A_{eq} x = b_{eq},\\\\\n& l \\leq x \\leq u ,"
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "where "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "x"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a vector of decision variables; "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "c"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "b_{ub}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "b_{eq}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "l"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "u"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are vectors; and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "A_{ub}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "A_{eq}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are matrices."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Alternatively, that's:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "minimize       "
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "c @ x",
                  "execution_status": null
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "such that       "
                    }
                  ]
                },
                {
                  "__type": "Code",
                  "__tag": 4050,
                  "value": "A_ub @ x <= b_ub\nA_eq @ x == b_eq\nlb <= x <= ub",
                  "execution_status": null
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Note that by default "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "lb = 0"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ub = None"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Other bounds can be specified with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "bounds"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/scipy/optimize/_linprog.py",
  "item_line": 178,
  "item_type": "function",
  "aliases": [
    "scipy.optimize.linprog"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Consider the following problem:\n\n.. math::\n\n    \\min_{x_0, x_1} \\ -x_0 + 4x_1 & \\\\\n    \\mbox{such that} \\ -3x_0 + x_1 & \\leq 6,\\\\\n    -x_0 - 2x_1 & \\geq -4,\\\\\n    x_1 & \\geq -3.\n\nThe problem is not presented in the form accepted by `linprog`. This is\neasily remedied by converting the \"greater than\" inequality\nconstraint to a \"less than\" inequality constraint by\nmultiplying both sides by a factor of :math:`-1`. Note also that the last\nconstraint is really the simple bound :math:`-3 \\leq x_1 \\leq \\infty`.\nFinally, since there are no bounds on :math:`x_0`, we must explicitly\nspecify the bounds :math:`-\\infty \\leq x_0 \\leq \\infty`, as the\ndefault is for variables to be non-negative. After collecting coeffecients\ninto arrays and tuples, the input for this problem is:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "from scipy.optimize import linprog\nc = [-1, 4]\nA = [[-3, 1], [1, 2]]\nb = [6, 4]\nx0_bounds = (None, None)\nx1_bounds = (-3, None)\nres = linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds])\nres.fun\nres.x\nres.message\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nThe marginals (AKA dual values / shadow prices / Lagrange multipliers)\nand residuals (slacks) are also available.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "res.ineqlin\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nFor example, because the marginal associated with the second inequality\nconstraint is -1, we expect the optimal value of the objective function\nto decrease by ``eps`` if we add a small amount ``eps`` to the right hand\nside of the second inequality constraint:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "eps = 0.05\nb[1] += eps\nlinprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds]).fun\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nAlso, because the residual on the first inequality constraint is 39, we\ncan decrease the right hand side of the first constraint by 39 without\naffecting the optimal solution.\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "b = [6, 4]  # reset to original values\nb[0] -= 39\nlinprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds]).fun\n",
        "execution_status": "success"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "show_options",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.optimize._optimize:show_options"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Additional options accepted by the solvers."
            }
          ]
        }
      ],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "c",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "A_ub",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "b_ub",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "A_eq",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "b_eq",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "bounds",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "(0, None)"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "method",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "highs"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "callback",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "options",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "x0",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "integrality",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "linprog"
  },
  "references": [
    ".. [1] Dantzig, George B., Linear programming and extensions. Rand",
    "       Corporation Research Study Princeton Univ. Press, Princeton, NJ,",
    "       1963",
    ".. [2] Hillier, S.H. and Lieberman, G.J. (1995), \"Introduction to",
    "       Mathematical Programming\", McGraw-Hill, Chapter 4.",
    ".. [3] Bland, Robert G. New finite pivoting rules for the simplex method.",
    "       Mathematics of Operations Research (2), 1977: pp. 103-107.",
    ".. [4] Andersen, Erling D., and Knud D. Andersen. \"The MOSEK interior point",
    "       optimizer for linear programming: an implementation of the",
    "       homogeneous algorithm.\" High performance optimization. Springer US,",
    "       2000. 197-232.",
    ".. [5] Andersen, Erling D. \"Finding all linearly dependent rows in",
    "       large-scale linear programming.\" Optimization Methods and Software",
    "       6.3 (1995): 219-227.",
    ".. [6] Freund, Robert M. \"Primal-Dual Interior-Point Methods for Linear",
    "       Programming based on Newton's Method.\" Unpublished Course Notes,",
    "       March 2004. Available 2/25/2017 at",
    "       https://ocw.mit.edu/courses/sloan-school-of-management/15-084j-nonlinear-programming-spring-2004/lecture-notes/lec14_int_pt_mthd.pdf",
    ".. [7] Fourer, Robert. \"Solving Linear Programs by Interior-Point Methods.\"",
    "       Unpublished Course Notes, August 26, 2005. Available 2/25/2017 at",
    "       http://www.4er.org/CourseNotes/Book%20B/B-III.pdf",
    ".. [8] Andersen, Erling D., and Knud D. Andersen. \"Presolving in linear",
    "       programming.\" Mathematical Programming 71.2 (1995): 221-245.",
    ".. [9] Bertsimas, Dimitris, and J. Tsitsiklis. \"Introduction to linear",
    "       programming.\" Athena Scientific 1 (1997): 997.",
    ".. [10] Andersen, Erling D., et al. Implementation of interior point",
    "        methods for large scale linear programming. HEC/Universite de",
    "        Geneve, 1996.",
    ".. [11] Bartels, Richard H. \"A stabilization of the simplex method.\"",
    "        Journal in  Numerische Mathematik 16.5 (1971): 414-434.",
    ".. [12] Tomlin, J. A. \"On scaling linear programming problems.\"",
    "        Mathematical Programming Study 4 (1975): 146-166.",
    ".. [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"
  ],
  "qa": "scipy.optimize._linprog:linprog",
  "arbitrary": [],
  "local_refs": [
    "A_eq",
    "A_ub",
    "b_eq",
    "b_ub",
    "bounds",
    "c",
    "callback",
    "integrality",
    "method",
    "options",
    "res",
    "x0"
  ]
}