← Back
Editing: _linprog_rs.cpython-311.pyc
� d�cmZ � � � d Z ddlZddlmZ ddlmZ ddlmZ ddl m Z ddl mZ dd lm Z dd lmZ d� Zd� Zd � Zd� Zd� Zdd�Zd� Zd� Z dd�Z dd�ZdS )a[ Revised simplex method for linear programming The *revised simplex* method uses the method described in [1]_, except that a factorization [2]_ of the basis matrix, rather than its inverse, is efficiently maintained and used to solve the linear systems at each iteration of the algorithm. .. versionadded:: 1.3.0 References ---------- .. [1] Bertsimas, Dimitris, and J. Tsitsiklis. "Introduction to linear programming." Athena Scientific 1 (1997): 997. .. [2] Bartels, Richard H. "A stabilization of the simplex method." Journal in Numerische Mathematik 16.5 (1971): 414-434. � N)�LinAlgError)�solve� )�_check_unknown_options)�LU)�BGLU)� _postsolve)�OptimizeResultc �� � | j \ }}d} t | |||� � \ } }}}}} | dk r |� |� � }d}||| ||| |fS |}d}t || ||||||||| | ||� � \ }}} }|� |� � }| dk r||k rd} t j |t �� � }|||k D ]�}| dd�|f } t j t || � � � � }t j |dd�|f � � }t j |t �� � }d||||k <