Interactive Linear Programming: Feasible Region and Optimum Point

Interactive Linear Programming: Feasible Region and Optimum Point
Loading the math board and drawing, please wait…
2020-09-09 05:24
This GeoGebra applet interactively demonstrates how a linear programming problem builds a feasible region from linear inequalities and how the objective function reaches its optimum (maximum/minimum) at a particular point of that region. It centers on key ideas of linear programming and linear optimization: constraint-induced half-planes, the polygonal feasible set, and geometric reasoning for finding the optimal value and location. The construction uses GeoGebra commands and elements reflected in the provided construct summary: Vertex to define key vertices of the feasible polygon, OrthogonalVector to create direction/normal relationships used for constraint boundaries, If to handle conditional logic during interaction, RemoveUndefined to clean up objects that may become invalid, Textfield to let users enter or vary parameters, and Max to compute the optimal objective value. The listed objects (e.g., points and line/constraint expressions) together support identifying the optimum among candidate corner points. Suitable for advanced high-school learners, contest preparation, and introductory college courses on optimization and applied mathematics where visual geometry helps explain algebraic linear programs.

GeoGebra Commands & Parameters

  1. Vertex(g_7) → N_1
  2. Vertex(g) → A, B, C, D, E, F, G, H, I, J
  3. Vertex(g_1) → K, L, M, N, O, P
  4. Vertex(g_2) → Q, R, S, T, U, V
  5. Vertex(g_4) → E_1, F_1, G_1
  6. Vertex(g_3) → W, Z, A_1, B_1, C_1, D_1
  7. Vertex(g_5) → H_1, I_1, J_1
  8. Vertex(g_6) → K_1, L_1, M_1
  9. If(Ineq1 ≟ true ∧ Ineq2 ≟ true ∧ Ineq3 ≟ true, {If[IsInRegion[A, g], A], If[IsInRegion[B, g] ∧ B ≠ A, B], If[IsInRegion[C, g] ∧ C ≠ A ∧ C ≠ B, C], If[IsInRegion[D, g] ∧ D ≠ A ∧ D ≠ B ∧ D ≠ C, D], If[IsInRegion[E, g] ∧ E ≠ A ∧ E ≠ B ∧ E ≠ C ∧ E ≠ D, E], If[IsInRegion[F, g] ∧ F ≠ A ∧ F ≠ B ∧ F ≠ C ∧ F ≠ D ∧ F ≠ E, F], If[IsInRegion[G, g] ∧ G ≠ A ∧ G ≠ B ∧ G ≠ C ∧ G ≠ D ∧ G ≠ E ∧ G ≠ F, G], If[IsInRegion[H, g] ∧ H ≠ A ∧ H ≠ B ∧ H ≠ C ∧ H ≠ D ∧ H ≠ E ∧ H ≠ (F * H) ≠ G, H], If[IsInRegion[I, g] ∧ I ≠ A ∧ I ≠ B ∧ I ≠ C ∧ I ≠ D ∧ I ≠ E ∧ I ≠ F ∧ I ≠ G ∧ I ≠ H, I], If[IsInRegion[J, g] ∧ J ≠ A ∧ J ≠ B ∧ J ≠ C ∧ J ≠ D ∧ J ≠ E ∧ J ≠ F ∧ J ≠ G ∧ J ≠ H ∧ J ≠ I, J]}, If[Ineq1 ≟ true ∧ Ineq2 ≟ true ∧ Ineq3 ≟ false, {If[IsInRegion[K, g_1], K], If[IsInRegion[L, g_1] ∧ L ≠ K, L], If[IsInRegion[M, g_1] ∧ M ≠ K ∧ M ≠ L, M], If[IsInRegion[N, g_1] ∧ N ≠ K ∧ N ≠ L ∧ N ≠ M, N], If[IsInRegion[O, g_1] ∧ O ≠ K ∧ O ≠ L ∧ O ≠ M ∧ O ≠ N, O], If[IsInRegion[P, g_1] ∧ P ≠ K ∧ P ≠ L ∧ P ≠ M ∧ P ≠ N ∧ P ≠ O, P]}, If[Ineq1 ≟ true ∧ Ineq2 ≟ false ∧ Ineq3 ≟ true, {If[IsInRegion[Q, g_2], Q], If[IsInRegion[R, g_2] ∧ R ≠ Q, R], If[IsInRegion[S, g_2] ∧ S ≠ Q ∧ S ≠ R, S], If[IsInRegion[T, g_2] ∧ T ≠ Q ∧ T ≠ R ∧ T ≠ S, T], If[IsInRegion[U, g_2] ∧ U ≠ Q ∧ U ≠ R ∧ U ≠ S ∧ U ≠ T, U], If[IsInRegion[V, g_2] ∧ V ≠ Q ∧ V ≠ R ∧ V ≠ S ∧ V ≠ T ∧ V ≠ U, V]}, If[Ineq1 ≟ false ∧ Ineq2 ≟ true ∧ Ineq3 ≟ true, {If[IsInRegion[W, g_3], W], If[IsInRegion[Z, g_3] ∧ Z ≠ W, Z], If[IsInRegion[A_1, g_3] ∧ A_1 ≠ W ∧ A_1 ≠ Z, A_1], If[IsInRegion[B_1, g_3] ∧ B_1 ≠ W ∧ B_1 ≠ Z ∧ B_1 ≠ A_1, B_1], If[IsInRegion[C_1, g_3] ∧ C_1 ≠ W ∧ C_1 ≠ Z ∧ C_1 ≠ A_1 ∧ C_1 ≠ B_1, C_1], If[IsInRegion[D_1, g_3] ∧ D_1 ≠ W ∧ D_1 ≠ Z ∧ D_1 ≠ A_1 ∧ D_1 ≠ B_1 ∧ D_1 ≠ C_1, D_1]}, If[Ineq1 ≟ true ∧ Ineq2 ≟ false ∧ Ineq3 ≟ false, {If[IsInRegion[E_1, g_4], E_1], If[IsInRegion[F_1, g_4] ∧ F_1 ≠ E_1, F_1], If[IsInRegion[G_1, g_4] ∧ G_1 ≠ E_1 ∧ G_1 ≠ F_1, G_1]}, If[Ineq1 ≟ false ∧ Ineq2 ≟ true ∧ Ineq3 ≟ false, {If[IsInRegion[H_1, g_5], H_1], If[IsInRegion[I_1, g_5] ∧ I_1 ≠ H_1, I_1], If[IsInRegion[J_1, g_5] ∧ J_1 ≠ H_1 ∧ J_1 ≠ I_1, J_1]}, If[Ineq1 ≟ false ∧ Ineq2 ≟ false ∧ Ineq3 ≟ true, {If[IsInRegion[K_1, g_6], K_1], If[IsInRegion[L_1, g_6] ∧ L_1 ≠ K_1, L_1], If[IsInRegion[M_1, g_6] ∧ M_1 ≠ K_1 ∧ M_1 ≠ L_1, M_1]}, If[Ineq1 ≟ false ∧ Ineq2 ≟ false ∧ Ineq3 ≟ false, {If[IsInRegion[N_1, g_7], N_1]}]]]]]]]) → l1
  10. RemoveUndefined(l1) → l2
  11. Textfield(a) → InputBox5
  12. Textfield(b) → InputBox6
  13. Textfield(c) → InputBox7
  14. Textfield(d) → InputBox10
  15. Textfield(e) → InputBox11
  16. Textfield(f) → InputBox12
  17. OrthogonalVector(l) → u
  18. If(A4(1) > A4(2) ∧ A4(1) > A4(3) ∧ A4(1) > A4(4) ∧ A4(1) > A4(5), A4(1), If[A4(2) > A4(1) ∧ A4(2) > A4(3) ∧ A4(2) > A4(4) ∧ A4(2) > A4(5), A4(2), If[A4(3) > A4(1) ∧ A4(3) > A4(2) ∧ A4(3) > A4(4) ∧ A4(3) > A4(5), A4(3), If[A4(4) > A4(1) ∧ A4(4) > A4(2) ∧ A4(4) > A4(3) ∧ A4(4) > A4(5), A4(4), If[A4(5) > A4(1) ∧ A4(5) > A4(2) ∧ A4(5) > A4(3) ∧ A4(5) > A4(4), A4(5), If[A4(1) > A4(2) ∧ A4(1) > A4(3) ∧ A4(1) > A4(4), A4(1), If[A4(2) > A4(1) ∧ A4(2) > A4(3) ∧ A4(2) > A4(4), A4(2), If[A4(3) > A4(1) ∧ A4(3) > A4(2) ∧ A4(3) > A4(4), A4(3), If[A4(4) > A4(1) ∧ A4(4) > A4(2) ∧ A4(4) > A4(3), A4(4), If[A4(1) > A4(2) ∧ A4(1) > A4(3), A4(1), If[A4(2) > A4(1) ∧ A4(2) > A4(3), A4(2), If[A4(3) > A4(1) ∧ A4(3) > A4(2), A4(3), If[A4(1) > A4(2), A4(1), If[A4(2) > A4(1), A4(2), A4(1)]]]]]]]]]]]]]) → Max
  19. Max(A4) → h
  20. If(A4(1) < A4(2) ∧ A4(1) < A4(3) ∧ A4(1) < A4(4) ∧ A4(1) < A4(5), A4(1), If[A4(2) < A4(1) ∧ A4(2) < A4(3) ∧ A4(2) < A4(4) ∧ A4(2) < A4(5), A4(2), If[A4(3) < A4(1) ∧ A4(3) < A4(2) ∧ A4(3) < A4(4) ∧ A4(3) < A4(5), A4(3), If[A4(4) < A4(1) ∧ A4(4) < A4(2) ∧ A4(4) < A4(3) ∧ A4(4) < A4(5), A4(4), If[A4(5) < A4(1) ∧ A4(5) < A4(2) ∧ A4(5) < A4(3) ∧ A4(5) < A4(4), A4(5), If[A4(1) < A4(2) ∧ A4(1) < A4(3) ∧ A4(1) < A4(4), A4(1), If[A4(2) < A4(1) ∧ A4(2) < A4(3) ∧ A4(2) < A4(4), A4(2), If[A4(3) < A4(1) ∧ A4(3) < A4(2) ∧ A4(3) < A4(4), A4(3), If[A4(4) < A4(1) ∧ A4(4) < A4(2) ∧ A4(4) < A4(3), A4(4), If[A4(1) < A4(2) ∧ A4(1) < A4(3), A4(1), If[A4(2) < A4(1) ∧ A4(2) < A4(3), A4(2), If[A4(3) < A4(1) ∧ A4(3) < A4(2), A4(3), If[A4(1) < A4(2), A4(1), If[A4(2) < A4(1), A4(2), A4(1)]]]]]]]]]]]]]) → Min
  21. If(Opt ≟ 1 ∧ Max ≟ A4(1) ≟ A4(2), "Segment " + ((((A2(1) * " - ") * A2(2)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(1) ≟ A4(3), "Segment " + ((((A2(1) * " - ") * A2(3)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(1) ≟ A4(4), "Segment " + ((((A2(1) * " - ") * A2(4)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(1) ≟ A4(5), "Segment " + ((((A2(1) * " - ") * A2(5)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(2) ≟ A4(3), "Segment " + ((((A2(2) * " - ") * A2(3)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(2) ≟ A4(4), "Segment " + ((((A2(2) * " - ") * A2(4)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(2) ≟ A4(5), "Segment " + ((((A2(2) * " - ") * A2(5)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(3) ≟ A4(4), "Segment " + ((((A2(3) * " - ") * A2(4)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(3) ≟ A4(5), "Segment " + ((((A2(3) * " - ") * A2(5)) * ": ")) + Max, If[Opt ≟ 1 ∧ Max ≟ A4(4) ≟ A4(5), "Segment " + ((((A2(4) * " - ") * A2(5)) * ": ")) + Max, If[Opt ≟ 0 ∧ Min ≟ A4(1) ≟ A4(2), "Segment " + ((((A2(1) * " - ") * A2(2)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(1) ≟ A4(3), "Segment " + ((((A2(1) * " - ") * A2(3)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(1) ≟ A4(4), "Segment " + ((((A2(1) * " - ") * A2(4)) * ": ")) + Min, If[Opt ≟ 0 ∧ Max ≟ A4(1) ≟ A4(5), "Segment " + ((((A2(1) * " - ") * A2(5)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(2) ≟ A4(3), "Segment " + ((((A2(2) * " - ") * A2(3)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(2) ≟ A4(4), "Segment " + ((((A2(2) * " - ") * A2(4)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(2) ≟ A4(5), "Segment " + ((((A2(2) * " - ") * A2(5)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(3) ≟ A4(4), "Segment " + ((((A2(3) * " - ") * A2(4)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(3) ≟ A4(5), "Segment " + ((((A2(3) * " - ") * A2(5)) * ": ")) + Min, If[Opt ≟ 0 ∧ Min ≟ A4(4) ≟ A4(5), "Segment " + ((((A2(4) * " - ") * A2(5)) * ": ")) + Min, If[Opt ≟ 1 ∧ Max ≟ A4(1), (A2(1) * ": ") + Max, If[Opt ≟ 1 ∧ Max ≟ A4(2), (A2(2) * ": ") + Max, If[Opt ≟ 1 ∧ Max ≟ A4(3), (A2(3) * ": ") + Max, If[Opt ≟ 1 ∧ Max ≟ A4(4), (A2(4) * ": ") + Max, If[Opt ≟ 1 ∧ Max ≟ A4(5), (A2(5) * ": ") + Max, If[Opt ≟ 0 ∧ Min ≟ A4(1), (A2(1) * ": ") + Min, If[Opt ≟ 0 ∧ Min ≟ A4(2), (A2(2) * ": ") + Min, If[Opt ≟ 0 ∧ Min ≟ A4(3), (A2(3) * ": ") + Min, If[Opt ≟ 0 ∧ Min ≟ A4(4), (A2(4) * ": ") + Min, If[Opt ≟ 0 ∧ Min ≟ A4(5), (A2(5) * ": ") + Min]]]]]]]]]]]]]]]]]]]]]]]]]]]]]) → A6

AI Drawing Prompt Reference

Draw a feasible region and optimal solution for a linear programming problem. First, draw the half-planes defined by three linear inequalities to form a polygonal feasible region. Then, identify the vertices of this polygon, labeled A to J. Next, based on the user-input coefficients of the linear objective function, calculate the optimal solution location and find the optimal point within the feasible region. Finally, show the trend of the objective function within the feasible region.
The prompt above was compiled from the original drawing commands and is for reference only.