SCIP-SDP  3.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
relax_sdp.c File Reference

SDP-relaxator. More...

Go to the source code of this file.

Macros

#define SLATERSOLVED_ABSOLUTE   /* uncomment this to return the absolute number of nodes for, e.g., solved fast with slater in addition to percentages */
 
#define RELAX_NAME   "SDP"
 
#define RELAX_DESC   "SDP-relaxator"
 
#define RELAX_PRIORITY   1
 
#define RELAX_FREQ   1
 
#define DEFAULT_PENALTYPARAM   -1.0
 
#define DEFAULT_LAMBDASTAR   -1.0
 
#define DEFAULT_MAXPENALTYPARAM   -1.0
 
#define DEFAULT_WARMSTARTIPFACTOR   0.50
 
#define DEFAULT_WARMSTARTPRIMALTYPE   3
 
#define DEFAULT_WARMSTARTIPTYPE   1
 
#define DEFAULT_WARMSTARTPROJECT   2
 
#define DEFAULT_WARMSTARTPROJMINEV   -1
 
#define DEFAULT_WARMSTARTPROJPDSAME   TRUE
 
#define DEFAULT_WARMSTART_PREOPTIMAL_SOL   FALSE
 
#define DEFAULT_WARMSTARTPREOPTGAP   1e-2
 
#define DEFAULT_WARMSTARTROUNDONLYINF   FALSE
 
#define DEFAULT_SLATERCHECK   0
 
#define DEFAULT_OBJLIMIT   FALSE
 
#define DEFAULT_RESOLVE   TRUE
 
#define DEFAULT_TIGHTENVB   TRUE
 
#define DEFAULT_SDPINFO   FALSE
 
#define DEFAULT_WARMSTART   FALSE
 
#define DEFAULT_DISPLAYSTAT   FALSE
 
#define DEFAULT_SETTINGSRESETFREQ   -1
 
#define DEFAULT_SETTINGSRESETOFS   0
 
#define DEFAULT_SDPSOLVERTHREADS   -1
 
#define WARMSTART_MINVAL   0.01
 
#define WARMSTART_PROJ_MINRHSOBJ   1
 
#define WARMSTART_PROJ_FACTOR   0.1
 
#define WARMSTART_PROJ_FACTOR_LHS   10
 
#define WARMSTART_PROJ_FACTOR_PRIMAL   0.1
 
#define WARMSTART_PROJ_FACTOR_DUAL   0.1
 
#define WARMSTART_PREOPT_MIN_Z_LPVAL   0.01
 
#define TIMEOFDAY_CALL(x)
 

Functions

static SCIP_RETCODE expandSparseMatrix (int nnonz, int blocksize, int *row, int *col, SCIP_Real *val, SCIP_Real *fullmat)
 
static SCIP_RETCODE scaleTransposedMatrix (int blocksize, SCIP_Real *matrix, SCIP_Real *scale)
 
static SCIP_RETCODE putSdpDataInInterface (SCIP *scip, SCIP_SDPI *sdpi, SdpVarmapper *varmapper, SCIP_Bool primalobj, SCIP_Bool boundprimal)
 
static SCIP_RETCODE putLpDataInInterface (SCIP *scip, SCIP_SDPI *sdpi, SdpVarmapper *varmapper, SCIP_Bool primalobj, SCIP_Bool dualobj)
 
static SCIP_RETCODE calcRelax (SCIP *scip, SCIP_RELAXDATA *relaxdata, SCIP_RESULT *result, SCIP_Real *lowerbound)
 
static SCIP_Bool allVarsFixed (SCIP *scip)
 
static SCIP_DECL_RELAXEXEC (relaxExecSdp)
 
static SCIP_DECL_RELAXINITSOL (relaxInitSolSdp)
 
static SCIP_DECL_RELAXCOPY (relaxCopySdp)
 
static SCIP_DECL_RELAXEXIT (relaxExitSdp)
 
static SCIP_DECL_RELAXFREE (relaxFreeSdp)
 
SCIP_RETCODE SCIPincludeRelaxSdp (SCIP *scip)
 
