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

interface for DSDP More...

Go to the source code of this file.

Macros

#define DSDP_CALL(x)
 
#define DSDP_CALL_BOOL(x)
 
#define DSDP_CALLM(x)
 
#define BMS_CALL(x)
 
#define CHECK_IF_SOLVED(sdpisolver)
 
#define CHECK_IF_SOLVED_BOOL(sdpisolver)
 

Functions

static int compLowerTriangPos (int i, int j)
 
static SCIP_Bool isFixed (SCIP_SDPISOLVER *sdpisolver, SCIP_Real lb, SCIP_Real ub)
 
static void sortColRow (int *row, int *col, SCIP_Real *val, int length)
 
Miscellaneous Methods
const char * SCIPsdpiSolverGetSolverName (void)
 
const char * SCIPsdpiSolverGetSolverDesc (void)
 
void * SCIPsdpiSolverGetSolverPointer (SCIP_SDPISOLVER *sdpisolver)
 
SDPI Creation and Destruction Methods
SCIP_RETCODE SCIPsdpiSolverCreate (SCIP_SDPISOLVER **sdpisolver, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem)
 
SCIP_RETCODE SCIPsdpiSolverFree (SCIP_SDPISOLVER **sdpisolver)
 
SCIP_RETCODE SCIPsdpiSolverIncreaseCounter (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_RETCODE SCIPsdpiSolverResetCounter (SCIP_SDPISOLVER *sdpisolver)
 
Solving Methods
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 *start)
 
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 *start, SCIP_Bool *feasorig)
 
