Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)\)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions

Question

Absence of disparate impact

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago