Home > source > @penlab > feas_ay.m

feas_ay

PURPOSE ^

Compute feasibility of the matrix constraints (A) and matrix variables (Y)

SYNOPSIS ^

function [mfeas] = feas_ay(obj)

DESCRIPTION ^

 Compute feasibility of the matrix constraints (A) and matrix variables (Y)
 Note that only these in pen/bar (non-strict treatment) are considered
 because these in the strict barrier are feasible by design.
 (This routine is called only during computation so any point must be 
 feasibile with respect to constraints in log-barrier. Similarly, it cannot 
 be more infeasible than the matrix penalty parameter.)
 TODO
 Suggested but not implemented...
   nFast = 0 ... no speed up; if infeasible, go back with perturbation
       to compute the feasibility up to PRECISION
   nFast = 1 ... if infeasible, stop on first infeasible matrix constr.
       and don't go back (==> the (in)feasibility is overestimated
       up to SCALEUP factor times for this constraint and the other
       are not checked --> could be even worse)
   nFast = 2 ... if infeasible, don't go back with the perturbation
       but at least check all the constraints that there is nothing
       worse

   how to make pstart&ptol dynamic to save some time...
     + allow how to refine it-if it looks big, tolerance 1e-10 is time wasting
   add changing order? start with the worst one from the last step??

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Compute feasibility of the matrix constraints (A) and matrix variables (Y)
0002 % Note that only these in pen/bar (non-strict treatment) are considered
0003 % because these in the strict barrier are feasible by design.
0004 % (This routine is called only during computation so any point must be
0005 % feasibile with respect to constraints in log-barrier. Similarly, it cannot
0006 % be more infeasible than the matrix penalty parameter.)
0007 % TODO
0008 % Suggested but not implemented...
0009 %   nFast = 0 ... no speed up; if infeasible, go back with perturbation
0010 %       to compute the feasibility up to PRECISION
0011 %   nFast = 1 ... if infeasible, stop on first infeasible matrix constr.
0012 %       and don't go back (==> the (in)feasibility is overestimated
0013 %       up to SCALEUP factor times for this constraint and the other
0014 %       are not checked --> could be even worse)
0015 %   nFast = 2 ... if infeasible, don't go back with the perturbation
0016 %       but at least check all the constraints that there is nothing
0017 %       worse
0018 %
0019 %   how to make pstart&ptol dynamic to save some time...
0020 %     + allow how to refine it-if it looks big, tolerance 1e-10 is time wasting
0021 %   add changing order? start with the worst one from the last step??
0022 %
0023 function [mfeas] = feas_ay(obj)
0024 
0025   mfeas=0;
0026   pstart=1e-10;
0027   pstop=1e-7;
0028 
0029   % check only pen/bar; strict barrier must be feasible by design
0030   for k=obj.Yboxindphi
0031 
0032     pkx=obj.PYbox(k);            %2*p(sdpdata.Ng+k);
0033     Ykx = obj.Y{obj.Yboxmap(k)};
0034     M=obj.Yboxshift(k)*speye(size(Ykx)) + obj.Yboxmlt(k)*Ykx;
0035     % so far negative definite ... feasm is posdef checker
0036     %mfeas = feasm(-M, mfeas, Inf, pstart, pstop);
0037     mfeas = feasm(-M, mfeas, pkx, pstart, pstop);
0038   end
0039 
0040   for k=obj.Aindphi
0041 
0042     pkx=obj.PA(k);  % I used to use 2*         !!!!!!!!
0043     % TODO need to map the matrix first! - is it correct???
0044     kuser=obj.Amap(k);
0045     [Akuserx, obj.userdata] = obj.mconfun(obj.x, obj.Y, kuser, obj.userdata);
0046     M = obj.Ashift(k)*speye(size(Akuserx)) + obj.Amlt(k) .* Akuserx;
0047     %mfeas = feasm(-M, mfeas, Inf, pstart, pstop);
0048     mfeas = feasm(-M, mfeas, pkx, pstart, pstop);
0049   end
0050 
0051 
0052 end
0053 
0054

Generated on Mon 26-Aug-2019 10:22:08 by m2html © 2005