Question: Code for largest coefficient case This is the code you must complete. It needs to return the ( row , column ) indexes ( r

Code for largest coefficient case
This is the code you must complete.
It needs to return the (row, column) indexes (r,s) on which the Simplex method will pivot.
It needs to be fully and correctly documented.
def find_pivot_largest_coefficient(tableau):
return final_r, final_s
Tests
The following cells perform various tests on the function.
# The tableau for the optimal portfolio
tableau_op = np.array
0,-0.02,-0.03,0,0,0,
10,1,1,1,0,0,
7,1,0,0,1,0,
])
5,0,1,0,0,1
basis_op =np.array ([3,4,5])
# Check that the expected pivot is row 3, column 2.
# Note that for Bland's rule it is row 2, column 1.
assert find_pivot_largest_coefficient(tableau_op)==(3,2)This is the python question I need help with, but it must work for the test in the photo on the right. Code for largest coefficient case This is the code you must complete. It needs to return the indexes \((r, s)\) on which the Simplex method will pivot. It needs to be fully and correctly documented. def find_pivot_largest_coefficient(tableau): return final_r,final_s\# The tableau for the optimal portfolio tableau_op \(=\) np.array ([\[[0,-0.02,-0.03,0,0,0]\]\[[10,1,1,0,0],\]\[[7,1,0,1,0],\] basis_op = np.array \([[3,4,5])\)\# Check that the expected pivot is row 3, column 2,\# Note that for Bland's rule it is row 2, column 1. assert find_pivot_largest_coefficient(tableau_op)\(==(3,2)\)
 Code for largest coefficient case This is the code you must

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!