Solution Information Methods
SCIP_Bool SCIPsdpiSolverWasSolved (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverFeasibilityKnown (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_RETCODE SCIPsdpiSolverGetSolFeasibility (SCIP_SDPISOLVER *sdpisolver, SCIP_Bool *primalfeasible, SCIP_Bool *dualfeasible)
 
SCIP_Bool SCIPsdpiSolverIsPrimalUnbounded (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsPrimalInfeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsPrimalFeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsDualUnbounded (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsDualInfeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsDualFeasible (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsConverged (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsObjlimExc (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsIterlimExc (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsTimelimExc (SCIP_SDPISOLVER *sdpisolver)
 
int SCIPsdpiSolverGetInternalStatus (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsOptimal (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsAcceptable (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_RETCODE SCIPsdpiSolverIgnoreInstability (SCIP_SDPISOLVER *sdpisolver, SCIP_Bool *success)
 
SCIP_RETCODE SCIPsdpiSolverGetObjval (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *objval)
 
SCIP_RETCODE SCIPsdpiSolverGetSol (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *objval, SCIP_Real *dualsol, int *dualsollength)
 
SCIP_RETCODE SCIPsdpiSolverGetPrimalBoundVars (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *lbvars, SCIP_Real *ubvars, int *arraylength)
 
SCIP_RETCODE SCIPsdpiSolverGetIterations (SCIP_SDPISOLVER *sdpisolver, int *iterations)
 
Numerical Methods
SCIP_Real SCIPsdpiSolverInfinity (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsInfinity (SCIP_SDPISOLVER *sdpisolver, SCIP_Real val)
 
SCIP_Real SCIPsdpiSolverMaxPenParam (SCIP_SDPISOLVER *sdpisolver)
 
SCIP_Bool SCIPsdpiSolverIsGEMaxPenParam (SCIP_SDPISOLVER *sdpisolver, SCIP_Real val)
 
SCIP_RETCODE SCIPsdpiSolverGetRealpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, SCIP_Real *dval)
 
SCIP_RETCODE SCIPsdpiSolverSetRealpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, SCIP_Real dval)
 
SCIP_RETCODE SCIPsdpiSolverGetIntpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, int *ival)
 
SCIP_RETCODE SCIPsdpiSolverSetIntpar (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPPARAM type, int ival)
 
File Interface Methods
SCIP_RETCODE SCIPsdpiSolverReadSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname)
 
SCIP_RETCODE SCIPsdpiSolverWriteSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname)
 

Detailed Description

interface for DSDP

Author
Tristan Gally

Definition in file sdpisolver_dsdp.c.

Macro Definition Documentation

#define DSDP_CALL (   x)
Value:
do \
{ \
int _dsdperrorcode_; \
if ( (_dsdperrorcode_ = (x)) != 0 ) \
{ \
SCIPerrorMessage("DSDP-Error <%d> in function call.\n", _dsdperrorcode_); \
return SCIP_LPERROR; \
} \
} \
while( FALSE )

Calls a DSDP-Function and transforms the return-code to a SCIP_LPERROR if needed.

Definition at line 56 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverFree(), SCIPsdpiSolverGetIterations(), SCIPsdpiSolverGetObjval(), SCIPsdpiSolverGetPrimalBoundVars(), SCIPsdpiSolverGetSol(), SCIPsdpiSolverGetSolFeasibility(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

#define DSDP_CALL_BOOL (   x)
Value:
do \
{ \
int _dsdperrorcode_; \
if ( (_dsdperrorcode_ = (x)) != 0 ) \
{ \
SCIPerrorMessage("DSDP-Error <%d> in function call.\n", _dsdperrorcode_); \
return FALSE; \
} \
} \
while( FALSE )

Same as DSDP_CALL, but used for functions returning a boolean.

Definition at line 68 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverFeasibilityKnown(), SCIPsdpiSolverIsConverged(), SCIPsdpiSolverIsDualFeasible(), SCIPsdpiSolverIsDualInfeasible(), SCIPsdpiSolverIsDualUnbounded(), SCIPsdpiSolverIsIterlimExc(), SCIPsdpiSolverIsPrimalFeasible(), SCIPsdpiSolverIsPrimalInfeasible(), and SCIPsdpiSolverIsPrimalUnbounded().

#define DSDP_CALLM (   x)
Value:
do \
{ \
int _dsdperrorcode_; \
if ( (_dsdperrorcode_ = (x)) != 0 ) \
{ \
SCIPerrorMessage("DSDP-Error <%d> in function call.\n", _dsdperrorcode_); \
return SCIP_NOMEMORY; \
} \
} \
while( FALSE )

Same as DSDP_CALL, but this will be used for initialization methods with memory allocation and return a SCIP_NOMEMORY if an error is produced.

Definition at line 80 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().

#define BMS_CALL (   x)
Value:
do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call.\n"); \
return SCIP_NOMEMORY; \
} \
} \
while( FALSE )

Checks if a BMSallocMemory-call was successfull, otherwise returns SCIP_NOMEMRY.

Definition at line 92 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverCreate(), SCIPsdpiSolverGetPrimalBoundVars(), SCIPsdpiSolverGetSol(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

#define CHECK_IF_SOLVED (   sdpisolver)
Value:
do \
{ \
if (!(sdpisolver->solved)) \
{ \
SCIPerrorMessage("Tried to access solution information for SDP %d ahead of solving!\n", sdpisolver->sdpcounter); \
return SCIP_LPERROR; \
} \
} \
while( FALSE )

This will be called in all functions that want to access solution information to check if the problem was solved since the last change of the problem.

Definition at line 103 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverGetIterations(), SCIPsdpiSolverGetObjval(), SCIPsdpiSolverGetPrimalBoundVars(), SCIPsdpiSolverGetSol(), and SCIPsdpiSolverGetSolFeasibility().

#define CHECK_IF_SOLVED_BOOL (   sdpisolver)
Value:
do \
{ \
if (!(sdpisolver->solved)) \
{ \
SCIPerrorMessage("Tried to access solution information for SDP %d ahead of solving!\n", sdpisolver->sdpcounter); \
return FALSE; \
} \
} \
while( FALSE )

This is the same as CHECK_IF_SOLVED, but will be called for methods returning a bool instead of a SCIP_RETURNCODE

Definition at line 114 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverFeasibilityKnown(), SCIPsdpiSolverIsConverged(), SCIPsdpiSolverIsDualFeasible(), SCIPsdpiSolverIsDualInfeasible(), SCIPsdpiSolverIsDualUnbounded(), SCIPsdpiSolverIsIterlimExc(), SCIPsdpiSolverIsPrimalFeasible(), SCIPsdpiSolverIsPrimalInfeasible(), and SCIPsdpiSolverIsPrimalUnbounded().

Function Documentation

static int compLowerTriangPos ( int  i,
int  j 
)
static

for given row and column (i,j) computes the position in the lower triangular part, if these positions are numbered from 0 to n(n+1)/2 - 1, this needs to be called for i >= j

Parameters
irow index
jcolumn index

Definition at line 160 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().

static SCIP_Bool isFixed ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  lb,
SCIP_Real  ub 
)
static

test if a lower bound lb is not smaller than an upper bound ub, meaning that lb > ub - epsilon

Parameters
sdpisolverpointer to an SDP interface solver structure
lblower bound
ubupper bound

Definition at line 174 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().

static void sortColRow ( int *  row,
int *  col,
SCIP_Real *  val,
int  length 
)
static

sort the given row, col and val arrays first by non-decreasing col-indices, than for those with identical col-indices by non-increasing row-indices

Definition at line 190 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().

const char* SCIPsdpiSolverGetSolverName ( void  )

gets name and version (if available) of SDP solver

Definition at line 226 of file sdpisolver_dsdp.c.

const char* SCIPsdpiSolverGetSolverDesc ( void  )

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

Definition at line 234 of file sdpisolver_dsdp.c.

void* SCIPsdpiSolverGetSolverPointer ( SCIP_SDPISOLVER sdpisolver)

gets pointer for 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 interface solver structure

Definition at line 248 of file sdpisolver_dsdp.c.

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

creates an SDP problem object

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

Definition at line 267 of file sdpisolver_dsdp.c.

References BMS_CALL, and SCIPsdpiSolverInfinity().

SCIP_RETCODE SCIPsdpiSolverFree ( SCIP_SDPISOLVER **  sdpisolver)

deletes an SDP problem object

Parameters
sdpisolverpointer to an SDP interface solver structure

Definition at line 308 of file sdpisolver_dsdp.c.

References DSDP_CALL.

SCIP_RETCODE SCIPsdpiSolverIncreaseCounter ( SCIP_SDPISOLVER sdpisolver)

increases the SDP-Counter

Parameters
sdpisolverSDP interface solver structure

Definition at line 337 of file sdpisolver_dsdp.c.

SCIP_RETCODE SCIPsdpiSolverResetCounter ( SCIP_SDPISOLVER sdpisolver)

reset the SDP-Counter to zero

Parameters
sdpisolverSDP interface solver structure

Definition at line 349 of file sdpisolver_dsdp.c.

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 *  start 
)

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.
Parameters
sdpisolverSDP interface solver structure
nvarsnumber of variables
objobjective function values 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)
startNULL or a starting point for the solver, this should have length nvars

Definition at line 383 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverLoadAndSolveWithPenalty().

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 *  start,
SCIP_Bool *  feasorig 
)

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.
Parameters
sdpisolverSDP interface solver structure
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 function values 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)
startNULL or a starting point for the solver, this should have length nvars
feasorigpointer to store if the solution to the penalty-formulation is feasible for the original problem (may be NULL if penaltyparam = 0)

Definition at line 448 of file sdpisolver_dsdp.c.

References BMS_CALL, compLowerTriangPos(), DSDP_CALL, DSDP_CALLM, isFixed(), SCIPsdpiSolverInfinity(), SCIPsdpiSolverIsInfinity(), and sortColRow().

Referenced by SCIPsdpiSolverLoadAndSolve().

SCIP_Bool SCIPsdpiSolverWasSolved ( SCIP_SDPISOLVER sdpisolver)

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

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1301 of file sdpisolver_dsdp.c.

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 doesn't know anything about the feasibility status and thus the functions IsPrimalFeasible etc. shouldn't be used.

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1315 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

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 interface solver structure
primalfeasiblestores primal feasibility status
dualfeasiblestores dual feasibility status

Definition at line 1333 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, and DSDP_CALL.

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 interface solver structure

Definition at line 1375 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

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 interface solver structure

Definition at line 1401 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

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 interface solver structure

Definition at line 1427 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

Referenced by SCIPsdpiSolverIsOptimal().

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 interface solver structure

Definition at line 1450 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

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 interface solver structure

Definition at line 1473 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

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 interface solver structure

Definition at line 1497 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

Referenced by SCIPsdpiSolverIsOptimal().

SCIP_Bool SCIPsdpiSolverIsConverged ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the solver converged

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1520 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

Referenced by SCIPsdpiSolverIsAcceptable(), and SCIPsdpiSolverIsOptimal().

SCIP_Bool SCIPsdpiSolverIsObjlimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the objective limit was reached

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1538 of file sdpisolver_dsdp.c.

SCIP_Bool SCIPsdpiSolverIsIterlimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the iteration limit was reached

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1549 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED_BOOL, and DSDP_CALL_BOOL.

SCIP_Bool SCIPsdpiSolverIsTimelimExc ( SCIP_SDPISOLVER sdpisolver)

returns TRUE iff the time limit was reached

Parameters
sdpisolverpointer to SDP interface solver structure

Definition at line 1567 of file sdpisolver_dsdp.c.

int SCIPsdpiSolverGetInternalStatus ( SCIP_SDPISOLVER sdpisolver)

returns the internal solution status of the solver, which has the following meaning:
-1: solver wasn't 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 interface solver structure

Definition at line 1585 of file sdpisolver_dsdp.c.

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 interface solver structure

Definition at line 1637 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverIsConverged(), SCIPsdpiSolverIsDualFeasible(), and SCIPsdpiSolverIsPrimalFeasible().

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 interface solver structure

Definition at line 1647 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverIsConverged().

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 interface solver structure
successpointer to store, whether the instability could be ignored

Definition at line 1660 of file sdpisolver_dsdp.c.

SCIP_RETCODE SCIPsdpiSolverGetObjval ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real *  objval 
)

gets objective value of solution

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

Definition at line 1670 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, and DSDP_CALL.

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 interface solver structure
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 1692 of file sdpisolver_dsdp.c.

References BMS_CALL, CHECK_IF_SOLVED, and DSDP_CALL.

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 interface solver structure
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 1759 of file sdpisolver_dsdp.c.

References BMS_CALL, CHECK_IF_SOLVED, and DSDP_CALL.

SCIP_RETCODE SCIPsdpiSolverGetIterations ( SCIP_SDPISOLVER sdpisolver,
int *  iterations 
)

gets the number of SDP iterations of the last solve call

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

Definition at line 1818 of file sdpisolver_dsdp.c.

References CHECK_IF_SOLVED, and DSDP_CALL.

SCIP_Real SCIPsdpiSolverInfinity ( SCIP_SDPISOLVER sdpisolver)

returns value treated as infinity in the SDP solver

Parameters
sdpisolverpointer to an SDP interface solver structure

Definition at line 1844 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverCreate(), SCIPsdpiSolverIsInfinity(), and SCIPsdpiSolverLoadAndSolveWithPenalty().

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 interface solver structure
valvalue to be checked for infinity

Definition at line 1852 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverInfinity().

Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().

SCIP_Real SCIPsdpiSolverMaxPenParam ( SCIP_SDPISOLVER sdpisolver)

returns highest penalty parameter to be used

Parameters
sdpisolverpointer to an SDP interface solver structure

Definition at line 1861 of file sdpisolver_dsdp.c.

Referenced by SCIPsdpiSolverIsGEMaxPenParam().

SCIP_Bool SCIPsdpiSolverIsGEMaxPenParam ( SCIP_SDPISOLVER sdpisolver,
SCIP_Real  val 
)

checks if given value is greater or equal to the highest penalty parameter to be used

Parameters
sdpisolverpointer to an SDP interface solver structure
valvalue to be compared to maximum penalty parameter

Definition at line 1869 of file sdpisolver_dsdp.c.

References SCIPsdpiSolverMaxPenParam().

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

gets floating point parameter of SDP-Solver

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

Definition at line 1878 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_EPSILON, SCIP_SDPPAR_FEASTOL, and SCIP_SDPPAR_OBJLIMIT.

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

sets floating point parameter of SDP-Solver

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

Definition at line 1906 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_EPSILON, SCIP_SDPPAR_FEASTOL, and SCIP_SDPPAR_OBJLIMIT.

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

gets integer parameter of SDP-Solver

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

Definition at line 1938 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_SDPINFO.

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

sets integer parameter of SDP-Solver

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

Definition at line 1960 of file sdpisolver_dsdp.c.

References SCIP_SDPPAR_SDPINFO.

SCIP_RETCODE SCIPsdpiSolverReadSDP ( SCIP_SDPISOLVER sdpisolver,
const char *  fname 
)

reads SDP from a file

Parameters
sdpisolverpointer to an SDP interface solver structure
fnamefile name

Definition at line 1994 of file sdpisolver_dsdp.c.

SCIP_RETCODE SCIPsdpiSolverWriteSDP ( SCIP_SDPISOLVER sdpisolver,
const char *  fname 
)

writes SDP to a file

Parameters
sdpisolverpointer to an SDP interface solver structure
fnamefile name

Definition at line 2004 of file sdpisolver_dsdp.c.