SCIP-SDP
3.2.0
|
interface for SDPA More...
Go to the source code of this file.
Macros | |
#define | GAPTOLCHANGE 1 |
#define | FEASTOLCHANGE 1 |
#define | PENALTYBOUNDTOL 1E-3 |
#define | INFEASFEASTOLCHANGE 0.1 |
#define | INFEASMINFEASTOL 1E-9 |
#define | MIN_LAMBDASTAR 1e0 |
#define | MAX_LAMBDASTAR 1e8 |
#define | LAMBDASTAR_FACTOR 1e0 |
#define | LAMBDASTAR_TWOPOINTS TRUE |
#define | LAMBDASTAR_THRESHOLD 1e1 |
#define | LAMBDASTAR_LOW 1.5 |
#define | LAMBDASTAR_HIGH 1e5 |
#define | MIN_PENALTYPARAM 1e5 |
#define | MAX_PENALTYPARAM 1e12 |
#define | PENALTYPARAM_FACTOR 1e1 |
#define | MAX_MAXPENALTYPARAM 1e15 |
#define | MAXPENALTYPARAM_FACTOR 1e6 |
#define | BMS_CALL(x) |
#define | CHECK_IF_SOLVED(sdpisolver) |
#define | CHECK_IF_SOLVED_BOOL(sdpisolver) |
Functions | |
static SCIP_Bool | isFixed (SCIP_SDPISOLVER *sdpisolver, SCIP_Real lb, SCIP_Real ub) |
static SCIP_RETCODE | checkFeastolAndResolve (SCIP_SDPISOLVER *sdpisolver, SCIP_Real penaltyparam, int nvars, 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 nlpcons, int noldlpcons, SCIP_Real *lplhs, SCIP_Real *lprhs, int *rownactivevars, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *feastol) |
Miscellaneous Methods | |
const char * | SCIPsdpiSolverGetSolverName (void) |
const char * | SCIPsdpiSolverGetSolverDesc (void) |
void * | SCIPsdpiSolverGetSolverPointer (SCIP_SDPISOLVER *sdpisolver) |
SCIP_Real | SCIPsdpiSolverGetDefaultSdpiSolverFeastol (void) |
SCIP_Real | SCIPsdpiSolverGetDefaultSdpiSolverGaptol (void) |
int | SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases (void) |
SCIP_Bool | SCIPsdpiSolverDoesWarmstartNeedPrimal (void) |
SDPI Creation and Destruction Methods | |
SCIP_RETCODE | SCIPsdpiSolverCreate (SCIP_SDPISOLVER **sdpisolver, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem) |
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 *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) |
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_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 | SCIPsdpiSolverGetPreoptimalPrimalNonzeros (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz) |
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_RETCODE | SCIPsdpiSolverGetPrimalBoundVars (SCIP_SDPISOLVER *sdpisolver, SCIP_Real *lbvars, SCIP_Real *ubvars, int *arraylength) |
SCIP_RETCODE | SCIPsdpiSolverGetPrimalNonzeros (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz) |
SCIP_RETCODE | SCIPsdpiSolverGetPrimalMatrix (SCIP_SDPISOLVER *sdpisolver, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval) |
SCIP_Real | SCIPsdpiSolverGetMaxPrimalEntry (SCIP_SDPISOLVER *sdpisolver) |
SCIP_RETCODE | SCIPsdpiSolverGetIterations (SCIP_SDPISOLVER *sdpisolver, int *iterations) |
SCIP_RETCODE | SCIPsdpiSolverGetSdpCalls (SCIP_SDPISOLVER *sdpisolver, int *calls) |
SCIP_RETCODE | SCIPsdpiSolverSettingsUsed (SCIP_SDPISOLVER *sdpisolver, SCIP_SDPSOLVERSETTING *usedsetting) |
Numerical Methods | |
SCIP_Real | SCIPsdpiSolverInfinity (SCIP_SDPISOLVER *sdpisolver) |
SCIP_Bool | SCIPsdpiSolverIsInfinity (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) |
SCIP_RETCODE | SCIPsdpiSolverComputeLambdastar (SCIP_SDPISOLVER *sdpisolver, SCIP_Real maxguess) |
SCIP_RETCODE | SCIPsdpiSolverComputePenaltyparam (SCIP_SDPISOLVER *sdpisolver, SCIP_Real maxcoeff, SCIP_Real *penaltyparam) |
SCIP_RETCODE | SCIPsdpiSolverComputeMaxPenaltyparam (SCIP_SDPISOLVER *sdpisolver, SCIP_Real penaltyparam, SCIP_Real *maxpenaltyparam) |
File Interface Methods | |
SCIP_RETCODE | SCIPsdpiSolverReadSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname) |
SCIP_RETCODE | SCIPsdpiSolverWriteSDP (SCIP_SDPISOLVER *sdpisolver, const char *fname) |
interface for SDPA
Definition in file sdpisolver_sdpa.cpp.
#define GAPTOLCHANGE 1 |
change gaptol by this factor when switching from fast to default and from default to stable settings
Definition at line 67 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
#define FEASTOLCHANGE 1 |
change feastol by this factor when switching from fast to default and from default to stable settings
Definition at line 68 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
#define PENALTYBOUNDTOL 1E-3 |
if the relative gap between Tr(X) and penaltyparam for a primal solution of the penaltyformulation is bigger than this value, it will be reported to the sdpi
Definition at line 69 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
#define INFEASFEASTOLCHANGE 0.1 |
change feastol by this factor if the solution was found to be infeasible with regards to feastol
Definition at line 73 of file sdpisolver_sdpa.cpp.
Referenced by checkFeastolAndResolve().
#define INFEASMINFEASTOL 1E-9 |
minimum value for feasibility tolerance when encountering problems with regards to tolerance
Definition at line 74 of file sdpisolver_sdpa.cpp.
Referenced by checkFeastolAndResolve().
#define MIN_LAMBDASTAR 1e0 |
if lambda star is to be computed, this is the minimum value it will take
Definition at line 76 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define MAX_LAMBDASTAR 1e8 |
if lambda star is to be computed, this is the maximum value it will take
Definition at line 77 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define LAMBDASTAR_FACTOR 1e0 |
if lambda star is to be computed, the biggest guess of the SDP blocks is multiplied by this value
Definition at line 78 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define LAMBDASTAR_TWOPOINTS TRUE |
if lambda star is to be computed, should we use only a low and a high value or instead a continuous interval
Definition at line 79 of file sdpisolver_sdpa.cpp.
#define LAMBDASTAR_THRESHOLD 1e1 |
if lambda star is to be computed and LAMBDASTAR_TWOPOINTS=TRUE, then we distinguish between low and high using this
Definition at line 80 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define LAMBDASTAR_LOW 1.5 |
if lambda star is to be computed and LAMBDASTAR_TWOPOINTS=TRUE, then this is the value for below the threshold
Definition at line 81 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define LAMBDASTAR_HIGH 1e5 |
if lambda star is to be computed and LAMBDASTAR_TWOPOINTS=TRUE, then this is the value for above the threshold
Definition at line 82 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeLambdastar().
#define MIN_PENALTYPARAM 1e5 |
if the penalty parameter is to be computed, this is the minimum value it will take
Definition at line 84 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputePenaltyparam().
#define MAX_PENALTYPARAM 1e12 |
if the penalty parameter is to be computed, this is the maximum value it will take
Definition at line 85 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputePenaltyparam().
#define PENALTYPARAM_FACTOR 1e1 |
if the penalty parameter is to be computed, the maximal objective coefficient will be multiplied by this
Definition at line 86 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputePenaltyparam().
#define MAX_MAXPENALTYPARAM 1e15 |
if the maximum penaltyparameter is to be computed, this is the maximum value it will take
Definition at line 87 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeMaxPenaltyparam().
#define MAXPENALTYPARAM_FACTOR 1e6 |
if the maximum penaltyparameter is to be computed, it will be set to penaltyparam * this
Definition at line 88 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverComputeMaxPenaltyparam().
#define BMS_CALL | ( | x | ) |
Checks if a BMSallocMemory-call was successfull, otherwise returns SCIP_NOMEMORY.
Definition at line 92 of file sdpisolver_sdpa.cpp.
Referenced by checkFeastolAndResolve(), SCIPsdpiSolverCreate(), and SCIPsdpiSolverLoadAndSolveWithPenalty().
#define CHECK_IF_SOLVED | ( | sdpisolver | ) |
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_sdpa.cpp.
Referenced by SCIPsdpiSolverGetObjval(), SCIPsdpiSolverGetPreoptimalPrimalNonzeros(), SCIPsdpiSolverGetPrimalBoundVars(), SCIPsdpiSolverGetPrimalMatrix(), SCIPsdpiSolverGetPrimalNonzeros(), SCIPsdpiSolverGetSol(), SCIPsdpiSolverGetSolFeasibility(), and SCIPsdpiSolverSettingsUsed().
#define CHECK_IF_SOLVED_BOOL | ( | sdpisolver | ) |
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_sdpa.cpp.
Referenced by SCIPsdpiSolverFeasibilityKnown(), SCIPsdpiSolverIsConverged(), SCIPsdpiSolverIsDualFeasible(), SCIPsdpiSolverIsDualInfeasible(), SCIPsdpiSolverIsDualUnbounded(), SCIPsdpiSolverIsIterlimExc(), SCIPsdpiSolverIsObjlimExc(), SCIPsdpiSolverIsPrimalFeasible(), SCIPsdpiSolverIsPrimalInfeasible(), and SCIPsdpiSolverIsPrimalUnbounded().
|
static |
Test if a lower bound lb is not smaller than an upper bound ub, meaning that lb > ub - epsilon
sdpisolver | pointer to an SDP-solver interface |
lb | lower bound |
ub | upper bound |
Definition at line 184 of file sdpisolver_sdpa.cpp.
References checkFeastolAndResolve().
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
|
static |
If the problem is feasible for SDPA but not within our feasibility tolerance, adjust feasibility tolerance in SDPA and resolve until feasibility in SDPA and feasibility with regards to our tolerance match
sdpisolver | SDP-solver interface |
penaltyparam | penalty parameter Gamma |
nvars | number of variables |
lb | lower bounds of variables |
ub | upper bounds of variables |
nsdpblocks | number of SDP-blocks |
sdpblocksizes | sizes of the SDP-blocks (may be NULL if nsdpblocks = sdpconstnnonz = sdpnnonz = 0) |
sdpnblockvars | number of variables that exist in each block |
sdpconstnnonz | number of nonzero elements in the constant matrices of the SDP-blocks AFTER FIXINGS |
sdpconstnblocknonz | number 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 |
sdpconstrow | pointers to row-indices for each block AFTER FIXINGS |
sdpconstcol | pointers to column-indices for each block AFTER FIXINGS |
sdpconstval | pointers to the values of the nonzeros for each block AFTER FIXINGS |
sdpnnonz | number of nonzero elements in the SDP-constraint-matrix |
sdpnblockvarnonz | entry [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] |
sdpvar | sdpvar[i][j] gives the sdp-index of the j-th variable (according to the sorting for row/col/val) in the i-th block |
sdprow | pointer to the row-indices for each block and variable |
sdpcol | pointer to the column-indices for each block and variable |
sdpval | values of SDP-constraintmmatrix entries (may be NULL if sdpnnonz = 0) |
indchanges | changes needed to be done to the indices, if indchanges[block][ind]=-1, then the index can be removed, otherwise it gives the number of indices removed before this |
nremovedinds | the number of rows/cols to be fixed for each block |
blockindchanges | block indices will be modified by these, see indchanges |
nlpcons | number of active (at least two nonzeros) LP-constraints |
noldlpcons | number of LP-constraints including those with less than two active nonzeros |
lplhs | left-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
lprhs | right-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
rownactivevars | number of active variables for each LP-constraint |
lpnnonz | number of nonzero elements in the LP-constraint-matrix |
lprow | row-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpcol | column-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpval | values of LP-constraint-matrix entries, might get sorted (may be NULL if lpnnonz = 0) |
feastol | current feasibility tolerance for SDPA |
Definition at line 203 of file sdpisolver_sdpa.cpp.
References BMS_CALL, INFEASFEASTOLCHANGE, INFEASMINFEASTOL, SCIPsdpiSolverGetSol(), SCIPsdpiSolverGetSolverName(), SCIPsdpiSolverIsAcceptable(), SCIPsdpiSolverIsDualFeasible(), and SCIPsdpSolcheckerCheck().
Referenced by isFixed(), and SCIPsdpiSolverLoadAndSolveWithPenalty().
const char* SCIPsdpiSolverGetSolverName | ( | void | ) |
gets name and version (if available) of SDP-solver
Definition at line 321 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetSolverDesc().
Referenced by checkFeastolAndResolve(), and SCIPsdpiGetSolverName().
const char* SCIPsdpiSolverGetSolverDesc | ( | void | ) |
gets description of SDP-solver (developer, webpage, ...)
Definition at line 329 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetSolverPointer().
Referenced by SCIPsdpiGetSolverDesc(), and SCIPsdpiSolverGetSolverName().
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.
sdpisolver | pointer to an SDP-solver interface |
Definition at line 342 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetDefaultSdpiSolverFeastol().
Referenced by SCIPsdpiGetSolverPointer(), and SCIPsdpiSolverGetSolverDesc().
SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverFeastol | ( | void | ) |
gets default feasibility tolerance for SDP-solver in SCIP-SDP
Definition at line 351 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetDefaultSdpiSolverGaptol().
Referenced by SCIPsdpiGetDefaultSdpiSolverFeastol(), and SCIPsdpiSolverGetSolverPointer().
SCIP_Real SCIPsdpiSolverGetDefaultSdpiSolverGaptol | ( | void | ) |
gets default duality gap tolerance for SDP-solver in SCIP-SDP
Definition at line 359 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases().
Referenced by SCIPsdpiGetDefaultSdpiSolverGaptol(), and SCIPsdpiSolverGetDefaultSdpiSolverFeastol().
int SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases | ( | void | ) |
gets default number of increases of penalty parameter for SDP-solver in SCIP-SDP
Definition at line 367 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverDoesWarmstartNeedPrimal().
Referenced by SCIPsdpiGetDefaultSdpiSolverNpenaltyIncreases(), and SCIPsdpiSolverGetDefaultSdpiSolverGaptol().
SCIP_Bool SCIPsdpiSolverDoesWarmstartNeedPrimal | ( | void | ) |
Should primal solution values be saved for warmstarting purposes?
Definition at line 375 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverCreate().
Referenced by SCIPsdpiDoesWarmstartNeedPrimal(), and SCIPsdpiSolverGetDefaultSdpiSolverNpenaltyIncreases().
SCIP_RETCODE SCIPsdpiSolverCreate | ( | SCIP_SDPISOLVER ** | sdpisolver, |
SCIP_MESSAGEHDLR * | messagehdlr, | ||
BMS_BLKMEM * | blkmem, | ||
BMS_BUFMEM * | bufmem | ||
) |
creates an SDP solver interface
sdpisolver | pointer to an SDP-solver interface |
messagehdlr | message handler to use for printing messages, or NULL |
blkmem | block memory |
bufmem | buffer memory |
Definition at line 393 of file sdpisolver_sdpa.cpp.
References BMS_CALL, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPsdpiSolverFree(), and SCIPsdpiSolverInfinity().
Referenced by SCIPsdpiClone(), SCIPsdpiCreate(), and SCIPsdpiSolverDoesWarmstartNeedPrimal().
SCIP_RETCODE SCIPsdpiSolverFree | ( | SCIP_SDPISOLVER ** | sdpisolver | ) |
deletes an SDP solver interface
sdpisolver | pointer to an SDP-solver interface |
Definition at line 453 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverIncreaseCounter().
Referenced by SCIPsdpiFree(), and SCIPsdpiSolverCreate().
SCIP_RETCODE SCIPsdpiSolverIncreaseCounter | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
increases the SDP-Counter
sdpisolver | SDP-solver interface |
Definition at line 517 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverResetCounter().
Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverFree().
SCIP_RETCODE SCIPsdpiSolverResetCounter | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
reset the SDP-Counter to zero
sdpisolver | SDP-solver interface |
Definition at line 529 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverLoadAndSolve().
Referenced by SCIPsdpiClear(), and SCIPsdpiSolverIncreaseCounter().
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).
sdpisolver | SDP-solver interface |
nvars | number of variables |
obj | objective coefficients of variables |
lb | lower bounds of variables |
ub | upper bounds of variables |
nsdpblocks | number of SDP-blocks |
sdpblocksizes | sizes of the SDP-blocks (may be NULL if nsdpblocks = sdpconstnnonz = sdpnnonz = 0) |
sdpnblockvars | number of variables that exist in each block |
sdpconstnnonz | number of nonzero elements in the constant matrices of the SDP-blocks AFTER FIXINGS |
sdpconstnblocknonz | number 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 |
sdpconstrow | pointers to row-indices for each block AFTER FIXINGS |
sdpconstcol | pointers to column-indices for each block AFTER FIXINGS |
sdpconstval | pointers to the values of the nonzeros for each block AFTER FIXINGS |
sdpnnonz | number of nonzero elements in the SDP-constraint-matrix |
sdpnblockvarnonz | entry [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] |
sdpvar | sdpvar[i][j] gives the sdp-index of the j-th variable (according to the sorting for row/col/val) in the i-th block |
sdprow | pointer to the row-indices for each block and variable |
sdpcol | pointer to the column-indices for each block and variable |
sdpval | values of SDP-constraint-matrix entries (may be NULL if sdpnnonz = 0) |
indchanges | changes 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 |
nremovedinds | the number of rows/cols to be fixed for each block |
blockindchanges | block indizes will be modified by these, see indchanges |
nremovedblocks | number of empty blocks that should be removed |
nlpcons | number of active (at least two nonzeros) LP-constraints |
noldlpcons | number of LP-constraints including those with less than two active nonzeros |
lplhs | left-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
lprhs | right-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
lprownactivevars | number of active variables for each LP-constraint |
lpnnonz | number of nonzero elements in the LP-constraint-matrix |
lprow | row-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpcol | column-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpval | values of LP-constraint-matrix entries, might get sorted (may be NULL if lpnnonz = 0) |
starty | NULL or dual vector y as starting point for the solver, this should have length nvars |
startZnblocknonz | dual 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 |
startZrow | dual matrix Z = sum Ai yi as starting point for the solver: row indices for each block; may be NULL if startZnblocknonz = NULL |
startZcol | dual matrix Z = sum Ai yi as starting point for the solver: column indices for each block; may be NULL if startZnblocknonz = NULL |
startZval | dual matrix Z = sum Ai yi as starting point for the solver: values for each block; may be NULL if startZnblocknonz = NULL |
startXnblocknonz | primal matrix X as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL |
startXrow | primal matrix X as starting point for the solver: row indices for each block; may be NULL if startXnblocknonz = NULL |
startXcol | primal matrix X as starting point for the solver: column indices for each block; may be NULL if startXnblocknonz = NULL |
startXval | primal matrix X as starting point for the solver: values for each block; may be NULL if startXnblocknonz = NULL |
startsettings | settings 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 |
timelimit | after this many seconds solving will be aborted (currently only implemented for DSDP and MOSEK) |
Definition at line 566 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverLoadAndSolveWithPenalty().
Referenced by checkSlaterCondition(), SCIPsdpiSolve(), and SCIPsdpiSolverResetCounter().
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:
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.
sdpisolver | SDP-solver interface |
penaltyparam | the Gamma above, needs to be >= 0 |
withobj | if this is false the objective is set to 0 |
rbound | should r be non-negative ? |
nvars | number of variables |
obj | objective coefficients of variables |
lb | lower bounds of variables |
ub | upper bounds of variables |
nsdpblocks | number of SDP-blocks |
sdpblocksizes | sizes of the SDP-blocks (may be NULL if nsdpblocks = sdpconstnnonz = sdpnnonz = 0) |
sdpnblockvars | number of variables that exist in each block |
sdpconstnnonz | number of nonzero elements in the constant matrices of the SDP-blocks AFTER FIXINGS |
sdpconstnblocknonz | number 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 |
sdpconstrow | pointers to row-indices for each block AFTER FIXINGS |
sdpconstcol | pointers to column-indices for each block AFTER FIXINGS |
sdpconstval | pointers to the values of the nonzeros for each block AFTER FIXINGS |
sdpnnonz | number of nonzero elements in the SDP-constraint-matrix |
sdpnblockvarnonz | entry [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] |
sdpvar | sdpvar[i][j] gives the sdp-index of the j-th variable (according to the sorting for row/col/val) in the i-th block |
sdprow | pointer to the row-indices for each block and variable |
sdpcol | pointer to the column-indices for each block and variable |
sdpval | values of SDP-constraint-matrix entries (may be NULL if sdpnnonz = 0) |
indchanges | changes 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 |
nremovedinds | the number of rows/cols to be fixed for each block |
blockindchanges | block indizes will be modified by these, see indchanges |
nremovedblocks | number of empty blocks that should be removed |
nlpcons | number of active (at least two nonzeros) LP-constraints |
noldlpcons | number of LP-constraints including those with less than two active nonzeros |
lplhs | left-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
lprhs | right-hand sides of active LP-rows after fixings (may be NULL if nlpcons = 0) |
rownactivevars | number of active variables for each LP-constraint |
lpnnonz | number of nonzero elements in the LP-constraint-matrix |
lprow | row-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpcol | column-index for each entry in lpval-array, might get sorted (may be NULL if lpnnonz = 0) |
lpval | values of LP-constraint-matrix entries, might get sorted (may be NULL if lpnnonz = 0) |
starty | NULL or dual vector y as starting point for the solver, this should have length nvars |
startZnblocknonz | dual 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 |
startZrow | dual matrix Z = sum Ai yi as starting point for the solver: row indices for each block; may be NULL if startZnblocknonz = NULL |
startZcol | dual matrix Z = sum Ai yi as starting point for the solver: column indices for each block; may be NULL if startZnblocknonz = NULL |
startZval | dual matrix Z = sum Ai yi as starting point for the solver: values for each block; may be NULL if startZnblocknonz = NULL |
startXnblocknonz | primal matrix X as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL |
startXrow | primal matrix X as starting point for the solver: row indices for each block; may be NULL if startXnblocknonz = NULL |
startXcol | primal matrix X as starting point for the solver: column indices for each block; may be NULL if startXnblocknonz = NULL |
startXval | primal matrix X as starting point for the solver: values for each block; may be NULL if startXnblocknonz = NULL |
startsettings | settings 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 |
timelimit | after this many seconds solving will be aborted (currently only implemented for DSDP and MOSEK) |
feasorig | pointer to store if the solution to the penalty-formulation is feasible for the original problem (may be NULL if penaltyparam = 0) |
penaltybound | pointer 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 654 of file sdpisolver_sdpa.cpp.
References BMS_CALL, checkFeastolAndResolve(), FEASTOLCHANGE, GAPTOLCHANGE, isFixed(), PENALTYBOUNDTOL, SCIP_SDPSOLVERSETTING_FAST, SCIP_SDPSOLVERSETTING_MEDIUM, SCIP_SDPSOLVERSETTING_PENALTY, SCIP_SDPSOLVERSETTING_STABLE, SCIP_SDPSOLVERSETTING_UNSOLVED, SCIPsdpiSolverInfinity(), SCIPsdpiSolverIsAcceptable(), SCIPsdpiSolverIsInfinity(), and SCIPsdpiSolverWasSolved().
Referenced by checkSlaterCondition(), SCIPsdpiSolve(), and SCIPsdpiSolverLoadAndSolve().
SCIP_Bool SCIPsdpiSolverWasSolved | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns whether a solve method was called after the last modification of the SDP
sdpisolver | pointer to SDP-solver interface |
Definition at line 1999 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverFeasibilityKnown().
Referenced by SCIPsdpiSolve(), SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiWasSolved().
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.
sdpisolver | pointer to SDP-solver interface |
Definition at line 2013 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverGetSolFeasibility().
Referenced by SCIPsdpiFeasibilityKnown(), and SCIPsdpiSolverWasSolved().
SCIP_RETCODE SCIPsdpiSolverGetSolFeasibility | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Bool * | primalfeasible, | ||
SCIP_Bool * | dualfeasible | ||
) |
gets information about primal and dual feasibility of the current SDP solution
sdpisolver | pointer to an SDP-solver interface |
primalfeasible | stores primal feasibility status |
dualfeasible | stores dual feasibility status |
Definition at line 2032 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverIsPrimalUnbounded().
Referenced by SCIPsdpiGetSolFeasibility(), and SCIPsdpiSolverFeasibilityKnown().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2087 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsPrimalInfeasible().
Referenced by checkSlaterCondition(), SCIPsdpiIsPrimalUnbounded(), and SCIPsdpiSolverGetSolFeasibility().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2118 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsPrimalFeasible().
Referenced by SCIPsdpiIsPrimalInfeasible(), and SCIPsdpiSolverIsPrimalUnbounded().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2149 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsDualUnbounded().
Referenced by SCIPsdpiIsPrimalFeasible(), and SCIPsdpiSolverIsPrimalInfeasible().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2180 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsDualInfeasible().
Referenced by checkSlaterCondition(), SCIPsdpiIsDualUnbounded(), and SCIPsdpiSolverIsPrimalFeasible().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2211 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsDualFeasible().
Referenced by checkSlaterCondition(), SCIPsdpiIsDualInfeasible(), SCIPsdpiSolve(), and SCIPsdpiSolverIsDualUnbounded().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2242 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsConverged().
Referenced by checkFeastolAndResolve(), SCIPsdpiIsDualFeasible(), and SCIPsdpiSolverIsDualInfeasible().
SCIP_Bool SCIPsdpiSolverIsConverged | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns TRUE iff the solver converged
sdpisolver | pointer to SDP-solver interface |
Definition at line 2271 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsObjlimExc().
Referenced by SCIPsdpiIsConverged(), SCIPsdpiSolverIsAcceptable(), and SCIPsdpiSolverIsDualFeasible().
SCIP_Bool SCIPsdpiSolverIsObjlimExc | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns TRUE iff the objective limit was reached
sdpisolver | pointer to SDP-solver interface |
Definition at line 2290 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsIterlimExc().
Referenced by SCIPsdpiIsObjlimExc(), and SCIPsdpiSolverIsConverged().
SCIP_Bool SCIPsdpiSolverIsIterlimExc | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns TRUE iff the iteration limit was reached
sdpisolver | pointer to SDP-solver interface |
Definition at line 2309 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED_BOOL, and SCIPsdpiSolverIsTimelimExc().
Referenced by SCIPsdpiIsIterlimExc(), and SCIPsdpiSolverIsObjlimExc().
SCIP_Bool SCIPsdpiSolverIsTimelimExc | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns TRUE iff the time limit was reached
sdpisolver | pointer to SDP-solver interface |
Definition at line 2331 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetInternalStatus().
Referenced by SCIPsdpiIsTimelimExc(), SCIPsdpiSolve(), and SCIPsdpiSolverIsIterlimExc().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2351 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverIsOptimal().
Referenced by SCIPsdpiGetInternalStatus(), and SCIPsdpiSolverIsTimelimExc().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2378 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverIsAcceptable().
Referenced by checkSlaterCondition(), SCIPsdpiIsOptimal(), SCIPsdpiSolve(), and SCIPsdpiSolverGetInternalStatus().
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
sdpisolver | pointer to SDP-solver interface |
Definition at line 2401 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverIgnoreInstability(), and SCIPsdpiSolverIsConverged().
Referenced by checkFeastolAndResolve(), SCIPsdpiIsAcceptable(), SCIPsdpiSolve(), SCIPsdpiSolverIsOptimal(), and SCIPsdpiSolverLoadAndSolveWithPenalty().
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
sdpisolver | pointer to an SDP-solver interface |
success | pointer to store, whether the instability could be ignored |
Definition at line 2427 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetObjval().
Referenced by SCIPsdpiSolverIsAcceptable().
SCIP_RETCODE SCIPsdpiSolverGetObjval | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Real * | objval | ||
) |
gets objective value of solution
sdpisolver | pointer to an SDP-solver interface |
objval | pointer to store the objective value |
Definition at line 2438 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetSol().
Referenced by checkSlaterCondition(), SCIPsdpiGetLowerObjbound(), SCIPsdpiGetObjval(), SCIPsdpiSolve(), and SCIPsdpiSolverIgnoreInstability().
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.
sdpisolver | pointer to an SDP-solver interface |
objval | pointer to store the objective value, may be NULL if not needed |
dualsol | pointer to store the dual solution vector, may be NULL if not needed |
dualsollength | length 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 2487 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetPreoptimalPrimalNonzeros().
Referenced by checkFeastolAndResolve(), SCIPsdpiGetSol(), and SCIPsdpiSolverGetObjval().
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
sdpisolver | pointer to an SDP-solver interface |
nblocks | length of startXnblocknonz (should be nsdpblocks + 1) |
startXnblocknonz | pointer 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 2570 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetPreoptimalSol().
Referenced by SCIPsdpiGetPreoptimalPrimalNonzeros(), and SCIPsdpiSolverGetSol().
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
sdpisolver | pointer to an SDP-solver interface |
success | could a preoptimal solution be returned ? |
dualsol | pointer to store the dual solution vector, may be NULL if not needed |
dualsollength | length 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 |
nblocks | length of startXnblocknonz (should be nsdpblocks + 1) or -1 if no primal matrix should be returned |
startXnblocknonz | input: 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 |
startXrow | pointer to store row indices of X (or NULL if nblocks = -1) |
startXcol | pointer to store column indices of X (or NULL if nblocks = -1) |
startXval | pointer to store values of X (or NULL if nblocks = -1) |
Definition at line 2654 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetPrimalBoundVars().
Referenced by SCIPsdpiGetPreoptimalSol(), and SCIPsdpiSolverGetPreoptimalPrimalNonzeros().
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.
sdpisolver | pointer to an SDP-solver interface |
lbvars | pointer to store the values of the variables corresponding to lower bounds in the dual problems |
ubvars | pointer to store the values of the variables corresponding to upper bounds in the dual problems |
arraylength | input: length of lbvars and ubvars output: number of elements inserted into lbvars/ubvars (or needed length if it wasn't sufficient) |
Definition at line 2865 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetPrimalNonzeros().
Referenced by SCIPsdpiGetPrimalBoundVars(), and SCIPsdpiSolverGetPreoptimalSol().
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)
sdpisolver | pointer to an SDP-solver interface |
nblocks | length of startXnblocknonz |
startXnblocknonz | pointer to store number of nonzeros for row/col/val-arrays in each block |
Definition at line 2945 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetPrimalMatrix().
Referenced by SCIPsdpiGetPrimalNonzeros(), and SCIPsdpiSolverGetPrimalBoundVars().
SCIP_RETCODE SCIPsdpiSolverGetPrimalMatrix | ( | SCIP_SDPISOLVER * | sdpisolver, |
int | nblocks, | ||
int * | startXnblocknonz, | ||
int ** | startXrow, | ||
int ** | startXcol, | ||
SCIP_Real ** | startXval | ||
) |
returns the primal matrix X
sdpisolver | pointer to an SDP-solver interface |
nblocks | length of startXnblocknonz (should be nsdpblocks + 1) |
startXnblocknonz | input: allocated memory for row/col/val-arrays in each block output: number of nonzeros in each block |
startXrow | pointer to store row indices of X |
startXcol | pointer to store column indices of X |
startXval | pointer to store values of X |
Definition at line 3022 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverGetMaxPrimalEntry().
Referenced by SCIPsdpiGetPrimalMatrix(), and SCIPsdpiSolverGetPrimalNonzeros().
SCIP_Real SCIPsdpiSolverGetMaxPrimalEntry | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
return the maximum absolute value of the optimal primal matrix
sdpisolver | pointer to an SDP-solver interface |
Definition at line 3180 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetIterations().
Referenced by SCIPsdpiGetMaxPrimalEntry(), and SCIPsdpiSolverGetPrimalMatrix().
SCIP_RETCODE SCIPsdpiSolverGetIterations | ( | SCIP_SDPISOLVER * | sdpisolver, |
int * | iterations | ||
) |
gets the number of SDP iterations of the last solve call
sdpisolver | pointer to an SDP-solver interface |
iterations | pointer to store the number of iterations of the last solve call |
Definition at line 3218 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetSdpCalls().
Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverGetMaxPrimalEntry().
SCIP_RETCODE SCIPsdpiSolverGetSdpCalls | ( | SCIP_SDPISOLVER * | sdpisolver, |
int * | calls | ||
) |
gets the number of calls to the SDP-solver for the last solve call
sdpisolver | SDP-solver interface |
calls | pointer to store the number of calls to the SDP-solver for the last solve call |
Definition at line 3233 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverSettingsUsed().
Referenced by SCIPsdpiSolve(), and SCIPsdpiSolverGetIterations().
SCIP_RETCODE SCIPsdpiSolverSettingsUsed | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_SDPSOLVERSETTING * | usedsetting | ||
) |
gets the settings used by the SDP solver for the last solve call
sdpisolver | SDP-solver interface |
usedsetting | the setting used by the SDP-solver |
Definition at line 3248 of file sdpisolver_sdpa.cpp.
References CHECK_IF_SOLVED, and SCIPsdpiSolverInfinity().
Referenced by SCIPsdpiSettingsUsed(), SCIPsdpiSlaterSettings(), and SCIPsdpiSolverGetSdpCalls().
SCIP_Real SCIPsdpiSolverInfinity | ( | SCIP_SDPISOLVER * | sdpisolver | ) |
returns value treated as infinity in the SDP-solver
sdpisolver | pointer to an SDP-solver interface |
Definition at line 3275 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverIsInfinity().
Referenced by checkSlaterCondition(), SCIPsdpiCreate(), SCIPsdpiInfinity(), SCIPsdpiSlaterSettings(), SCIPsdpiSolve(), SCIPsdpiSolverCreate(), SCIPsdpiSolverIsInfinity(), SCIPsdpiSolverLoadAndSolveWithPenalty(), and SCIPsdpiSolverSettingsUsed().
SCIP_Bool SCIPsdpiSolverIsInfinity | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Real | val | ||
) |
checks if given value is treated as (plus or minus) infinity in the SDP-solver
sdpisolver | pointer to an SDP-solver interface |
val | value to be checked for infinity |
Definition at line 3283 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverGetRealpar(), and SCIPsdpiSolverInfinity().
Referenced by checkSlaterCondition(), SCIPsdpiSolverInfinity(), and SCIPsdpiSolverLoadAndSolveWithPenalty().
SCIP_RETCODE SCIPsdpiSolverGetRealpar | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_SDPPARAM | type, | ||
SCIP_Real * | dval | ||
) |
gets floating point parameter of SDP-Solver
sdpisolver | pointer to an SDP-solver interface |
type | parameter number |
dval | buffer to store the parameter value |
Definition at line 3292 of file sdpisolver_sdpa.cpp.
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_RETCODE SCIPsdpiSolverSetRealpar | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_SDPPARAM | type, | ||
SCIP_Real | dval | ||
) |
sets floating point parameter of SDP-Solver
sdpisolver | pointer to an SDP-solver interface |
type | parameter number |
dval | parameter value |
Definition at line 3336 of file sdpisolver_sdpa.cpp.
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_RETCODE SCIPsdpiSolverGetIntpar | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_SDPPARAM | type, | ||
int * | ival | ||
) |
gets integer parameter of SDP-Solver
sdpisolver | pointer to an SDP-solver interface |
type | parameter number |
ival | parameter value |
Definition at line 3385 of file sdpisolver_sdpa.cpp.
References SCIP_SDPPAR_SDPINFO, and SCIPsdpiSolverSetIntpar().
Referenced by SCIPsdpiGetIntpar(), and SCIPsdpiSolverSetRealpar().
SCIP_RETCODE SCIPsdpiSolverSetIntpar | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_SDPPARAM | type, | ||
int | ival | ||
) |
sets integer parameter of SDP-Solver
sdpisolver | pointer to an SDP-solver interface |
type | parameter number |
ival | parameter value |
Definition at line 3407 of file sdpisolver_sdpa.cpp.
References SCIP_SDPPAR_SDPINFO, and SCIPsdpiSolverComputeLambdastar().
Referenced by SCIPsdpiSetIntpar(), and SCIPsdpiSolverGetIntpar().
SCIP_RETCODE SCIPsdpiSolverComputeLambdastar | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Real | maxguess | ||
) |
compute and set lambdastar (only used for SDPA)
sdpisolver | pointer to an SDP-solver interface |
maxguess | maximum guess for lambda star of all SDP-constraints |
Definition at line 3429 of file sdpisolver_sdpa.cpp.
References LAMBDASTAR_FACTOR, LAMBDASTAR_HIGH, LAMBDASTAR_LOW, LAMBDASTAR_THRESHOLD, MAX_LAMBDASTAR, MIN_LAMBDASTAR, and SCIPsdpiSolverComputePenaltyparam().
Referenced by SCIPsdpiComputeLambdastar(), and SCIPsdpiSolverSetIntpar().
SCIP_RETCODE SCIPsdpiSolverComputePenaltyparam | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Real | maxcoeff, | ||
SCIP_Real * | penaltyparam | ||
) |
compute and set the penalty parameter
sdpisolver | pointer to an SDP-solver interface |
maxcoeff | maximum objective coefficient |
penaltyparam | the computed penalty parameter |
Definition at line 3470 of file sdpisolver_sdpa.cpp.
References MAX_PENALTYPARAM, MIN_PENALTYPARAM, PENALTYPARAM_FACTOR, and SCIPsdpiSolverComputeMaxPenaltyparam().
Referenced by SCIPsdpiComputePenaltyparam(), and SCIPsdpiSolverComputeLambdastar().
SCIP_RETCODE SCIPsdpiSolverComputeMaxPenaltyparam | ( | SCIP_SDPISOLVER * | sdpisolver, |
SCIP_Real | penaltyparam, | ||
SCIP_Real * | maxpenaltyparam | ||
) |
compute and set the maximum penalty parameter
sdpisolver | pointer to an SDP-solver interface |
penaltyparam | the initial penalty parameter |
maxpenaltyparam | the computed maximum penalty parameter |
Definition at line 3502 of file sdpisolver_sdpa.cpp.
References MAX_MAXPENALTYPARAM, MAXPENALTYPARAM_FACTOR, and SCIPsdpiSolverReadSDP().
Referenced by SCIPsdpiComputeMaxPenaltyparam(), and SCIPsdpiSolverComputePenaltyparam().
SCIP_RETCODE SCIPsdpiSolverReadSDP | ( | SCIP_SDPISOLVER * | sdpisolver, |
const char * | fname | ||
) |
reads SDP from a file
sdpisolver | pointer to an SDP-solver interface |
fname | file name |
Definition at line 3542 of file sdpisolver_sdpa.cpp.
References SCIPsdpiSolverWriteSDP().
Referenced by SCIPsdpiSolverComputeMaxPenaltyparam().
SCIP_RETCODE SCIPsdpiSolverWriteSDP | ( | SCIP_SDPISOLVER * | sdpisolver, |
const char * | fname | ||
) |
writes SDP to a file
sdpisolver | pointer to an SDP-solver interface |
fname | file name |
Definition at line 3552 of file sdpisolver_sdpa.cpp.
Referenced by SCIPsdpiSolverReadSDP().