%*****************************************************************************
% DSDP5:  Dual-Scaling Algorithm for Positive Semidefinite Programming
% Copyright (c) 2005 by
% S. J. Benson, Y. Ye
% Last modified: 05 Feb 2005
%*****************************************************************************
% [OPTIONS] = doptions;
%
% This script sets the default options for use in DSDP.
%
%   The OPTIONS structure may contain any of the following fields: 
%   Problem Formulation:  
%       r0 = multiple of the identity matrix added to the initial dual matrix.
%              S0 = C - A'(y0) + r0*I.  If r0 < 0, a dynamic selection will
%              be used.  Default value is usually very high(~1e12), but 
%              smaller numbers may significantly improve performance. IMPORTANT!
%              [default -1 (use dynamic strategy, usually very big)].
%       zbar = an upper bound for the dual solution. [default 1e+10]
%       penalty  = penalty parameter used to enforce feasibility (>0)
%              This parameter can significantly infuence performance.
%              It must be larger than the trace of X:
%              See STAT.tracex  [default 1e+8]
%       boundy = a bound for the dual variables y.  [default 1e+6].IMPORTANT!
%
%   Convergence:
%       gaptol = tolerance for duality gap as a fraction of the value of the 
%              objective functions  [default 1e-6]
%       maxit = maximum number of iterations allowed  [default 1000].
%       steptol = tolerance for stopping due to small steps [default 1e-2].
%       inftol = maximum dual infeasibility allow at solution. [default 1e-12]
%       dual_bound = a bound for the dual solution.  The solver stops when
%              a feasible dual iterate with an objective greater than this 
%              value is found.  [default 1e+10].
%
%   Printing
%       print = k, if want to display result in each k iteration, else = 0
%              [default 10].
%       logtime = 1, to profile DSDP subroutines, else = 0
%              [default 0]. Assumes proper compilation flags.
%       cc   = add this constant to the objective value (for display purposes only)
%
%   Other important options:
%       rho    = potential parameter as multiple of dimension.  Larger numbers
%                can make the algorithm go faster: [ >1, default: 3]
%                Try 5 or 10.
%       reuse = reuse Newton matrix this many times (at most) per iteration.  
%               Applications requiring few iterations(<60) should consider 
%               setting this paramter to 0 or 1.  [default ~4] 
%       mu0    = initial barrier parameter.  It must be positive.  Smaller
%               numbers may improve performance. [default -1 (dynamic strategy)]
%
%   Other less important options:
%       dyanamicrho = Use dynamic rho strategy to reduce barrier [default 1]
%       bigM  = if > 0,make infeasibility a positive variable with a 
%               cost in the objective.   [default 0]
%       maxtrustradius = maximum trust radius. Decrease to improve robustness 
%              [default 1e30]
%       lp_barrier = scale the barrier on LP cones by this amount. [default 1.0].
%*****************************************************************************
function [OPTIONS] = doptions();

OPTIONS.r0=-1;
OPTIONS.penalty=1e8;
OPTIONS.boundy=1e6;
OPTIONS.zbar=1e10;
OPTIONS.maxit=1000;
OPTIONS.gaptol=0.000001;
OPTIONS.print=10;
OPTIONS.dual_bound=1e10;
OPTIONS.bigM=0;
OPTIONS.inftol=1.0e-13;
OPTIONS.cc=0;
OPTIONS.steptol=1.0e-2;
OPTIONS.mu0=-1;
OPTIONS.maxtrustradius=1e30;
OPTIONS.logtime=0;
OPTIONS.dloginfo=0;
OPTIONS.dynamicrho=1;

