SCIP-SDP  3.2.0
Typedefs
sdpisolver.h File Reference

interface methods for specific SDP-solvers More...

Go to the source code of this file.

Typedefs

typedef struct SCIP_SDPiSolver SCIP_SDPISOLVER
 

Functions

Miscellaneous Methods
SCIP_EXPORT const char * SCIPsdpiSolverGetSolverName (void)
 
SCIP_EXPORT const char * SCIPsdpiSolverGetSolverDesc (void)
 
SCIP_EXPORT void * SCIPsdpiSolverGetSolverPointer (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverFeastol (void)
 
SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverGaptol (void)
 
SCIP_EXPORT int SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases (void)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverDoesWarmstartNeedPrimal (void)
 
SDPI Creation and Destruction Methods
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverCreate (SCIP_SDPISOLVER **sdpisolver, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverFree (SCIP_SDPISOLVER **sdpisolver)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverIncreaseCounter (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverResetCounter (SCIP_SDPISOLVER *sdpisolver)
 
Solving Methods
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverLoadAndSolve (SCIP_SDPISOLVER *sdpisolver, int nvars, SCIP_Real *obj, SCIP_Real *lb, SCIP_Real *ub, int nsdpblocks, int *sdpblocksizes, int *sdpnblockvars, int sdpconstnnonz, int *sdpconstnblocknonz, int **sdpconstrow, int **sdpconstcol, SCIP_Real **sdpconstval, int sdpnnonz, int **sdpnblockvarnonz, int **sdpvar, int ***sdprow, int ***sdpcol, SCIP_Real ***sdpval, int **indchanges, int *nremovedinds, int *blockindchanges, int nremovedblocks, int nlpcons, int noldlpcons, SCIP_Real *lplhs, SCIP_Real *lprhs, int *rownactivevars, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *starty, int *startZnblocknonz, int **startZrow, int **startZcol, SCIP_Real **startZval, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval, SCIP_SDPSOLVERSETTING startsettings, SCIP_Real timelimit)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverLoadAndSolveWithPenalty (SCIP_SDPISOLVER *sdpisolver, SCIP_Real penaltyparam, SCIP_Bool withobj, SCIP_Bool rbound, int nvars, SCIP_Real *obj, SCIP_Real *lb, SCIP_Real *ub, int nsdpblocks, int *sdpblocksizes, int *sdpnblockvars, int sdpconstnnonz, int *sdpconstnblocknonz, int **sdpconstrow, int **sdpconstcol, SCIP_Real **sdpconstval, int sdpnnonz, int **sdpnblockvarnonz, int **sdpvar, int ***sdprow, int ***sdpcol, SCIP_Real ***sdpval, int **indchanges, int *nremovedinds, int *blockindchanges, int nremovedblocks, int nlpcons, int noldlpcons, SCIP_Real *lplhs, SCIP_Real *lprhs, int *rownactivevars, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *starty, int *startZnblocknonz, int **startZrow, int **startZcol, SCIP_Real **startZval, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval, SCIP_SDPSOLVERSETTING startsettings, SCIP_Real timelimit, SCIP_Bool *feasorig, SCIP_Bool *penaltybound)
 
Solution Information Methods
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverWasSolved (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverFeasibilityKnown (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSolFeasibility (SCIP_SDPISOLVER *sdpisolver, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalUnbounded (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalInfeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalFeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualUnbounded (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualInfeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualFeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsConverged (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsObjlimExc (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsIterlimExc (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsTimelimExc (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT int SCIPsdpiSolverGetInternalStatus (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsOptimal (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsAcceptable (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverIgnoreInstability (SCIP_SDPISOLVER *sdpisolver, SCIP_Bool *success)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetObjval (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *objval)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSol (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *objval, SCIP_Real *dualsol, int *dualsollength)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPreoptimalPrimalNonzeros (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPreoptimalSol (SCIP_SDPISOLVER *sdpisolver, SCIP_Bool *success, SCIP_Real *dualsol, int *dualsollength, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalBoundVars (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *lbvars, SCIP_Real *ubvars, int *arraylength)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalNonzeros (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalMatrix (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval)
 
SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetMaxPrimalEntry (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetIterations (SCIP_SDPISOLVER *sdpisolver, int *iterations)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSdpCalls (SCIP_SDPISOLVER *sdpisolver, int *calls)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSettingsUsed (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPSOLVERSETTING *usedsetting)
 
Numerical Methods
SCIP_EXPORT SCIP_Real SCIPsdpiSolverInfinity (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsInfinity (SCIP_SDPISOLVER *sdpisolver, SCIP_Real val)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetRealpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, SCIP_Real *dval)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSetRealpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, SCIP_Real dval)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetIntpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, int *ival)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSetIntpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, int ival)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputeLambdastar (SCIP_SDPISOLVER *sdpisolver, SCIP_Real maxguess)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputePenaltyparam (SCIP_SDPISOLVER *sdpisolver, SCIP_Real maxcoeff, SCIP_Real *penaltyparam)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputeMaxPenaltyparam (SCIP_SDPISOLVER *sdpisolver, SCIP_Real penaltyparam, SCIP_Real *maxpenaltyparam)
 
File Interface Methods
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverReadSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname)
 
SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverWriteSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname)
 

Detailed Description

interface methods for specific SDP-solvers

Author
Marc Pfetsch
Tristan Gally

This file specifies a generic SDP-solver interface used by SCIP to create, modify, and solve semidefinite programs of the (dual) form

\begin{eqnarray*} \min & & b^T y \\ \mbox{s.t.} & & \sum_{j=1}^n A_j^i y_j - A_0^i \succeq 0 \quad \forall i \leq m \\ & & Dy \geq d \\ & & l \leq y \leq u \end{eqnarray*}

for symmetric matrices $ A_j^i \in S_{k_i} $, a matrix $ D \in \mathbb{R}^{k_0 \times n} $ and query information about the solution.

All indexing (rows, columns, blocks and variables) starts at 0.

Although it includes a few SCIP header files, e.g., because it uses SCIP's return codes, it can be used independently of any SCIP instance.

Definition in file sdpisolver.h.

Typedef Documentation

typedef struct SCIP_SDPiSolver SCIP_SDPISOLVER

solver dependent SDP interface

Definition at line 70 of file sdpisolver.h.

Function Documentation

SCIP_EXPORT const char* SCIPsdpiSolverGetSolverName ( void  )

gets name and version (if available) of SDP-solver

Definition at line 364 of file sdpisolver_dsdp.c.

References name, and SCIPsdpiSolverGetSolverDesc().

Referenced by checkFeastolAndResolve(), checkGapSetPreoptimalSol(), isFixed(), and SCIPsdpiGetSolverName().

SCIP_EXPORT const char* SCIPsdpiSolverGetSolverDesc ( void  )

gets description of SDP-solver (developer, webpage, ...)

Definition at line 372 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverGetSolverPointer().

Referenced by SCIPsdpiGetSolverDesc(), and SCIPsdpiSolverGetSolverName().

SCIP_EXPORT void* SCIPsdpiSolverGetSolverPointer ( SCIP_SDPISOLVER sdpisolver)

gets pointer to SDP-solver - use only with great care

The behavior of this function depends on the solver and its use is therefore only recommended if you really know what you are doing. In general, it returns a pointer to the SDP-solver object.

Parameters
sdpisolverpointer to an SDP-solver interface

Definition at line 385 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverGetDefaultSdpiSolverFeastol().

Referenced by SCIPsdpiGetSolverPointer(), and SCIPsdpiSolverGetSolverDesc().

SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverFeastol ( void  )

gets default feasibility tolerance for SDP-solver in SCIP-SDP

Definition at line 394 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverGetDefaultSdpiSolverGaptol().

Referenced by SCIPsdpiGetDefaultSdpiSolverFeastol(), and SCIPsdpiSolverGetSolverPointer().

SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverGaptol ( void  )

gets default duality gap tolerance for SDP-solver in SCIP-SDP

Definition at line 403 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases().

Referenced by SCIPsdpiGetDefaultSdpiSolverGaptol(), and SCIPsdpiSolverGetDefaultSdpiSolverFeastol().

SCIP_EXPORT int SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases ( void  )

gets default number of increases of penalty parameter for SDP-solver in SCIP-SDP

Definition at line 411 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverDoesWarmstartNeedPrimal().

Referenced by SCIPsdpiGetDefaultSdpiSolverNpenaltyIncreases(), and SCIPsdpiSolverGetDefaultSdpiSolverGaptol().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverDoesWarmstartNeedPrimal ( void  )

Should primal solution values be saved for warmstarting purposes?

Definition at line 419 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverCreate().

Referenced by SCIPsdpiDoesWarmstartNeedPrimal(), and SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverCreate ( SCIP_SDPISOLVER **  sdpisolver,
SCIP_MESSAGEHDLR *  messagehdlr,
BMS_BLKMEM *  blkmem,
BMS_BUFMEM *  bufmem 
)

creates an SDP solver interface

Parameters
sdpisolverpointer to an SDP-solver interface
messagehdlrmessage handler to use for printing messages, or NULL
blkmemblock memory
bufmembuffer memory

Definition at line 437 of file sdpisolver_dsdp.c.

References BMS_CALL, MOSEK_CALLM, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPsdpiSolverFree(), and SCIPsdpiSolverInfinity().

Referenced by SCIPsdpiClone(), SCIPsdpiCreate(), and SCIPsdpiSolverDoesWarmstartNeedPrimal().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverFree ( SCIP_SDPISOLVER **  sdpisolver)

deletes an SDP solver interface

Parameters
sdpisolverpointer to an SDP-solver interface

Definition at line 495 of file sdpisolver_dsdp.c.

References DSDP_CALL, MOSEK_CALL, and SCIPsdpiSolverIncreaseCounter().

Referenced by SCIPsdpiFree(), and SCIPsdpiSolverCreate().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverIncreaseCounter ( SCIP_SDPISOLVER sdpisolver)

increases the SDP-Counter

Parameters
sdpisolverSDP-solver interface

Definition at line 528 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverResetCounter().

Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverFree().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverResetCounter ( SCIP_SDPISOLVER sdpisolver)

reset the SDP-Counter to zero

Parameters
sdpisolverSDP-solver interface

Definition at line 540 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverLoadAndSolve().

Referenced by SCIPsdpiClear(), and SCIPsdpiSolverIncreaseCounter().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverLoadAndSolve ( SCIP_SDPISOLVER sdpisolver,
int  nvars,
SCIP_Real *  obj,
SCIP_Real *  lb,
SCIP_Real *  ub,
int  nsdpblocks,
int *  sdpblocksizes,
int *  sdpnblockvars,
int  sdpconstnnonz,
int *  sdpconstnblocknonz,
int **  sdpconstrow,
int **  sdpconstcol,
SCIP_Real **  sdpconstval,
int  sdpnnonz,
int **  sdpnblockvarnonz,
int **  sdpvar,
int ***  sdprow,
int ***  sdpcol,
SCIP_Real ***  sdpval,
int **  indchanges,
int *  nremovedinds,
int *  blockindchanges,
int  nremovedblocks,
int  nlpcons,
int  noldlpcons,
SCIP_Real *  lplhs,
SCIP_Real *  lprhs,
int *  lprownactivevars,
int  lpnnonz,
int *  lprow,
int *  lpcol,
SCIP_Real *  lpval,
SCIP_Real *  starty,
int *  startZnblocknonz,
int **  startZrow,
int **  startZcol,
SCIP_Real **  startZval,
int *  startXnblocknonz,
int **  startXrow,
int **  startXcol,
SCIP_Real **  startXval,
SCIP_SDPSOLVERSETTING  startsettings,
SCIP_Real  timelimit 
)

loads and solves an SDP

For the non-constant SDP- and the LP-part, the original arrays before fixings should be given, for the constant SDP-part the arrays AFTER fixings should be given. In addition, an array needs to be given, that for every block and every row/col index within that block either has value -1, meaning that this index should be deleted, or a non-negative integer stating the number of indices before it that are to be deleated, meaning that this index will be decreased by that number, in addition to that the total number of deleted indices for each block should be given. Optionally an array start may be given with a starting point for the solver (if this is NULL then the solver should start from scratch).

Warning
Depending on the solver, the given lp arrays might get sorted in their original position.
Note
starting point needs to be given with original indices (before any local presolving), last block should be the LP block with indices lhs(row0), rhs(row0), lhs(row1), ..., lb(var1), ub(var1), lb(var2), ... independant of some lhs/rhs being infinity (the starting point will later be adjusted accordingly)
Parameters
sdpisolverSDP-solver interface
nvarsnumber of variables
objobjective coefficients of variables
lblower bounds of variables
ubupper bounds of variables
nsdpblocksnumber of SDP-blocks
sdpblocksizessizes of the SDP-blocks (may be NULL if nsdpblocks = sdpconstnnonz = sdpnnonz = 0)
sdpnblockvarsnumber of variables that exist in each block
sdpconstnnonznumber of nonzero elements in the constant matrices of the SDP-blocks AFTER FIXINGS
sdpconstnblocknonznumber of nonzeros for each variable in the constant part, also the i-th entry gives the number of entries of sdpconst row/col/val [i] AFTER FIXINGS
sdpconstrowpointers to row-indices for each block AFTER FIXINGS
sdpconstcolpointers to column-indices for each block AFTER FIXINGS
sdpconstvalpointers to the values of the nonzeros for each block AFTER FIXINGS
sdpnnonznumber of nonzero elements in the SDP-constraint-matrix
sdpnblockvarnonzentry [i][j] gives the number of nonzeros for block i and variable j, this is exactly the number of entries of sdp row/col/val [i][j]
sdpvarsdpvar[i][j] gives the sdp-index of the j-th variable (according to the sorting for row/col/val) in the i-th block
sdprowpointer to the row-indices for each block and variable
sdpcolpointer to the column-indices for each block and variable
sdpvalvalues of SDP-constraint-matrix entries (may be NULL if sdpnnonz = 0)
indchangeschanges needed to be done to the indices, if indchanges[block][nonz]=-1, then the index can be removed, otherwise it gives the number of indices removed before this
nremovedindsthe number of rows/cols to be fixed for each block
blockindchangesblock indizes will be modified by these, see indchanges
nremovedblocksnumber of empty blocks that should be removed
nlpconsnumber of active (at least two nonzeros) LP-constraints
noldlpconsnumber of LP-constraints including those with less than two active nonzeros
lplhsleft-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0)
lprhsright-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0)
lprownactivevarsnumber of active variables for each LP-constraint
lpnnonznumber of nonzero elements in the LP-constraint-matrix
lprowrow-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0)
lpcolcolumn-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0)
lpvalvalues of LP-constraint-matrix entries, might get sorted (may be NULL if lpnnonz = 0)
startyNULL or dual vector y as starting point for the solver, this should have length nvars
startZnblocknonzdual matrix Z = sum Ai yi as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL
startZrowdual matrix Z = sum Ai yi as starting point for the solver: row indices for each block; may be NULL if startZnblocknonz = NULL
startZcoldual matrix Z = sum Ai yi as starting point for the solver: column indices for each block; may be NULL if startZnblocknonz = NULL
startZvaldual matrix Z = sum Ai yi as starting point for the solver: values for each block; may be NULL if startZnblocknonz = NULL
startXnblocknonzprimal matrix X as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL
startXrowprimal matrix X as starting point for the solver: row indices for each block; may be NULL if startXnblocknonz = NULL
startXcolprimal matrix X as starting point for the solver: column indices for each block; may be NULL if startXnblocknonz = NULL
startXvalprimal matrix X as starting point for the solver: values for each block; may be NULL if startXnblocknonz = NULL
startsettingssettings used to start with in SDPA, currently not used for DSDP and MOSEK, set this to SCIP_SDPSOLVERSETTING_UNSOLVED to ignore it and start from scratch
timelimitafter this many seconds solving will be aborted (currently only implemented for DSDP and MOSEK)

Definition at line 577 of file sdpisolver_dsdp.c.

References errorMessage(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

Referenced by checkSlaterCondition(), SCIPsdpiSolve(), and SCIPsdpiSolverResetCounter().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverLoadAndSolveWithPenalty ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  penaltyparam,
SCIP_Bool  withobj,
SCIP_Bool  rbound,
int  nvars,
SCIP_Real *  obj,
SCIP_Real *  lb,
SCIP_Real *  ub,
int  nsdpblocks,
int *  sdpblocksizes,
int *  sdpnblockvars,
int  sdpconstnnonz,
int *  sdpconstnblocknonz,
int **  sdpconstrow,
int **  sdpconstcol,
SCIP_Real **  sdpconstval,
int  sdpnnonz,
int **  sdpnblockvarnonz,
int **  sdpvar,
int ***  sdprow,
int ***  sdpcol,
SCIP_Real ***  sdpval,
int **  indchanges,
int *  nremovedinds,
int *  blockindchanges,
int  nremovedblocks,
int  nlpcons,
int  noldlpcons,
SCIP_Real *  lplhs,
SCIP_Real *  lprhs,
int *  rownactivevars,
int  lpnnonz,
int *  lprow,
int *  lpcol,
SCIP_Real *  lpval,
SCIP_Real *  starty,
int *  startZnblocknonz,
int **  startZrow,
int **  startZcol,
SCIP_Real **  startZval,
int *  startXnblocknonz,
int **  startXrow,
int **  startXcol,
SCIP_Real **  startXval,
SCIP_SDPSOLVERSETTING  startsettings,
SCIP_Real  timelimit,
SCIP_Bool *  feasorig,
SCIP_Bool *  penaltybound 
)

loads and solves an SDP using a penalty formulation

The penalty formulation of the SDP is:

\begin{eqnarray*} \min & & b^T y + \Gamma r \\ \mbox{s.t.} & & \sum_{j=1}^n A_j^i y_j - A_0^i + r \cdot \mathbb{I} \succeq 0 \quad \forall i \leq m \\ & & Dy + r \cdot \mathbb{I} \geq d \\ & & l \leq y \leq u \\ & & r \geq 0.\end{eqnarray*}

Alternatively withobj can be set to false to set b to 0 and only check for feasibility (if the optimal objective value is bigger than 0 the problem is infeasible, otherwise it's feasible), and rbound can be set to false to remove the non-negativity condition on r. For the non-constant SDP- and the LP-part the original arrays before fixings should be given, for the constant SDP-part the arrays AFTER fixings should be given. In addition, an array needs to be given, that for every block and every row/col index within that block either has value -1, meaning that this index should be deleted, or a non-negative integer stating the number of indices before it that are to be deleated, meaning that this index will be decreased by that number. Moreover, the total number of deleted indices for each block should be given. An optional starting point for the solver may be given; if it is NULL, the solver will start from scratch.

Warning
Depending on the solver, the given lp arrays might get sorted in their original position.
Note
starting point needs to be given with original indices (before any local presolving), last block should be the LP block with indices lhs(row0), rhs(row0), lhs(row1), ..., lb(var1), ub(var1), lb(var2), ... independant of some lhs/rhs being infinity (the starting point will later be adjusted accordingly)
Parameters
sdpisolverSDP-solver interface
penaltyparamthe Gamma above, needs to be >= 0
withobjif this is false the objective is set to 0
rboundshould r be non-negative ?
nvarsnumber of variables
objobjective coefficients of variables
lblower bounds of variables
ubupper bounds of variables
nsdpblocksnumber of SDP-blocks
sdpblocksizessizes of the SDP-blocks (may be NULL if nsdpblocks = sdpconstnnonz = sdpnnonz = 0)
sdpnblockvarsnumber of variables that exist in each block
sdpconstnnonznumber of nonzero elements in the constant matrices of the SDP-blocks AFTER FIXINGS
sdpconstnblocknonznumber of nonzeros for each variable in the constant part, also the i-th entry gives the number of entries of sdpconst row/col/val [i] AFTER FIXINGS
sdpconstrowpointers to row-indices for each block AFTER FIXINGS
sdpconstcolpointers to column-indices for each block AFTER FIXINGS
sdpconstvalpointers to the values of the nonzeros for each block AFTER FIXINGS
sdpnnonznumber of nonzero elements in the SDP-constraint-matrix
sdpnblockvarnonzentry [i][j] gives the number of nonzeros for block i and variable j, this is exactly the number of entries of sdp row/col/val [i][j]
sdpvarsdpvar[i][j] gives the sdp-index of the j-th variable (according to the sorting for row/col/val) in the i-th block
sdprowpointer to the row-indices for each block and variable
sdpcolpointer to the column-indices for each block and variable
sdpvalvalues of SDP-constraint-matrix entries (may be NULL if sdpnnonz = 0)
indchangeschanges needed to be done to the indices, if indchanges[block][nonz]=-1, then the index can be removed, otherwise it gives the number of indices removed before this
nremovedindsthe number of rows/cols to be fixed for each block
blockindchangesblock indizes will be modified by these, see indchanges
nremovedblocksnumber of empty blocks that should be removed
nlpconsnumber of active (at least two nonzeros) LP-constraints
noldlpconsnumber of LP-constraints including those with less than two active nonzeros
lplhsleft-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0)
lprhsright-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0)
rownactivevarsnumber of active variables for each LP-constraint
lpnnonznumber of nonzero elements in the LP-constraint-matrix
lprowrow-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0)
lpcolcolumn-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0)
lpvalvalues of LP-constraint-matrix entries, might get sorted (may be NULL if lpnnonz = 0)
startyNULL or dual vector y as starting point for the solver, this should have length nvars
startZnblocknonzdual matrix Z = sum Ai yi as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL
startZrowdual matrix Z = sum Ai yi as starting point for the solver: row indices for each block; may be NULL if startZnblocknonz = NULL
startZcoldual matrix Z = sum Ai yi as starting point for the solver: column indices for each block; may be NULL if startZnblocknonz = NULL
startZvaldual matrix Z = sum Ai yi as starting point for the solver: values for each block; may be NULL if startZnblocknonz = NULL
startXnblocknonzprimal matrix X as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL
startXrowprimal matrix X as starting point for the solver: row indices for each block; may be NULL if startXnblocknonz = NULL
startXcolprimal matrix X as starting point for the solver: column indices for each block; may be NULL if startXnblocknonz = NULL
startXvalprimal matrix X as starting point for the solver: values for each block; may be NULL if startXnblocknonz = NULL
startsettingssettings used to start with in SDPA, currently not used for DSDP and MOSEK, set this to SCIP_SDPSOLVERSETTING_UNSOLVED to ignore it and start from scratch
timelimitafter this many seconds solving will be aborted (currently only implemented for DSDP and MOSEK)
feasorigpointer to store if the solution to the penalty-formulation is feasible for the original problem (may be NULL if penaltyparam = 0)
penaltyboundpointer to store if the primal solution reached the bound Tr(X) <= penaltyparam in the primal problem, this is also an indication of the penalty parameter being to small (may be NULL if not needed)

Definition at line 665 of file sdpisolver_dsdp.c.

References BMS_CALL, checkFeastolAndResolve(), checkGapSetPreoptimalSol(), checkTimeLimitDSDP(), compLowerTriangPos(), DSDP_CALL, DSDP_CALLM, errorMessage(), FEASTOLCHANGE, GAPTOLCHANGE, INFEASFEASTOLCHANGE, INFEASMINFEASTOL, isFixed(), MOSEK_CALL, MOSEK_CALLM, PENALTYBOUNDTOL, printstr(), SCIP_SDPSOLVERSETTING_FAST, SCIP_SDPSOLVERSETTING_MEDIUM, SCIP_SDPSOLVERSETTING_PENALTY, SCIP_SDPSOLVERSETTING_STABLE, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPsdpiSolverGetSol(), SCIPsdpiSolverInfinity(), SCIPsdpiSolverIsAcceptable(), SCIPsdpiSolverIsDualFeasible(), SCIPsdpiSolverIsInfinity(), SCIPsdpiSolverWasSolved(), SCIPsdpiSolverWriteSDP(), SCIPsdpSolcheckerCheck(), sortColRow(), and TIMEOFDAY_CALL.

Referenced by checkSlaterCondition(), SCIPsdpiSolve(), and SCIPsdpiSolverLoadAndSolve().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverWasSolved ( SCIP_SDPISOLVER sdpisolver)

returns whether a solve method was called after the last modification of the SDP

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1742 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverFeasibilityKnown().

Referenced by SCIPsdpiSolve(), SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiWasSolved().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverFeasibilityKnown ( SCIP_SDPISOLVER sdpisolver)

returns true if the solver could determine whether the problem is feasible

So it returns true if the solver knows that the problem is feasible/infeasible/unbounded, it returns false if the solver does not know anything about the feasibility status and thus the functions IsPrimalFeasible etc. should not be used.

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1756 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverGetSolFeasibility().

Referenced by SCIPsdpiFeasibilityKnown(), SCIPsdpiSolverIsAcceptable(), and SCIPsdpiSolverWasSolved().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSolFeasibility ( SCIP_SDPISOLVER sdpisolver,
SCIP_Bool *  primalfeasible,
SCIP_Bool *  dualfeasible 
)

gets information about primal and dual feasibility of the current SDP solution

Parameters
sdpisolverpointer to an SDP-solver interface
primalfeasiblestores primal feasibility status
dualfeasiblestores dual feasibility status

Definition at line 1774 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, DSDP_CALL, errorMessageAbort(), MOSEK_CALL, and SCIPsdpiSolverIsPrimalUnbounded().

Referenced by SCIPsdpiGetSolFeasibility(), and SCIPsdpiSolverFeasibilityKnown().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalUnbounded ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be primal unbounded, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1817 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsPrimalInfeasible().

Referenced by checkSlaterCondition(), SCIPsdpiIsPrimalUnbounded(), and SCIPsdpiSolverGetSolFeasibility().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalInfeasible ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be primal infeasible, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1844 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsPrimalFeasible().

Referenced by SCIPsdpiIsPrimalInfeasible(), and SCIPsdpiSolverIsPrimalUnbounded().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsPrimalFeasible ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be primal feasible, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1870 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsDualUnbounded().

Referenced by SCIPsdpiIsPrimalFeasible(), SCIPsdpiSolverIsOptimal(), and SCIPsdpiSolverIsPrimalInfeasible().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualUnbounded ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be dual unbounded, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1894 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsDualInfeasible().

Referenced by checkSlaterCondition(), SCIPsdpiIsDualUnbounded(), SCIPsdpiSolverGetObjval(), and SCIPsdpiSolverIsPrimalFeasible().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualInfeasible ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be dual infeasible, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1918 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsDualFeasible().

Referenced by checkSlaterCondition(), SCIPsdpiIsDualInfeasible(), SCIPsdpiSolve(), and SCIPsdpiSolverIsDualUnbounded().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsDualFeasible ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP is proven to be dual feasible, returns FALSE with a debug-message if the solver could not determine feasibility

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1943 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsConverged().

Referenced by checkFeastolAndResolve(), SCIPsdpiIsDualFeasible(), SCIPsdpiSolverIsDualInfeasible(), SCIPsdpiSolverIsOptimal(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsConverged ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the solver converged

returns TRUE iff the solver converged

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1966 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, and SCIPsdpiSolverIsObjlimExc().

Referenced by SCIPsdpiIsConverged(), SCIPsdpiSolverIsAcceptable(), SCIPsdpiSolverIsDualFeasible(), and SCIPsdpiSolverIsOptimal().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsObjlimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the objective limit was reached

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 1989 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, errorMessageAbort(), and SCIPsdpiSolverIsIterlimExc().

Referenced by SCIPsdpiIsObjlimExc(), and SCIPsdpiSolverIsConverged().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsIterlimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the iteration limit was reached

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 2000 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, DSDP_CALL_BOOL, errorMessageAbort(), and SCIPsdpiSolverIsTimelimExc().

Referenced by SCIPsdpiIsIterlimExc(), and SCIPsdpiSolverIsObjlimExc().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsTimelimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the time limit was reached

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 2018 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverGetInternalStatus().

Referenced by SCIPsdpiIsTimelimExc(), SCIPsdpiSolve(), and SCIPsdpiSolverIsIterlimExc().

SCIP_EXPORT int SCIPsdpiSolverGetInternalStatus ( SCIP_SDPISOLVER sdpisolver)

returns the internal solution status of the solver, which has the following meaning:
-1: solver was not started
0: converged
1: infeasible start
2: numerical problems
3: objective limit reached
4: iteration limit reached
5: time limit reached
6: user termination
7: other

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 2038 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverIsOptimal().

Referenced by SCIPsdpiGetInternalStatus(), and SCIPsdpiSolverIsTimelimExc().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsOptimal ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP was solved to optimality, meaning the solver converged and returned primal and dual feasible solutions

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 2093 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, errorMessageAbort(), MOSEK_CALL_BOOL, SCIPsdpiSolverIsAcceptable(), SCIPsdpiSolverIsConverged(), SCIPsdpiSolverIsDualFeasible(), and SCIPsdpiSolverIsPrimalFeasible().

Referenced by checkSlaterCondition(), SCIPsdpiIsOptimal(), SCIPsdpiSolve(), and SCIPsdpiSolverGetInternalStatus().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsAcceptable ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff SDP was solved to optimality or some other status was reached that is still acceptable inside a Branch & Bound framework

Parameters
sdpisolverpointer to SDP-solver interface

Definition at line 2105 of file sdpisolver_dsdp.c.

References errorMessageAbort(), SCIPsdpiSolverFeasibilityKnown(), SCIPsdpiSolverIgnoreInstability(), and SCIPsdpiSolverIsConverged().

Referenced by checkFeastolAndResolve(), SCIPsdpiIsAcceptable(), SCIPsdpiSolve(), SCIPsdpiSolverIsOptimal(), SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiSolverSettingsUsed().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverIgnoreInstability ( SCIP_SDPISOLVER sdpisolver,
SCIP_Bool *  success 
)

tries to reset the internal status of the SDP-solver in order to ignore an instability of the last solving call

Parameters
sdpisolverpointer to an SDP-solver interface
successpointer to store, whether the instability could be ignored

Definition at line 2115 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverGetObjval().

Referenced by SCIPsdpiSolverIsAcceptable().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetObjval ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real *  objval 
)

gets objective value of solution

Parameters
sdpisolverpointer to an SDP-solver interface
objvalpointer to store the objective value

Definition at line 2125 of file sdpisolver_dsdp.c.

References BMS_CALL, CHECK_IF_SOLVED, DSDP_CALL, errorMessageAbort(), MOSEK_CALL, SCIPsdpiSolverGetSol(), SCIPsdpiSolverInfinity(), and SCIPsdpiSolverIsDualUnbounded().

Referenced by checkSlaterCondition(), SCIPsdpiGetLowerObjbound(), SCIPsdpiGetObjval(), SCIPsdpiSolve(), SCIPsdpiSolverGetSol(), and SCIPsdpiSolverIgnoreInstability().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSol ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real *  objval,
SCIP_Real *  dualsol,
int *  dualsollength 
)

gets dual solution vector for feasible SDPs

If dualsollength isn't equal to the number of variables this will return the needed length and a debug message is thrown.

Parameters
sdpisolverpointer to an SDP-solver interface
objvalpointer to store the objective value, may be NULL if not needed
dualsolpointer to store the dual solution vector, may be NULL if not needed
dualsollengthlength of the dual sol vector, must be 0 if dualsol is NULL, if this is less than the number of variables in the SDP, a DebugMessage will be thrown and this is set to the needed value

Definition at line 2176 of file sdpisolver_dsdp.c.

References BMS_CALL, CHECK_IF_SOLVED, DSDP_CALL, errorMessageAbort(), MOSEK_CALL, SCIPsdpiSolverGetObjval(), and SCIPsdpiSolverGetPreoptimalPrimalNonzeros().

Referenced by checkFeastolAndResolve(), SCIPsdpiGetSol(), SCIPsdpiSolverGetObjval(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPreoptimalPrimalNonzeros ( SCIP_SDPISOLVER sdpisolver,
int  nblocks,
int *  startXnblocknonz 
)

return number of nonzeros for each block of the primal solution matrix X for the preoptimal solution

Parameters
sdpisolverpointer to an SDP-solver interface
nblockslength of startXnblocknonz (should be nsdpblocks + 1)
startXnblocknonzpointer to store number of nonzeros for row/col/val-arrays in each block or first entry -1 if no primal solution is available

Definition at line 2255 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, errorMessageAbort(), and SCIPsdpiSolverGetPreoptimalSol().

Referenced by SCIPsdpiGetPreoptimalPrimalNonzeros(), and SCIPsdpiSolverGetSol().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPreoptimalSol ( SCIP_SDPISOLVER sdpisolver,
SCIP_Bool *  success,
SCIP_Real *  dualsol,
int *  dualsollength,
int  nblocks,
int *  startXnblocknonz,
int **  startXrow,
int **  startXcol,
SCIP_Real **  startXval 
)

gets preoptimal dual solution vector and primal matrix for warmstarting purposes

Note
last block will be the LP block (if one exists) with indices lhs(row0), rhs(row0), lhs(row1), ..., lb(var1), ub(var1), lb(var2), ... independant of some lhs/rhs being infinity
If dualsollength isn't equal to the number of variables this will return the needed length and a debug message is thrown.
If the allocated memory for row/col/val is insufficient, a debug message will be thrown and the neccessary amount is returned in startXnblocknonz
Parameters
sdpisolverpointer to an SDP-solver interface
successcould a preoptimal solution be returned ?
dualsolpointer to store the dual solution vector, may be NULL if not needed
dualsollengthlength of the dual sol vector, must be 0 if dualsol is NULL, if this is less than the number of variables in the SDP, a DebugMessage will be thrown and this is set to the needed value
nblockslength of startXnblocknonz (should be nsdpblocks + 1) or -1 if no primal matrix should be returned
startXnblocknonzinput: allocated memory for row/col/val-arrays in each block (or NULL if nblocks = -1) output: number of nonzeros in each block or first entry -1 if no primal solution is available
startXrowpointer to store row indices of X (or NULL if nblocks = -1)
startXcolpointer to store column indices of X (or NULL if nblocks = -1)
startXvalpointer to store values of X (or NULL if nblocks = -1)

Definition at line 2274 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverGetPrimalBoundVars().

Referenced by SCIPsdpiGetPreoptimalSol(), and SCIPsdpiSolverGetPreoptimalPrimalNonzeros().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalBoundVars ( SCIP_SDPISOLVER sdpisolver,
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
sdpisolverpointer to an SDP-solver interface
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 2342 of file sdpisolver_dsdp.c.

References BMS_CALL, CHECK_IF_SOLVED, DSDP_CALL, errorMessageAbort(), MOSEK_CALL, and SCIPsdpiSolverGetPrimalNonzeros().

Referenced by SCIPsdpiGetPrimalBoundVars(), and SCIPsdpiSolverGetPreoptimalSol().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalNonzeros ( SCIP_SDPISOLVER sdpisolver,
int  nblocks,
int *  startXnblocknonz 
)

return number of nonzeros for each block of the primal solution matrix X (including lp block)

Parameters
sdpisolverpointer to an SDP-solver interface
nblockslength of startXnblocknonz
startXnblocknonzpointer to store number of nonzeros for row/col/val-arrays in each block

Definition at line 2401 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, errorMessageAbort(), and SCIPsdpiSolverGetPrimalMatrix().

Referenced by SCIPsdpiGetPrimalNonzeros(), and SCIPsdpiSolverGetPrimalBoundVars().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetPrimalMatrix ( SCIP_SDPISOLVER sdpisolver,
int  nblocks,
int *  startXnblocknonz,
int **  startXrow,
int **  startXcol,
SCIP_Real **  startXval 
)

returns the primal matrix X

Note
last block will be the LP block (if one exists) with indices lhs(row0), rhs(row0), lhs(row1), ..., lb(var1), ub(var1), lb(var2), ... independant of some lhs/rhs being infinity
If the allocated memory for row/col/val is insufficient, a debug message will be thrown and the neccessary amount is returned in startXnblocknonz
Parameters
sdpisolverpointer to an SDP-solver interface
nblockslength of startXnblocknonz (should be nsdpblocks + 1)
startXnblocknonzinput: allocated memory for row/col/val-arrays in each block output: number of nonzeros in each block
startXrowpointer to store row indices of X
startXcolpointer to store column indices of X
startXvalpointer to store values of X

Definition at line 2417 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, errorMessageAbort(), and SCIPsdpiSolverGetMaxPrimalEntry().

Referenced by SCIPsdpiGetPrimalMatrix(), and SCIPsdpiSolverGetPrimalNonzeros().

SCIP_EXPORT SCIP_Real SCIPsdpiSolverGetMaxPrimalEntry ( SCIP_SDPISOLVER sdpisolver)

return the maximum absolute value of the optimal primal matrix

Parameters
sdpisolverpointer to an SDP-solver interface

Definition at line 2432 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverGetIterations().

Referenced by SCIPsdpiGetMaxPrimalEntry(), and SCIPsdpiSolverGetPrimalMatrix().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetIterations ( SCIP_SDPISOLVER sdpisolver,
int *  iterations 
)

gets the number of SDP iterations of the last solve call

Parameters
sdpisolverpointer to an SDP-solver interface
iterationspointer to store the number of iterations of the last solve call

Definition at line 2441 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverGetSdpCalls().

Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverGetMaxPrimalEntry().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetSdpCalls ( SCIP_SDPISOLVER sdpisolver,
int *  calls 
)

gets the number of calls to the SDP-solver for the last solve call

Parameters
sdpisolverSDP-solver interface
callspointer to store the number of calls to the SDP-solver for the last solve call

Definition at line 2458 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverSettingsUsed().

Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverGetIterations().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSettingsUsed ( SCIP_SDPISOLVER sdpisolver,
SCIP_SDPSOLVERSETTING usedsetting 
)

gets the settings used by the SDP solver for the last solve call

Parameters
sdpisolverSDP-solver interface
usedsettingthe setting used by the SDP-solver

Definition at line 2475 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, errorMessageAbort(), SCIP_SDPSOLVERSETTING_FAST, SCIP_SDPSOLVERSETTING_PENALTY, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPsdpiSolverInfinity(), and SCIPsdpiSolverIsAcceptable().

Referenced by SCIPsdpiSettingsUsed(), SCIPsdpiSlaterSettings(), and SCIPsdpiSolverGetSdpCalls().

SCIP_EXPORT SCIP_Real SCIPsdpiSolverInfinity ( SCIP_SDPISOLVER sdpisolver)

returns value treated as infinity in the SDP-solver

Parameters
sdpisolverpointer to an SDP-solver interface

Definition at line 2504 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverIsInfinity().

Referenced by checkSlaterCondition(), SCIPsdpiCreate(), SCIPsdpiInfinity(), SCIPsdpiSlaterSettings(), SCIPsdpiSolve(), SCIPsdpiSolverCreate(), SCIPsdpiSolverGetObjval(), SCIPsdpiSolverIsInfinity(), SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiSolverSettingsUsed().

SCIP_EXPORT SCIP_Bool SCIPsdpiSolverIsInfinity ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  val 
)

checks if given value is treated as (plus or minus) infinity in the SDP-solver

Parameters
sdpisolverpointer to an SDP-solver interface
valvalue to be checked for infinity

Definition at line 2512 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverGetRealpar(), and SCIPsdpiSolverInfinity().

Referenced by checkSlaterCondition(), SCIPsdpiSolverInfinity(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetRealpar ( SCIP_SDPISOLVER sdpisolver,
SCIP_SDPPARAM  type,
SCIP_Real *  dval 
)

gets floating point parameter of SDP-Solver

Parameters
sdpisolverpointer to an SDP-solver interface
typeparameter number
dvalbuffer to store the parameter value

Definition at line 2521 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_EPSILON, SCIP_SDPPAR_FEASTOL, SCIP_SDPPAR_GAPTOL, SCIP_SDPPAR_LAMBDASTAR, SCIP_SDPPAR_OBJLIMIT, SCIP_SDPPAR_PENALTYPARAM, SCIP_SDPPAR_SDPSOLVERFEASTOL, SCIP_SDPPAR_WARMSTARTPOGAP, and SCIPsdpiSolverSetRealpar().

Referenced by SCIPsdpiGetRealpar(), and SCIPsdpiSolverIsInfinity().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSetRealpar ( SCIP_SDPISOLVER sdpisolver,
SCIP_SDPPARAM  type,
SCIP_Real  dval 
)

sets floating point parameter of SDP-Solver

Parameters
sdpisolverpointer to an SDP-solver interface
typeparameter number
dvalparameter value

Definition at line 2561 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_EPSILON, SCIP_SDPPAR_FEASTOL, SCIP_SDPPAR_GAPTOL, SCIP_SDPPAR_LAMBDASTAR, SCIP_SDPPAR_OBJLIMIT, SCIP_SDPPAR_PENALTYPARAM, SCIP_SDPPAR_SDPSOLVERFEASTOL, SCIP_SDPPAR_WARMSTARTPOGAP, and SCIPsdpiSolverGetIntpar().

Referenced by SCIPsdpiSetRealpar(), SCIPsdpiSolve(), and SCIPsdpiSolverGetRealpar().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverGetIntpar ( SCIP_SDPISOLVER sdpisolver,
SCIP_SDPPARAM  type,
int *  ival 
)

gets integer parameter of SDP-Solver

Parameters
sdpisolverpointer to an SDP-solver interface
typeparameter number
ivalparameter value

Definition at line 2610 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_NTHREADS, SCIP_SDPPAR_SDPINFO, and SCIPsdpiSolverSetIntpar().

Referenced by SCIPsdpiGetIntpar(), and SCIPsdpiSolverSetRealpar().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverSetIntpar ( SCIP_SDPISOLVER sdpisolver,
SCIP_SDPPARAM  type,
int  ival 
)

sets integer parameter of SDP-Solver

Parameters
sdpisolverpointer to an SDP-solver interface
typeparameter number
ivalparameter value

Definition at line 2632 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_NTHREADS, SCIP_SDPPAR_SDPINFO, and SCIPsdpiSolverComputeLambdastar().

Referenced by SCIPsdpiSetIntpar(), and SCIPsdpiSolverGetIntpar().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputeLambdastar ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  maxguess 
)

compute and set lambdastar (only used for SDPA)

Parameters
sdpisolverpointer to an SDP-solver interface
maxguessmaximum guess for lambda star of all SDP-constraints

Definition at line 2654 of file sdpisolver_dsdp.c.

References LAMBDASTAR_FACTOR, LAMBDASTAR_HIGH, LAMBDASTAR_LOW, LAMBDASTAR_THRESHOLD, MAX_LAMBDASTAR, MIN_LAMBDASTAR, and SCIPsdpiSolverComputePenaltyparam().

Referenced by SCIPsdpiComputeLambdastar(), and SCIPsdpiSolverSetIntpar().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputePenaltyparam ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  maxcoeff,
SCIP_Real *  penaltyparam 
)

compute and set the penalty parameter

Parameters
sdpisolverpointer to an SDP-solver interface
maxcoeffmaximum objective coefficient
penaltyparamthe computed penalty parameter

Definition at line 2665 of file sdpisolver_dsdp.c.

References MAX_PENALTYPARAM, MIN_PENALTYPARAM, PENALTYPARAM_FACTOR, and SCIPsdpiSolverComputeMaxPenaltyparam().

Referenced by SCIPsdpiComputePenaltyparam(), and SCIPsdpiSolverComputeLambdastar().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverComputeMaxPenaltyparam ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  penaltyparam,
SCIP_Real *  maxpenaltyparam 
)

compute and set the maximum penalty parameter

Parameters
sdpisolverpointer to an SDP-solver interface
penaltyparamthe initial penalty parameter
maxpenaltyparamthe computed maximum penalty parameter

Definition at line 2700 of file sdpisolver_dsdp.c.

References MAX_MAXPENALTYPARAM, MAXPENALTYPARAM_FACTOR, and SCIPsdpiSolverReadSDP().

Referenced by SCIPsdpiComputeMaxPenaltyparam(), and SCIPsdpiSolverComputePenaltyparam().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverReadSDP ( SCIP_SDPISOLVER sdpisolver,
const char *  fname 
)

reads SDP from a file

Parameters
sdpisolverpointer to an SDP-solver interface
fnamefile name

Definition at line 2746 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and SCIPsdpiSolverWriteSDP().

Referenced by SCIPsdpiSolverComputeMaxPenaltyparam().

SCIP_EXPORT SCIP_RETCODE SCIPsdpiSolverWriteSDP ( SCIP_SDPISOLVER sdpisolver,
const char *  fname 
)

writes SDP to a file

Parameters
sdpisolverpointer to an SDP-solver interface
fnamefile name

Definition at line 2756 of file sdpisolver_dsdp.c.

References errorMessageAbort(), and MOSEK_CALL.

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiSolverReadSDP().