Polyhedrons
Creating polyhedron a Polyhedron Object The function takes a list of lists L:=[L_1, L_2, ...] where each L_j represents an inequality and returns the polyhedron defined by them. For example the j'th entry L_j = [c_j,a_{j1},a_{j2},...,a_{jn}] corresponds to the inequality c_j+\sum_{i=1}^n a_{ji}x_i \geq 0. a Polyhedron Object The input is a polytope P and a cone C. The output is the polyhedron defined by the Minkowski sum P+C. a Polyhedron Object The input is a list L and a cone C. The output is the polyhedron defined by the Minkowski sum P+C where P is the polytope, i.e., the convex hull, defined by the points L. a Polyhedron Object The input is a polytope P and a list L. The output is the polyhedron defined by the Minkowski sum P+C where C is the cone defined by the rays L. a Polyhedron Object The input is a list P and a list C. The output is the polyhedron defined by the Minkowski sum of the polytope defined by P and the cone defined by C.
Attributes cdd Object Converts the polyhedron to a cdd object. The operations of CddInterface can then be applied on this convex object. normaliz Object Converts the polyhedron to an normaliz object. The operations of NormalizInterface can then be applied on this convex object. a list Returns the Defining inequalities of the given polyhedron. a Polytope Object Returns the main rational polytope of the polyhedron. a Polytope Object Returns the main integral polytope of the given polyhedron. a list Returns the vertices of the main rational polytope of the polyhedron. a list Returns the vertices of the main integral polytope of the given polyhedron. a Cone Object Returns the tail cone of the polyhedron. a list Returns the Ray Generators of the tail cone. a list Returns the integral lattice generators of the polyhedron. The output is a list L of length 3. Any integral point in polyhedron can be written as a+mb+nc, where a\in L[1],b\in L[2],c\in L[3], m\geq 0. a list Returns a basis to the lineality space of the polyhedron. I.e., a basis to the vector space that is contained in P. a list Returns a list whose i'th entry is the number of faces of dimension i-1.
Properties true or false The input is a polyhedron P and the output is whether it is bounded or not. true or false The input is a polyhedron P and the output is whether its tail cone is pointed or not. <#Include Label="example3">
Solving Linear programs The problem of solving linear programs can be solved in the gap package CddInterface, which is required by NConvex. a list or fail The input is a polyhedron P, a string max_or_min \in {"max", "min"} and an objective function target_func, which we want to maximize or minimize. If the linear program has an optimal solution, the operation returns a list of two entries, the solution vector and the optimal value of the objective function, otherwise it returns fail. a list or fail The input is a polytope P, a string max_or_min \in {"max","min"} and an objective function target_func, which we want to maximize or minimize. If the linear program has an optimal solution, the operation returns a list of two entries, the solution vector and the optimal value of the objective function, otherwise it returns fail. <#Include Label="linear_program">
ZSolve a list of three matrices This function produces a basis of the system eqs = eqs_rhs and ineqs >= ineqs_rhs. It outputs a list containing three matrices. The first one is a list of points in a polytope, the second is the hilbert basis of a cone. The set of solutions is then the minkowski sum of the polytope generated by the points in the first list and the cone generated by the hilbert basis in the second matrix. The third one is the free part of the solution polyhedron. The optional argument signs must be a list of zeros and ones which length is the number of variables. If the ith entry is one, the ith variable must be >= 0. If the entry is 0, the number is arbitraty. Default is all zero. <#Include Label="zsolve">