The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

178 CHAPTER 14. PRIMAL FEASIBILITY REPAIR which is infeasible for any ɛ ≠ 0. Here the infeasibility is caused by a linear dependency in the constraint matrix and that the right-hand side does not match if ɛ ≠ 0. Observe even if the problem is feasible then just a tiny perturbation to the right-hand side will make the problem infeasible. Therefore, even though the problem can be repaired then a much more robust solution is to avoid problems with linear dependent constraints. Indeed if a problem contains linear dependencies then the problem is either infeasible or contains redundant constraints. In the above case any of the equality constraints can be removed while not changing the set of feasible solutions. To summarize linear dependencies in the constraints can give rise to infeasible problems and therefore it is better to avoid them. Note that most network flow models usually is formulated with one linear dependent constraint. Next consider the problem minimize subject to x 1 − 0.01x 2 = 0 x 2 − 0.01x 3 = 0 x 3 − 0.01x 4 = 0 x 1 ≥ − 1.0e − 9 x 1 ≤ 1.0e − 9 x 4 ≤ − 1.0e − 4 (14.2) Now the MOSEK presolve for the sake of efficiency fix variables (and constraints) that has tight bounds where tightness is controlled by the parameter dparam.presolve tol x. Since, the bounds −1.0e − 9 ≤ x 1 ≤ 1.0e − 9 are tight then the MOSEK presolve will fix variable x 1 at the mid point between the bounds i.e. at 0. It easy to see that this implies x 4 = 0 too which leads to the incorrect conclusion that the problem is infeasible. Observe tiny change of the size 1.0e-9 make the problem switch from feasible to infeasible. Such a problem is inherently unstable and is hard to solve. We normally call such a problem ill-posed. In general it is recommended to avoid ill-posed problems, but if that is not possible then one solution to this issue is is to reduce the parameter to say dparam.presolve tol x to say 1.0e-10. This will at least make sure that the presolve does not make the wrong conclusion. 14.2 Automatic repair In this section we will describe the idea behind a method that automatically can repair an infeasible probem. The main idea can be described as follows. Consider the linear optimization problem with m constraints and n variables which is assumed to be infeasible. minimize c T x + c f subject to l c ≤ Ax ≤ u c , l x ≤ x ≤ u x , (14.3)

14.2. AUTOMATIC REPAIR 179 One way of making the problem feasible is to reduce the lower bounds and increase the upper bounds. If the change is sufficiently large the problem becomes feasible. Now an obvious idea is to compute the optimal relaxation by solving an optimization problem. The problem minimize p(v c l , v c u, v x l , v x u) subject to l c ≤ Ax + v c l − v c u ≤ u c , l x ≤ x + v x l − v x u ≤ u x , v c l , v c u, v x l , v x u ≥ 0 (14.4) does exactly that. The additional variables (v c l ) i, (v c u) i , (v x l ) j and (v c u) j are elasticity variables because they allow a constraint to be violated and hence add some elasticity to the problem. For instance, the elasticity variable (v c l ) i controls how much the lower bound (l c ) i should be relaxed to make the problem feasible. Finally, the so-called penalty function p(vl c , vu, c vl x , vu) x is chosen so it penalize changes to bounds. Given the weights • wl c ∈ Rm (associated with l c ), • wu c ∈ R m (associated with u c ), • wl x ∈ R n (associated with l x ), • wu x ∈ R n (associated with u x ), then a natural choice is p(v c l , v c u, v x l , v x u) = (w c l ) T v c l + (w c u) T v c u + (w x l ) T v x l + (w x u) T v x u. (14.5) Hence, the penalty function p() is a weighted sum of the relaxation and therefore the problem (14.4) keeps the amount of relaxation at a minimum. Please observe that • the problem (14.6) is always feasible. • a negative weight implies problem (14.6) is unbounded. For this reason if the value of a weight is negative MOSEK fixes the associated elasticity variable to zero. Clearly, if one or more of the weights are negative may imply that it is not possible repair the problem. A simple choice of weights is to let them all to be 1, but of course that does not take into account that constraints may have different importance. 14.2.1 Caveats Observe if the infeasible problem

14.2. AUTOMATIC REPAIR 179<br />

One way of making the problem feasible is to reduce the lower bounds and increase the upper bounds.<br />

If the change is sufficiently large the problem becomes feasible. Now an obvious idea is to compute<br />

the optimal relaxation by solving an optimization problem. <strong>The</strong> problem<br />

minimize p(v c l , v c u, v x l , v x u)<br />

subject to l c ≤ Ax + v c l − v c u ≤ u c ,<br />

l x ≤ x + v x l − v x u ≤ u x ,<br />

v c l , v c u, v x l , v x u ≥ 0<br />

(14.4)<br />

does exactly that. <strong>The</strong> additional variables (v c l ) i, (v c u) i , (v x l ) j and (v c u) j are elasticity variables because<br />

they allow a constraint to be violated and hence add some elasticity to the problem. For instance,<br />

the elasticity variable (v c l ) i controls how much the lower bound (l c ) i should be relaxed to make the<br />

problem feasible. Finally, the so-called penalty function<br />

p(vl c , vu, c vl x , vu)<br />

x<br />

is chosen so it penalize changes to bounds. Given the weights<br />

• wl c ∈ Rm (associated with l c ),<br />

• wu c ∈ R m (associated with u c ),<br />

• wl x ∈ R n (associated with l x ),<br />

• wu x ∈ R n (associated with u x ),<br />

then a natural choice is<br />

p(v c l , v c u, v x l , v x u) = (w c l ) T v c l + (w c u) T v c u + (w x l ) T v x l + (w x u) T v x u. (14.5)<br />

Hence, the penalty function p() is a weighted sum of the relaxation and therefore the problem (14.4)<br />

keeps the amount of relaxation at a minimum. Please observe that<br />

• the problem (14.6) is always feasible.<br />

• a negative weight implies problem (14.6) is unbounded. For this reason if the value of a weight<br />

is negative <strong>MOSEK</strong> fixes the associated elasticity variable to zero. Clearly, if one or more of the<br />

weights are negative may imply that it is not possible repair the problem.<br />

A simple choice of weights is to let them all to be 1, but of course that does not take into account that<br />

constraints may have different importance.<br />

14.2.1 Caveats<br />

Observe if the infeasible problem

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!