@@ -120,7 +120,7 @@ def linprog_simplex(c, A_ub=np.empty((0, 0)), b_ub=np.empty((0,)),
120
120
121
121
References
122
122
----------
123
- * K. C. Border, "The Gauss–Jordan and Simplex Algorithms, " 2004.
123
+ * K. C. Border, "The Gauss–Jordan and Simplex Algorithms" 2004.
124
124
125
125
"""
126
126
n , m , k = c .shape [0 ], A_ub .shape [0 ], A_eq .shape [0 ]
@@ -208,8 +208,8 @@ def _initialize_tableau(A_ub, b_ub, A_eq, b_eq, tableau, basis):
208
208
A_eq @ x == b_eq
209
209
x, s >= 0
210
210
211
- Then, let (z1, z2) be a vector of artificial variables for Phase 1:
212
- we solve the following LP:
211
+ Then, let (z1, z2) be a vector of artificial variables for Phase 1.
212
+ We solve the following LP:
213
213
214
214
maximize::
215
215
@@ -453,7 +453,7 @@ def _pivot_col(tableau, skip_aux, piv_options):
453
453
-------
454
454
found : bool
455
455
True iff there is a positive element in the last row of the
456
- tableau (and then pivotting should be conducted).
456
+ tableau (and then pivoting should be conducted).
457
457
458
458
pivcol : int
459
459
The index of column containing the pivot element. (-1 if `found
@@ -489,8 +489,7 @@ def get_solution(tableau, basis, x, lambd, b_signs):
489
489
where L=m+k.
490
490
491
491
basis : ndarray(int, ndim=1)
492
- Empty ndarray of shape (L,) to store the basic variables.
493
- Modified in place.
492
+ ndarray of shape (L,) containing the optimal basis.
494
493
495
494
x : ndarray(float, ndim=1)
496
495
Empty ndarray of shape (n,) to store the primal solution.
0 commit comments