Optimization

Optimization

A polyhedron can represents the feasible set of an optimization program. The program is infeasible when the polyhedron is empty.

Base.isemptyFunction.
isempty(p::Rep, solver::MathProgBase.AbstractMathProgSolver=Polyhedra.solver(p))

Check whether the polyhedron p is empty by using the solver solver.

linprog(c::AbstractVector, p::Rep, solver::MathProgBase.AbstractMathProgSolver=Polyhedra.solver(p))

Solve the minimization of the objective $\langle c, x \rangle$ over the polyhedron p.

If the V-representation of the polyhedron has been computed, it can be used to solve the linear program.

VRepSolver

Linear Programming solver using the V-representation of the feasible set to find the optimal solution.

Otherwise, any programming solver implementing the MathProgBase interface can be used. See here for a list of available solvers.

default_solver(p::Rep)

Returns a default linear programming solver for the polyhedron p (e.g. CDD has an internal solver which is used by default).

Polyhedra.solverFunction.
solver(p::Rep, solver::MathProgBase.AbstractMathProgSolver=default_solver(p))

If the V-representation of p has been computed, returns VRepSolver(), otherwise, returns solver.

Creating a polyhedron from the feasible set of a JuMP model

A typical application of polyhedral computation is the computation of the set of extreme points and rays of the feasible set of an optimization problem. This comes from the fact that given a minimization of a concave function (or maximization of a convex function) on a convex feasible set (e.g. Linear Programming), we are either in the following three situations:

A JuMP model is treated by polyhedron just like any H-representation. For example, the hypercube of dimension n can be created as follows

m = Model()
@variable(m, 0 ≤ x[1:n] ≤ 1)

poly = polyhedron(m, CDDLib.Library(:exact))

In fact, the MathProgBase representation of the feasible set of a linear program:

\[\begin{align*} lb \leq Ax \leq ub\\ l \leq x \leq u\\ \end{align*}\]

has LPHRepresentation as a corresponding H-representation. A JuMP model can be converted to this representation using LPHRepresentation(m).