Code a linear programming exercise by hand
I have been doing linear programming problems in my class by graphing them but I would like to know how to write a program for a particular problem to solve it for me. If there are too many variables or constraints I could never do this by graphing. Example problem, maximize 5x + 3y with constraints: 5x - 2y >= 0 x + y <= 7 x <= 5 x >= 0 y >= 0 I graphed this and got a visible region with 3 corners. x=5 y=2 is the optimal point. How do I turn this into code? I know of the simplex method. And very importantly, will all LP problems be coded in the same structure? Would brute force work? There