CDDLib

CDDLib.jl is a wrapper for cddlib.

CDDLib.jl can be used with C API of cddlib, the higher level interface of Polyhedra.jl, or as a linear programming solver with JuMP or MathOptInterface.

Problem description

As written in the README of cddlib:

The C-library cddlib is a C implementation of the Double Description Method of Motzkin et al. for generating all vertices (that is, extreme points) and extreme rays of a general convex polyhedron in R^d given by a system of linear inequalities:

P = { x=(x1, ..., xd)^T :  b - A  x  >= 0 }

where A is a given m x d real matrix, b is a given m-vector and 0 is the m-vector of all zeros.

The program can be used for the reverse operation (that is, convex hull computation). This means that one can move back and forth between an inequality representation and a generator (that is, vertex and ray) representation of a polyhedron with cdd. Also, cdd can solve a linear programming problem, that is, a problem of maximizing and minimizing a linear function over P.

License

CDDLib.jl is licensed under the GPL v2 license.

The underlying solver, cddlib/cddlib is also licensed under the GPL v2 license.

Installation

Install CDDLib.jl using the Julia package manager:

import Pkg
Pkg.add("CDDLib")

Building the package will download binaries of cddlib that are provided by cddlib_jll.jl.

Use with JuMP

Use CDDLib.Optimizer{Float64} to use CDDLib.jl with JuMP:

using JuMP, CDDLib
model = Model(CDDLib.Optimizer{Float64})

When using CDDLib.jl with MathOptInterface, you can pass a different number type:

using MathOptInterface, CDDLib
model = CDDLib.Optimizer{Rational{BigInt}}()

Debugging

CDDLib.jl uses two global Boolean variables to enable debugging outputs: debug and log.

You can query the value of debug and log with get_debug and get_log, and set their values with set_debug and set_log.