|
SCIP-SDP
4.0.0
|
checks a given SDP solution for feasibility More...
Go to the source code of this file.
Functions | |
| SCIP_EXPORT SCIP_RETCODE | SCIPsdpSolcheckerCheck (BMS_BUFMEM *bufmem, 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, SCIP_Real *lplhs, SCIP_Real *lprhs, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *solvector, SCIP_Real feastol, SCIP_Real epsilon, SCIP_Bool *infeasible) |
| SCIP_EXPORT SCIP_RETCODE | SCIPsdpSolcheckerCheckAndGetViolDual (BMS_BUFMEM *bufmem, 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, SCIP_Real *lplhs, SCIP_Real *lprhs, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *solvector, SCIP_Real feastol, SCIP_Real epsilon, SCIP_Real *maxabsviolbnds, SCIP_Real *sumabsviolbnds, SCIP_Real *maxabsviolcons, SCIP_Real *sumabsviolcons, SCIP_Real *maxabsviolsdp, SCIP_Real *sumabsviolsdp, SCIP_Bool *infeasible) |
| SCIP_EXPORT SCIP_RETCODE | SCIPsdpSolcheckerCheckAndGetViolPrimal (BMS_BUFMEM *bufmem, int nvars, SCIP_Real *obj, SCIP_Real *lb, SCIP_Real *ub, int *inputtomosekmapper, 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, SCIP_Real *lplhs, SCIP_Real *lprhs, int lpnnonz, int *lprow, int *lpcol, SCIP_Real *lpval, SCIP_Real *solvector, SCIP_Real **solmatrices, SCIP_Real feastol, SCIP_Real epsilon, SCIP_Real *maxabsviolbnds, SCIP_Real *sumabsviolbnds, SCIP_Real *maxabsviolcons, SCIP_Real *sumabsviolcons, SCIP_Real *maxabsviolsdp, SCIP_Real *sumabsviolsdp, SCIP_Bool *infeasible) |
checks a given SDP solution for feasibility
Given a solution, an SDP instance and a feasibility tolerance, checks whether the smallest eigenvalue is >= -feastol for a given feasibility tolerance.
Definition in file sdpsolchecker.h.
| SCIP_EXPORT SCIP_RETCODE SCIPsdpSolcheckerCheck | ( | BMS_BUFMEM * | bufmem, |
| 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, | ||
| SCIP_Real * | lplhs, | ||
| SCIP_Real * | lprhs, | ||
| int | lpnnonz, | ||
| int * | lprow, | ||
| int * | lpcol, | ||
| SCIP_Real * | lpval, | ||
| SCIP_Real * | solvector, | ||
| SCIP_Real | feastol, | ||
| SCIP_Real | epsilon, | ||
| SCIP_Bool * | infeasible | ||
| ) |
Given a solution, an SDP instance and a feasibility tolerance, checks whether the smallest eigenvalue is >= -feastol for a given feasibility tolerance.
| bufmem | buffer memory |
| 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-constrain tmmatrix 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 indizes will be modified by these, see indchanges |
| nlpcons | number of active (at least two nonzeros) LP-constraints |
| 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) |
| 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) |
| solvector | values of all variables (including fixed ones) in the solution that should be checked |
| feastol | feasibility tolerance to check feasibility for |
| epsilon | tolerance used to check for fixed variables |
| infeasible | pointer to store whether solution is feasible |
Definition at line 62 of file sdpsolchecker.c.
References BMS_CALL, and SCIPlapackComputeIthEigenvalue().
Referenced by checkFeastolAndResolve(), and SCIPsdpiSolverLoadAndSolveWithPenalty().
| SCIP_EXPORT SCIP_RETCODE SCIPsdpSolcheckerCheckAndGetViolDual | ( | BMS_BUFMEM * | bufmem, |
| 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, | ||
| SCIP_Real * | lplhs, | ||
| SCIP_Real * | lprhs, | ||
| int | lpnnonz, | ||
| int * | lprow, | ||
| int * | lpcol, | ||
| SCIP_Real * | lpval, | ||
| SCIP_Real * | solvector, | ||
| SCIP_Real | feastol, | ||
| SCIP_Real | epsilon, | ||
| SCIP_Real * | maxabsviolbnds, | ||
| SCIP_Real * | sumabsviolbnds, | ||
| SCIP_Real * | maxabsviolcons, | ||
| SCIP_Real * | sumabsviolcons, | ||
| SCIP_Real * | maxabsviolsdp, | ||
| SCIP_Real * | sumabsviolsdp, | ||
| SCIP_Bool * | infeasible | ||
| ) |
Given a solution, an SDP instance and a feasibility tolerance, checks whether the smallest eigenvalue is >= -feastol for a given feasibility tolerance and returns maximal absolute violation and sum of absolute violations for bounds, linear constraints and SDP constraints for the corresponding dual problem.
Note: Should not be called if solution is a certificate of primal infeasiblity!
| bufmem | buffer memory |
| 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-constraint matrix 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 indizes will be modified by these, see indchanges |
| nlpcons | number of active (at least two nonzeros) LP-constraints |
| 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) |
| 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) |
| solvector | values of all variables (including fixed ones) in the solution that should be checked |
| feastol | feasibility tolerance to check feasibility for |
| epsilon | tolerance used to check for fixed variables |
| maxabsviolbnds | pointer to store maximal absolute violation of variable bounds |
| sumabsviolbnds | pointer to store sum of absolute violations of variable bounds |
| maxabsviolcons | pointer to store maximal absolute violation of linear constraints |
| sumabsviolcons | pointer to store sum of absolute violations of linear constraints |
| maxabsviolsdp | pointer to store maximal absolute violation of SDP constraints |
| sumabsviolsdp | pointer to store sum of absolute violations of SDP constraints |
| infeasible | pointer to store whether solution is feasible |
Definition at line 281 of file sdpsolchecker.c.
References BMS_CALL, and SCIPlapackComputeIthEigenvalue().
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
| SCIP_EXPORT SCIP_RETCODE SCIPsdpSolcheckerCheckAndGetViolPrimal | ( | BMS_BUFMEM * | bufmem, |
| int | nvars, | ||
| SCIP_Real * | obj, | ||
| SCIP_Real * | lb, | ||
| SCIP_Real * | ub, | ||
| int * | inputtomosekmapper, | ||
| 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, | ||
| SCIP_Real * | lplhs, | ||
| SCIP_Real * | lprhs, | ||
| int | lpnnonz, | ||
| int * | lprow, | ||
| int * | lpcol, | ||
| SCIP_Real * | lpval, | ||
| SCIP_Real * | solvector, | ||
| SCIP_Real ** | solmatrices, | ||
| SCIP_Real | feastol, | ||
| SCIP_Real | epsilon, | ||
| SCIP_Real * | maxabsviolbnds, | ||
| SCIP_Real * | sumabsviolbnds, | ||
| SCIP_Real * | maxabsviolcons, | ||
| SCIP_Real * | sumabsviolcons, | ||
| SCIP_Real * | maxabsviolsdp, | ||
| SCIP_Real * | sumabsviolsdp, | ||
| SCIP_Bool * | infeasible | ||
| ) |
Given a solution, an SDP instance and a feasibility tolerance, returns maximal absolute violation and sum of absolute violations for bounds, linear constraints and SDP constraints for the corresponding primal problem. The solution should be given for the actual problem given to the SDP solver, i.e., after all fixed variables have been eliminated.
Note: Should not be called if solution is a certificate of dual infeasiblity!
| bufmem | buffer memory |
| nvars | number of variables |
| obj | objective coefficients of variables (in dual problem) |
| lb | lower bounds of variables |
| ub | upper bounds of variables |
| inputtomosekmapper | entry i gives the index of input variable i in MOSEK (starting from 0) or -j (j=1, 2, ..., nvars - nactivevars) if the variable is fixed, the value and objective value of this fixed variable can be found in entry j-1 of fixedval/obj |
| 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][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 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 |
| 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) |
| 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) |
| solvector | values of all scalar variables in the solution that should be checked |
| solmatrices | values of all matrix variables in the solution that should be checked |
| feastol | feasibility tolerance to check feasibility for |
| epsilon | tolerance used to check for fixed variables |
| maxabsviolbnds | pointer to store maximal absolute violation of variable bounds |
| sumabsviolbnds | pointer to store sum of absolute violations of variable bounds |
| maxabsviolcons | pointer to store maximal absolute violation of linear constraints |
| sumabsviolcons | pointer to store sum of absolute violations of linear constraints |
| maxabsviolsdp | pointer to store maximal absolute violation of SDP constraints |
| sumabsviolsdp | pointer to store sum of absolute violations of SDP constraints |
| infeasible | pointer to store whether solution is feasible |
Definition at line 550 of file sdpsolchecker.c.
References BMS_CALL, INF, and SCIPlapackComputeIthEigenvalue().
Referenced by SCIPsdpiSolverLoadAndSolveWithPenalty().
1.8.11