The graphical method for solving the LPP is based on the construction of a convex polygon (simplex) that lies completely in the first quadrant. The initial approximation is the entire first quadrant, i.e. a triangle with vertices (0,0), (Inf, 0), (0, Inf), where Inf is infinity to be cut off.
The ideal variant for “cutting off” is an inequality of the form ax 1 + bx 2 <= c, (a> 0, b> 0, c> 0), which eliminates both singular vertices. In this case, there is no such inequality, but there is a first inequality (a 1 > 0, c 1 > 0), and the second inequality, which after multiplying by "-1" gives (b 2 > 0, c 2 > 0), and the point the intersections M (x, y) of the corresponding lines lie in the first quadrant. This means that a simplex with vertices (0,0), (c 1 / a 1 , 0), (x, y), (0, c 2 / a 2 ) is obtained . Vertices follow in a counterclockwise order, in the same order they should be stored.
Each new inequality will cut off on the simplex a group of adjacent points that do not satisfy it, and replace them with a couple of new ones. The algorithm is simple if the equations of the lines connecting it with the previous and subsequent ones are attached to each vertex and the cyclic order of the vertices is preserved.
If all vertices of the simplex are known, then the maximum of the objective function is reached in one of them. The starting point can be chosen from considerations of convenience of implementation, the direction of the bypass - in the direction of increasing the objective function. For any direction of the bypass, you can take the first local maximum.