Plotting functions for linear JuMP models with exactly two variables.
The main function is plot_model(model)
, which takes a linear JuMP model with exactly two variables and returns a graphical representation of the model. This graphical representation consists of:
- The LP feasible region, using the Polyhedra package
- The affine constraints
$Ax=b$ - The integer feasible region, if one or both of the variables are integer/binary
- The objective level curve corresponding to the optimal solution, if the model has been solved and has a solution available
The implementation of the package has been split into functions corresponding to the four bullet points above, in order to make the code somewhat modular. The plot_model(model)
-function calls these four functions, resulting in the final plot.
Given a model
the resulting plot is