Polytopesimplifier¶
- class ConvexProgram(Aeq, beq, c, df, ddf, barrier)[source]¶
Convex Program is given by min <c,x> + sum f_i(x_i) subject Ax = b, x_i in K_i given that such block K_i is a strictly convex set
- ConvexProgram(Aeq, beq, c, df, ddf, barrier)[source]¶
o = ConvexProgram(Aeq, beq, c, df, ddf, barrier) Output a ConvexProgram representing the linear program min <c,x> + sum f_i(x_i) subject Aeq x = beq, barrier(x) < inf
- static LinearProgram(Aeq, beq, c, lb, ub)[source]¶
o = LinearProgram(Aeq, beq, c, lb, ub) Output a ConvexProgram representing the linear program min <c,x> subject Aeq x = beq, lb <= x <= ub
- collapse(x, blocks)[source]¶
Collapse the domain on the blocks to boundaries closest to x Return okay = 1 if the collapse is successful Return okay = 0 if the rows are not inconsistenc (infeasible).
- distance(o, x, v)[source]¶
t = o.distance(x) Output the distance of x with its closest boundary for each block Any negative entries implies infeasible
t = o.distance(x, v) Output the maximum step from x with direction v for each coordinate (The maximum step may not reach the boundary.)
- findInterior(o)[source]¶
x = o.findInterior() Find an interior point of the convex set using analytic center return NaN if the set is empty
- class TwoSidedBarrier(lb, ub, vdim)[source]¶
The log barrier for the domain {lu <= x <= ub}: phi(x) = - sum log(x - lb) - sum log(ub - x).
- boundary(o, x)[source]¶
[A, b] = o.boundary(x) Output the normal at the boundary around x for each barrier. Assume: only 1 vector is given
- boundary_distance(o, x)[source]¶
v = o.boundary_distance(x) Output the distance of x with its closest boundary for each coordinate
- logdet_gradient(o, x)[source]¶
v = o.logdet_gradient(x) Output the gradient of log det (hess phi(x)) which is (hess phi(x))^-1 (grad hess phi (x))
- quadratic_form_gradient(o, x, u)[source]¶
v = o.quadratic_form_gradient(x, u) Output the -grad of u’ (hess phi(x)) u.
- analyticCenter(f, x, opts)[source]¶
x = analyticCenter(f, opts, x) compute the analytic center for the domain {Ax=b} intersect the domain of f
- Input
f - a ConvexProgram
x - a feasible initial point (optional)
opts - a structure for options with the following properties (optional) – MaxIter - maximum number of iterations Output - maximum number of iterations CentralityTol, FeasibilityTol - stop the following are satisfied
||(A’ * lambda - grad f(x)) / sqrt(hess)||_inf < CentralityTol ||A x - b||_inf < FeasibilityTol
- CollapseDistanceTol -
if x_i is CollapseDistanceTol close to some boundary, we assume the block i is tight.
SolverIter - the number of iteration in solving linear systems VectorType - the class we use for x (@double, @ddouble, @qdouble)
- Output
x - It outputs the analytic center of f
info - a structure containing centrality, feasibility and iter.
f - the problem f will be modified as we discover collapsed subspace
- lewisCenter(f, x, opts)[source]¶
x = LewisCenter(f, opts, x) compute the analytic center for the domain {Ax=b} intersect the domain of f
- Input
f - a ConvexProgram
x - a feasible initial point
opts - a structure for options with the following properties (optional) – MaxIter - maximum number of iterations Output - maximum number of iterations CentralityTol, FeasibilityTol - stop the following are satisfied
||(A’ * lambda - grad f(x)) / sqrt(hess)||_inf < CentralityTol ||A x - b||_inf < FeasibilityTol
p - the parameter for lp Lewis weight JLDim - the number of dimensions used in estimating leverage score
- Output
x - It outputs the analytic center of f
info - a structure containing centrality, feasibility and iter.