A profit that grows along a straight line must be largest at the edge of what is allowed. Use that idea to find the maximum or minimum of an objective function at the corner points. See why unbounded regions need an extra test, what happens when there is no feasible solution or many, and check each answer with scipy.
3 lessons, about 1 h 15 min3 simulations10 problems3 practice questionsPython in every lesson
The quantity we want as large or as small as possible is the objective function, such as the profit . The lines for different are parallel. As grows, the line slides across the feasible region, and the last point it touches is a corner. So on a bounded feasible region the maximum and the minimum of are found by working out at every corner point and comparing the values.
When the feasible region has no outer edge, the corner values alone do not prove an optimum. Take the best corner value M and draw the open half-plane that would beat it. If this half-plane has no point in common with the region, M is the optimum. If it has a common point, the optimum does not exist. For a cost on a region with rules, the minimum usually exists and the maximum does not.
Three special cases can happen. If the rules clash, the feasible region is empty, so there is no feasible solution. If the lines are parallel to an edge, the optimum is reached at both ends of that edge and at every point between them, so there are many optimal solutions. And on an unbounded region an optimum may not exist. The function linprog in scipy solves a problem and reports which case it found, so it checks a hand solution.
Log in to join the discussion.
Loading…