|
965 | 965 | "id": "c3684634", |
966 | 966 | "metadata": {}, |
967 | 967 | "source": [ |
968 | | - "### LP solution point\n", |
| 968 | + "## LP solution point - why is it always at an intersection of constraints?\n", |
969 | 969 | "\n", |
970 | 970 | "Aside from the solution point always being on the equality line, the LP solution point is always along one of the constraint lines (in this case, mostly the salt constraint). This is not a coincidence!\n", |
971 | 971 | "\n", |
972 | | - "The LP is trying to minimize cost, which moves in a linear manner as we showed a few plots ago. Another way to imagine this is that this objective function defines a 3-dimensional plane above the grid, because it is defined as a linear function of the two inputs. The plane does not change slope, so the LP solution will be at its \"lowest\" point, which will always lie at the intersection of some combination of constraints." |
| 972 | + "- The objective function in this case is *linear*, meaning that its slope will always be constant along any given direction in the x-y plane. \n", |
| 973 | + "- As we saw earlier, different values of the objective function will give us straight lines that are parallel (same slope), with different y-intercepts.\n", |
| 974 | + "- The LP will drive the system in the direction of maximum cost reduction. Since the objective function is linear, this will be orthogonal to the isoprofit/isocost lines.\n", |
| 975 | + "- Let's say that we choose any point $p$ strictly within the feasible region (not on a boundary):\n", |
| 976 | + " - Because $p$ is within the feasible region, there is still space to move past it in the cost-reducing direction.\n", |
| 977 | + " - Therefore eventually, we will reach some constraint. Since the objective function will have a constant slope along any given direction, moving along this constraint line will either increase or reduce our cost.\n", |
| 978 | + " - So, there is still move to reduce cost, but we will have to move along this constraint line.\n", |
| 979 | + " - Eventually, we will hit another constraint line, and will have no room to reduce cost further. Therefore, the solution for the LP will be at an intersection of two or more constraints.\n", |
| 980 | + " \n", |
| 981 | + " \n", |
| 982 | + "One way to imagine this is to picture a tray in the shape of the feasible region. If we place a marble in the box, then the marble will always roll towards one of the corners. This is because one of the corners will always be physically lower than the others. In this context, the \"tilt\" of the box is defined by our LP costs." |
| 983 | + ] |
| 984 | + }, |
| 985 | + { |
| 986 | + "cell_type": "markdown", |
| 987 | + "id": "9f119ea0", |
| 988 | + "metadata": {}, |
| 989 | + "source": [ |
| 990 | + "### What about Quadratic Programming (QP)?\n", |
| 991 | + "\n", |
| 992 | + "Our discussion here is all centered on the objective function being linear. If the objective function is not linear, as in a Quadratic Program, then our isoprofit/isocost lines will not be linear. The surface representing the objective function will not be a plane, rather it will be a paraboloid-shaped surface." |
973 | 993 | ] |
974 | 994 | }, |
975 | 995 | { |
|
0 commit comments