

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Linear Programming
incomplete
2: Profit Function
incomplete
3: Contour Lines
incomplete
4: Simplex Algorithm
incomplete
5: Simplex Algorithm for Solving LP Problems
incomplete
6: Tableau Review
incomplete
7: Simplex Tableau – Slack Variables
incomplete
8: Simplex Tableau – Slack Variables
incomplete
9: Simplex Tableau – Basic Variables and the Solution
incomplete
10: Tableau Solution
incomplete
11: Pivoting the Tableau – When to Stop
incomplete
12: Finding the Pivot Column
incomplete
13: Finding the Pivot Row
incomplete
14: Pivot Row Review
incomplete
15: The Pivot Operation
incomplete
16: Pivot Review
incomplete
17: Solving the Whole Simplex
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
When we get around to implementing the "pivot" operation you've heard so much about, we'll first need to know which element should be pivoted around. In order to do so, we'll need to find a pivot column and a pivot row.
Complete the get_pivot_col method. It should return the index of the column to be pivoted. The column to be pivoted is the column with the smallest negative value in the objective row, excluding the last element (the "profit" value).
Think about it: we're trying to maximize profit. In order to do so, we need to increase the values that are holding us back the most. If the smallest value in the objective row (excluding profit) is non-negative, then there is no column that should be pivoted, so return -1.