SCIP_RETCODE SCIPrelaxSdpComputeAnalyticCenters (SCIP *scip, SCIP_RELAX *relax)
 
SCIP_RETCODE SCIPrelaxSdpGetPrimalBoundVars (SCIP_RELAX *relax, SCIP_Real *lbvars, SCIP_Real *ubvars, int *arraylength)
 
SCIP_RETCODE SCIPrelaxSdpRelaxVal (SCIP_RELAX *relax, SCIP_Bool *success, SCIP_Real *objval)
 
SCIP_RETCODE SCIPrelaxSdpGetRelaxSol (SCIP *scip, SCIP_RELAX *relax, SCIP_Bool *success, SCIP_Real *solarray, int *sollength)
 
long int SCIPrelaxSdpGetSdpNode (SCIP_RELAX *relax)
 
SCIP_Bool SCIPrelaxSdpSolvedOrig (SCIP_RELAX *relax)
 
SCIP_Bool SCIPrelaxSdpSolvedProbing (SCIP_RELAX *relax)
 
SCIP_Bool SCIPrelaxSdpIsFeasible (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNIterations (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpCalls (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpInterfaceCalls (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpFast (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpMedium (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpStable (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpPenalty (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSdpUnsolved (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNdualSlaterHolds (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNdualSlaterFails (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNdualSlaterInfeasible (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNdualSlaterUnknown (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNprimalSlaterHolds (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNprimalSlaterFails (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNprimalSlaterUnknown (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHolds (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHoldsFast (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHoldsStable (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHoldsPenalty (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHoldsBounded (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterHoldsUnsolved (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFails (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFailsFast (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFailsStable (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFailsPenalty (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFailsBounded (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterFailsUnsolved (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterInfeasibleFast (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterInfeasibleStable (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterInfeasiblePenalty (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterInfeasibleBounded (SCIP_RELAX *relax)
 
int SCIPrelaxSdpGetNSlaterInfeasibleUnsolved (SCIP_RELAX *relax)
 

Detailed Description

SDP-relaxator.

Author
Sonja Mars
Tristan Gally

Definition in file relax_sdp.c.

Macro Definition Documentation

#define SLATERSOLVED_ABSOLUTE   /* uncomment this to return the absolute number of nodes for, e.g., solved fast with slater in addition to percentages */

Definition at line 45 of file relax_sdp.c.

#define RELAX_NAME   "SDP"

Definition at line 64 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXCOPY(), and SCIPincludeRelaxSdp().

#define RELAX_DESC   "SDP-relaxator"

Definition at line 65 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define RELAX_PRIORITY   1

Definition at line 66 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define RELAX_FREQ   1

Definition at line 67 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_PENALTYPARAM   -1.0

the penalty parameter Gamma used for the penalty formulation if the SDP solver didn't converge

Definition at line 70 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_LAMBDASTAR   -1.0

the parameter lambda star used by SDPA to set the initial point

Definition at line 71 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_MAXPENALTYPARAM   -1.0

the penalty parameter Gamma used for the penalty formulation if the SDP solver didn't converge

Definition at line 72 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTIPFACTOR   0.50

factor for interior point in convexcombination of IP and parent solution, if warmstarts are enabled

Definition at line 73 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTPRIMALTYPE   3

how to warmstart the primal problem? 1: scaled identity, 2: elementwise reciprocal, 3: saved primal sol

Definition at line 74 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTIPTYPE   1

which interior point to use for convex combination for warmstarts? 1: scaled identity, 2: analytic center

Definition at line 75 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTPROJECT   2

how to update dual matrix for new bounds? 1: use old bounds, 2: use new bounds, 3: use new bounds and project on psd cone, 4: use new bounds and solve rounding problem

Definition at line 76 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTPROJMINEV   -1

minimum eigenvector to allow when projecting onto the positive (semi-)definite cone

Definition at line 77 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTPROJPDSAME   TRUE

Should one shared minimum eigenvalue be computed for primal and dual problem instead of different ones if warmstartpmevpar = -1 ?

Definition at line 78 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTART_PREOPTIMAL_SOL   FALSE

Should a preoptimal solution (with larger gap) instead of the optimal solution be used for warmstarts (currently only implemented fo DSDP)

Definition at line 79 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTPREOPTGAP   1e-2

If warmstartpreoptimalsol is TRUE, this is the gap where the preoptimal solution is saved (currently only implemented fo DSDP)

Definition at line 80 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTARTROUNDONLYINF   FALSE

Only use solution of roundingproblem to detect infeasibility (only has an effect for warmstartproject = 4)

Definition at line 81 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_SLATERCHECK   0

Should the Slater condition be checked ?

Definition at line 82 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_OBJLIMIT   FALSE

Should an objective limit be given to the SDP-Solver ?

Definition at line 83 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_RESOLVE   TRUE

Are we allowed to solve the relaxation of a single node multiple times in a row (outside of probing) ?

Definition at line 84 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_TIGHTENVB   TRUE

Should Big-Ms in varbound-like constraints be tightened before giving them to the SDP-solver ?

Definition at line 85 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_SDPINFO   FALSE

Should the SDP solver output information to the screen?

Definition at line 86 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_WARMSTART   FALSE

Should the SDP solver try to use warmstarts?

Definition at line 87 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_DISPLAYSTAT   FALSE

Should statistics about SDP iterations and solver settings/success be printed after quitting SCIP-SDP ?

Definition at line 88 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_SETTINGSRESETFREQ   -1

frequency for resetting parameters in SDP solver and trying again with fastest settings

Definition at line 89 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_SETTINGSRESETOFS   0

frequency offset for resetting parameters in SDP solver and trying again with fastest settings

Definition at line 90 of file relax_sdp.c.

Referenced by SCIPincludeRelaxSdp().

#define DEFAULT_SDPSOLVERTHREADS   -1

number of threads the SDP solver should use, currently only supported for MOSEK (-1 = number of cores)

Definition at line 91 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXINITSOL(), and SCIPincludeRelaxSdp().

#define WARMSTART_MINVAL   0.01

if we get a value less than this when warmstarting (currently only for the linear part when combining with analytic center), the value is set to this

Definition at line 93 of file relax_sdp.c.

Referenced by calcRelax().

#define WARMSTART_PROJ_MINRHSOBJ   1

minimum value for rhs/obj when computing minimum eigenvalue for warmstart-projection

Definition at line 94 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXINITSOL().

#define WARMSTART_PROJ_FACTOR   0.1

factor to multiply maximum rhs/obj/coef with when computing minimum eigenvalue for warmstart-projection

Definition at line 95 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXINITSOL().

#define WARMSTART_PROJ_FACTOR_LHS   10

factor to multiply maximum SDP coefficient with before applying WARMSTART_PROJ_FACTOr (to account for summation of lhs entries)

Definition at line 96 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXINITSOL().

#define WARMSTART_PROJ_FACTOR_PRIMAL   0.1

factor to multiply maximum obj with when computing minimum eigenvalue for warmstart-projection in the primal

Definition at line 97 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXINITSOL().

#define WARMSTART_PROJ_FACTOR_DUAL   0.1

factor to multiply maximum rhs with when computing minimum eigenvalue for warmstart-projection in the dual

Definition at line 98 of file relax_sdp.c.

#define WARMSTART_PREOPT_MIN_Z_LPVAL   0.01

minimal (diagonal) entry for LP block of dual matrix for preoptimal warmstarts

Definition at line 99 of file relax_sdp.c.

Referenced by calcRelax().

#define TIMEOFDAY_CALL (   x)
Value:
do \
{ \
int _errorcode_; \
if ( (_errorcode_ = (x)) != 0 ) \
{ \
SCIPerrorMessage("Error in gettimeofday! \n"); \
return SCIP_ERROR; \
} \
} \
while( FALSE )

Calls a gettimeofday and transforms the return-code to a SCIP_ERROR if needed.

Definition at line 102 of file relax_sdp.c.

Referenced by calcRelax().

Function Documentation

static SCIP_RETCODE expandSparseMatrix ( int  nnonz,
int  blocksize,
int *  row,
int *  col,
SCIP_Real *  val,
SCIP_Real *  fullmat 
)
static

expand sparse matrix to full matrix format needed by LAPACK

Parameters
nnonznumber of nonzeros and length of row/col/val arrays
blocksizesize of matrix (and squareroot of memory allocated for fullmat)
rowrow indices
colcolumn indices
valvalues
fullmatpointer to store full matrix

Definition at line 221 of file relax_sdp.c.

Referenced by calcRelax().

static SCIP_RETCODE scaleTransposedMatrix ( int  blocksize,
SCIP_Real *  matrix,
SCIP_Real *  scale 
)
static

multiplies all entries in the i-th column by scale[i]

Definition at line 258 of file relax_sdp.c.

Referenced by calcRelax().

static SCIP_RETCODE putSdpDataInInterface ( SCIP *  scip,
SCIP_SDPI sdpi,
SdpVarmapper varmapper,
SCIP_Bool  primalobj,
SCIP_Bool  boundprimal 
)
static

inserts all the SDP data into the corresponding SDP Interface

Parameters
scipSCIP data structure
sdpiSDP interface structure
varmappermaps SCIP variables to their global SDP indices and vice versa
primalobjshould the primal objective coefficients (constant part of the SDP constraint) be used ?
boundprimalshould the primal problem be bounded (Tr(X)<=1) through a penalty term in the dual ?

Definition at line 284 of file relax_sdp.c.

References SCIPconsSdpGetData(), SCIPconsSdpGetNNonz(), SCIPsdpiLoadSDP(), SCIPsdpVarmapperGetNVars(), and SCIPsdpVarmapperGetSdpIndex().

Referenced by SCIP_DECL_RELAXINITSOL(), and SCIPrelaxSdpComputeAnalyticCenters().

static SCIP_RETCODE putLpDataInInterface ( SCIP *  scip,
SCIP_SDPI sdpi,
SdpVarmapper varmapper,
SCIP_Bool  primalobj,
SCIP_Bool  dualobj 
)
static

inserts all the LP data (including bounds and objective) into the corresponding SDP Interface

Parameters
scipSCIP data structure
sdpiSDP interface structure
varmappermaps SCIP variables to their global SDP indices and vice versa
primalobjshould the primal objective coefficients (lhs/rhs of LP-constraints) be used ?
dualobjshould the dual objective coefficients be used ?

Definition at line 527 of file relax_sdp.c.

References SCIPsdpiAddLPRows(), SCIPsdpiChgBounds(), SCIPsdpiChgObj(), SCIPsdpiDelLPRows(), SCIPsdpiGetNLPRows(), and SCIPsdpVarmapperGetSdpIndex().

Referenced by SCIP_DECL_RELAXEXEC(), and SCIPrelaxSdpComputeAnalyticCenters().

static SCIP_RETCODE calcRelax ( SCIP *  scip,
SCIP_RELAXDATA *  relaxdata,
SCIP_RESULT *  result,
SCIP_Real *  lowerbound 
)
static

calculate relaxation and process the relaxation results

Parameters
scipSCIP data structure
relaxdatadata of the relaxator
resultpointer to store result of relaxation process
lowerboundpointer to store lowerbound

Definition at line 756 of file relax_sdp.c.

References createConsSavedsdpsettings(), createConsSavesdpsol(), expandSparseMatrix(), scaleTransposedMatrix(), SCIP_SDPPAR_OBJLIMIT, SCIP_SDPSLATER_HOLDS, SCIP_SDPSLATER_INF, SCIP_SDPSLATER_NOINFO, SCIP_SDPSLATER_NOT, SCIP_SDPSLATERSETTING_BOUNDEDINFEASIBLE, SCIP_SDPSLATERSETTING_BOUNDEDNOSLATER, SCIP_SDPSLATERSETTING_BOUNDEDWSLATER, SCIP_SDPSLATERSETTING_NOINFO, SCIP_SDPSLATERSETTING_PENALTYINFEASIBLE, SCIP_SDPSLATERSETTING_PENALTYNOSLATER, SCIP_SDPSLATERSETTING_PENALTYWSLATER, SCIP_SDPSLATERSETTING_STABLEINFEASIBLE, SCIP_SDPSLATERSETTING_STABLENOSLATER, SCIP_SDPSLATERSETTING_STABLEWSLATER, SCIP_SDPSLATERSETTING_UNSOLVEDINFEASIBLE, SCIP_SDPSLATERSETTING_UNSOLVEDNOSLATER, SCIP_SDPSLATERSETTING_UNSOLVEDWSLATER, SCIP_SDPSLATERSETTING_UNSTABLEINFEASIBLE, SCIP_SDPSLATERSETTING_UNSTABLENOSLATER, SCIP_SDPSLATERSETTING_UNSTABLEWSLATER, SCIP_SDPSOLVERSETTING_FAST, SCIP_SDPSOLVERSETTING_MEDIUM, SCIP_SDPSOLVERSETTING_PENALTY, SCIP_SDPSOLVERSETTING_STABLE, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPconsSavedsdpsettingsGetSettings(), SCIPconsSavesdpsolGetDualVector(), SCIPconsSavesdpsolGetMaxPrimalEntry(), SCIPconsSavesdpsolGetNodeIndex(), SCIPconsSavesdpsolGetPrimalMatrix(), SCIPconsSavesdpsolGetPrimalMatrixNonzeros(), SCIPconsSdpCompLowerTriangPos(), SCIPconsSdpComputeSparseSdpMatrix(), SCIPconsSdpComputeUbSparseSdpMatrixLength(), SCIPconsSdpGetBlocksize(), SCIPconsSdpGetData(), SCIPconsSdpGetNNonz(), SCIPlapackComputeEigenvectorDecomposition(), SCIPlapackMatrixMatrixMult(), SCIPsdpiDoesWarmstartNeedPrimal(), SCIPsdpiFeasibilityKnown(), SCIPsdpiGetIterations(), SCIPsdpiGetLowerObjbound(), SCIPsdpiGetMaxPrimalEntry(), SCIPsdpiGetPreoptimalPrimalNonzeros(), SCIPsdpiGetPreoptimalSol(), SCIPsdpiGetPrimalMatrix(), SCIPsdpiGetPrimalNonzeros(), SCIPsdpiGetSdpCalls(), SCIPsdpiGetSol(), SCIPsdpiGetSolverName(), SCIPsdpiInfinity(), SCIPsdpiIsAcceptable(), SCIPsdpiIsDualFeasible(), SCIPsdpiIsDualInfeasible(), SCIPsdpiIsDualUnbounded(), SCIPsdpiIsObjlimExc(), SCIPsdpiIsPrimalFeasible(), SCIPsdpiIsTimelimExc(), SCIPsdpiSetRealpar(), SCIPsdpiSettingsUsed(), SCIPsdpiSlater(), SCIPsdpiSlaterSettings(), SCIPsdpiSolve(), SCIPsdpiSolvedOrig(), SCIPsdpiWasSolved(), SCIPsdpVarfixerMergeArrays(), SCIPsdpVarmapperGetNVars(), SCIPsdpVarmapperGetSCIPvar(), SCIPsdpVarmapperGetSdpIndex(), TIMEOFDAY_CALL, WARMSTART_MINVAL, and WARMSTART_PREOPT_MIN_Z_LPVAL.

Referenced by SCIP_DECL_RELAXEXEC().

static SCIP_Bool allVarsFixed ( SCIP *  scip)
static

checks whether all variables are fixed

Parameters
scipSCIP data structure

Definition at line 3439 of file relax_sdp.c.

Referenced by SCIP_DECL_RELAXEXEC().

static SCIP_DECL_RELAXEXEC ( relaxExecSdp  )
static

execution method of relaxator

Definition at line 3463 of file relax_sdp.c.

References allVarsFixed(), calcRelax(), putLpDataInInterface(), SCIPsdpiGetSol(), and SCIPsdpiIsDualUnbounded().

static SCIP_DECL_RELAXINITSOL ( relaxInitSolSdp  )
static
static SCIP_DECL_RELAXCOPY ( relaxCopySdp  )
static

copy method for SDP-relaxation handler (called when SCIP copies plugins)

Definition at line 4043 of file relax_sdp.c.

References RELAX_NAME, and SCIPincludeRelaxSdp().

static SCIP_DECL_RELAXEXIT ( relaxExitSdp  )
static

reset the relaxator's data

Definition at line 4056 of file relax_sdp.c.

References SCIPsdpiClear(), SCIPsdpiDoesWarmstartNeedPrimal(), SCIPsdpiGetSolverName(), and SCIPsdpVarmapperFree().

static SCIP_DECL_RELAXFREE ( relaxFreeSdp  )
static

free the relaxator's data

Definition at line 4231 of file relax_sdp.c.

References SCIPsdpiFree().

SCIP_RETCODE SCIPincludeRelaxSdp ( SCIP *  scip)
SCIP_RETCODE SCIPrelaxSdpComputeAnalyticCenters ( SCIP *  scip,
SCIP_RELAX *  relax 
)

computes analytic centers of primal and dual feasible set and saves them in relaxdata

Note
This function should be called at the end of the root node (or at least after the solving stage starts and before the first non-root node).
Parameters
scipSCIP data structure
relaxSDP-relaxator to compute analytic centers for

Definition at line 4410 of file relax_sdp.c.

References putLpDataInInterface(), putSdpDataInInterface(), SCIP_SDPSLATER_HOLDS, SCIP_SDPSLATER_INF, SCIP_SDPSLATER_NOINFO, SCIP_SDPSLATER_NOT, SCIP_SDPSLATERSETTING_BOUNDEDINFEASIBLE, SCIP_SDPSLATERSETTING_BOUNDEDNOSLATER, SCIP_SDPSLATERSETTING_BOUNDEDWSLATER, SCIP_SDPSLATERSETTING_NOINFO, SCIP_SDPSLATERSETTING_PENALTYINFEASIBLE, SCIP_SDPSLATERSETTING_PENALTYNOSLATER, SCIP_SDPSLATERSETTING_PENALTYWSLATER, SCIP_SDPSLATERSETTING_STABLEINFEASIBLE, SCIP_SDPSLATERSETTING_STABLENOSLATER, SCIP_SDPSLATERSETTING_STABLEWSLATER, SCIP_SDPSLATERSETTING_UNSOLVEDINFEASIBLE, SCIP_SDPSLATERSETTING_UNSOLVEDNOSLATER, SCIP_SDPSLATERSETTING_UNSOLVEDWSLATER, SCIP_SDPSLATERSETTING_UNSTABLEINFEASIBLE, SCIP_SDPSLATERSETTING_UNSTABLENOSLATER, SCIP_SDPSLATERSETTING_UNSTABLEWSLATER, SCIP_SDPSOLVERSETTING_FAST, SCIP_SDPSOLVERSETTING_MEDIUM, SCIP_SDPSOLVERSETTING_PENALTY, SCIP_SDPSOLVERSETTING_STABLE, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPconsSdpComputeSparseSdpMatrix(), SCIPconsSdpComputeUbSparseSdpMatrixLength(), SCIPconsSdpGetBlocksize(), SCIPsdpiDoesWarmstartNeedPrimal(), SCIPsdpiGetIterations(), SCIPsdpiGetPrimalMatrix(), SCIPsdpiGetPrimalNonzeros(), SCIPsdpiGetSdpCalls(), SCIPsdpiGetSol(), SCIPsdpiIsDualFeasible(), SCIPsdpiIsPrimalFeasible(), SCIPsdpiSettingsUsed(), SCIPsdpiSlater(), SCIPsdpiSlaterSettings(), SCIPsdpiSolve(), SCIPsdpiSolvedOrig(), SCIPsdpiWasSolved(), SCIPsdpVarfixerSortRowCol(), and SCIPsdpVarmapperGetNVars().

Referenced by SCIP_DECL_PROPEXEC().

SCIP_RETCODE SCIPrelaxSdpGetPrimalBoundVars ( SCIP_RELAX *  relax,
SCIP_Real *  lbvars,
SCIP_Real *  ubvars,
int *  arraylength 
)

gets the primal variables corresponding to the lower and upper variable-bounds in the dual problem

The last input should specify the length of the arrays. If this is less than the number of variables, the needed length will be returned and a debug message thrown.

Note
If a variable is either fixed or unbounded in the dual problem, a zero will be returned for the non-existent primal variable.
Parameters
relaxSDP-relaxator to get information for
lbvarspointer to store the values of the variables corresponding to lower bounds in the dual problems
ubvarspointer to store the values of the variables corresponding to upper bounds in the dual problems
arraylengthinput: length of lbvars and ubvars
output: number of elements inserted into lbvars/ubvars (or needed length if it wasn't sufficient)

Definition at line 5125 of file relax_sdp.c.

References SCIPsdpiGetPrimalBoundVars().

Referenced by SCIP_DECL_PROPEXEC().

SCIP_RETCODE SCIPrelaxSdpRelaxVal ( SCIP_RELAX *  relax,
SCIP_Bool *  success,
SCIP_Real *  objval 
)

returns optimal objective value of the current SDP-relaxation if the last SDP-relaxation was successfully solved

Parameters
relaxSDP-relaxator to get objective value for
successpointer to store whether the last SDP-relaxation was solved successfully
objvalpointer to store the optimal objective value of the SDP-relaxation

Definition at line 5150 of file relax_sdp.c.

Referenced by SCIP_DECL_PROPEXEC().

SCIP_RETCODE SCIPrelaxSdpGetRelaxSol ( SCIP *  scip,
SCIP_RELAX *  relax,
SCIP_Bool *  success,
SCIP_Real *  solarray,
int *  sollength 
)

returns values of all variables in the solution of the current SDP-relaxation if the last SDP-relaxation was successfully solved

Parameters
scipSCIP pointer
relaxSDP-relaxator to get solution for
successpointer to store whether the last SDP-relaxation was solved successfully
solarraypointer to store the solution, this has to be at least length nvars
sollengthlength of the solarray

Definition at line 5172 of file relax_sdp.c.

References SCIPsdpiGetSol().

long int SCIPrelaxSdpGetSdpNode ( SCIP_RELAX *  relax)

get the number of the SCIP-node which the current SDP solution belongs to

Parameters
relaxSDP-relaxator to get solution for

Definition at line 5205 of file relax_sdp.c.

Referenced by SCIP_DECL_PROPEXEC().

SCIP_Bool SCIPrelaxSdpSolvedOrig ( SCIP_RELAX *  relax)

Was the original problem solved for the last SDP-node (or a penalty or probing formulation) ?

Parameters
relaxSDP-relaxator to get solution for

Definition at line 5216 of file relax_sdp.c.

References SCIPsdpiSolvedOrig().

Referenced by SCIP_DECL_PROPEXEC().

SCIP_Bool SCIPrelaxSdpSolvedProbing ( SCIP_RELAX *  relax)

Was the last probing SDP solved successfully ?

Parameters
relaxSDP-relaxator to get solution for

Definition at line 5233 of file relax_sdp.c.

Referenced by SCIP_DECL_HEUREXEC(), and SCIP_DECL_PROPEXEC().

SCIP_Bool SCIPrelaxSdpIsFeasible ( SCIP_RELAX *  relax)

returns whether the last solved problem was feasible

Parameters
relaxSDP-relaxator to get feasibility for

Definition at line 5250 of file relax_sdp.c.

Referenced by SCIP_DECL_HEUREXEC(), and SCIP_DECL_PROPEXEC().

int SCIPrelaxSdpGetNIterations ( SCIP_RELAX *  relax)

returns total number of SDP-iterations

Parameters
relaxSDP-relaxator to get the iterations for

Definition at line 5261 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpCalls ( SCIP_RELAX *  relax)

returns number of SDPs solved by SDP-solver (including multiple calls for penalty formulation etc.)

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5272 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpInterfaceCalls ( SCIP_RELAX *  relax)

returns number of solved SDP-relaxations

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5283 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpFast ( SCIP_RELAX *  relax)

returns number of SDP-relaxations solved with fastest settings

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5294 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpMedium ( SCIP_RELAX *  relax)

returns number of SDP-relaxations solved with medium settings

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5305 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpStable ( SCIP_RELAX *  relax)

returns number of SDP-relaxations solved with stable settings

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5316 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpPenalty ( SCIP_RELAX *  relax)

returns number of SDP-relaxations solved with penalty formulation

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5327 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSdpUnsolved ( SCIP_RELAX *  relax)

returns number of SDP-relaxations unsolved even when using a penalty formulation

Parameters
relaxSDP-relaxator to get the number of calls for

Definition at line 5338 of file relax_sdp.c.

Referenced by SCIP_DECL_DISPOUTPUT(), and SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNdualSlaterHolds ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which dual Slater condition held

Parameters
relaxSDP-relaxator to get number for

Definition at line 5349 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNdualSlaterFails ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which dual Slater condition failed

Parameters
relaxSDP-relaxator to get number for

Definition at line 5360 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNdualSlaterInfeasible ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which dual Slater condition showed infeasibility

Parameters
relaxSDP-relaxator to get number for

Definition at line 5371 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNdualSlaterUnknown ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which dual Slater condition could not be determined

Parameters
relaxSDP-relaxator to get number for

Definition at line 5382 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNprimalSlaterHolds ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which primal Slater condition held

Parameters
relaxSDP-relaxator to get number for

Definition at line 5393 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNprimalSlaterFails ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which primal Slater condition failed

Parameters
relaxSDP-relaxator to get number for

Definition at line 5404 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNprimalSlaterUnknown ( SCIP_RELAX *  relax)

returns number of SDP-relaxations for which primal Slater condition could not be determined

Parameters
relaxSDP-relaxator to get number for

Definition at line 5415 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHolds ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual

Parameters
relaxSDP-relaxator to get number for

Definition at line 5426 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHoldsFast ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual, solved with fastest settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5437 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHoldsStable ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual, solved with stable settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5448 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHoldsPenalty ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual, solved with penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5459 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHoldsBounded ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual, for which an infeasible lower bound could be computed

Parameters
relaxSDP-relaxator to get number for

Definition at line 5470 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterHoldsUnsolved ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition holding for primal and dual, unsolved even when using a penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5481 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFails ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual

Parameters
relaxSDP-relaxator to get number for

Definition at line 5492 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFailsFast ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual, solved with fast settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5503 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFailsStable ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual, solved with stable settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5514 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFailsPenalty ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual, solved with penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5525 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFailsBounded ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual, for which an infeasible lower bound could be computed

Parameters
relaxSDP-relaxator to get number for

Definition at line 5536 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterFailsUnsolved ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slater condition failing for primal or dual, unsolved even when using a penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5547 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterInfeasibleFast ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slatercheck showing infeasibility, solved with fast settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5558 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterInfeasibleStable ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slatercheck showing infeasibility, solved with stable settings

Parameters
relaxSDP-relaxator to get number for

Definition at line 5569 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterInfeasiblePenalty ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slatercheck showing infeasibility, solved with penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5580 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterInfeasibleBounded ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slatercheck showing infeasibility, for which an infeasible lower bound could be computed

Parameters
relaxSDP-relaxator to get number for

Definition at line 5591 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().

int SCIPrelaxSdpGetNSlaterInfeasibleUnsolved ( SCIP_RELAX *  relax)

returns number of SDP-relaxations with Slatercheck showing infeasibility, unsolved even when using a penalty formulation

Parameters
relaxSDP-relaxator to get number for

Definition at line 5602 of file relax_sdp.c.

Referenced by SCIP_DECL_TABLEOUTPUT().