SCIP-SDP
3.2.0
|
constraint handler for saving SDP solutions in nodes More...
Go to the source code of this file.
Macros | |
#define | CONSHDLR_NAME "Savesdpsol" |
#define | CONSHDLR_DESC "saving the SDP solution at each node of the tree constraint handler" |
#define | CONSHDLR_ENFOPRIORITY 0 |
#define | CONSHDLR_CHECKPRIORITY 0 |
#define | CONSHDLR_EAGERFREQ 100 |
#define | CONSHDLR_NEEDSCONS TRUE |
Functions | |
static | SCIP_DECL_CONSDELETE (consDeleteSavesdpsol) |
static | SCIP_DECL_CONSENFORELAX (consEnforelaxSavesdpsol) |
static | SCIP_DECL_CONSENFOLP (consEnfolpSavesdpsol) |
static | SCIP_DECL_CONSENFOPS (consEnfopsSavesdpsol) |
static | SCIP_DECL_CONSCHECK (consCheckSavesdpsol) |
static | SCIP_DECL_CONSLOCK (consLockSavesdpsol) |
static | SCIP_DECL_CONSHDLRCOPY (conshdlrCopySavesdpsol) |
static | SCIP_DECL_CONSCOPY (consCopySavesdpsol) |
SCIP_RETCODE | SCIPincludeConshdlrSavesdpsol (SCIP *scip) |
SCIP_RETCODE | createConsSavesdpsol (SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_Longint node, SCIP_SOL *sol, SCIP_Real maxprimalentry, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval) |
SCIP_Longint | SCIPconsSavesdpsolGetNodeIndex (SCIP *scip, SCIP_CONS *cons) |
SCIP_SOL * | SCIPconsSavesdpsolGetDualVector (SCIP *scip, SCIP_CONS *cons) |
SCIP_Real | SCIPconsSavesdpsolGetMaxPrimalEntry (SCIP *scip, SCIP_CONS *cons) |
SCIP_RETCODE | SCIPconsSavesdpsolGetPrimalMatrixNonzeros (SCIP *scip, SCIP_CONS *cons, int nblocks, int *startXnblocknonz) |
SCIP_RETCODE | SCIPconsSavesdpsolGetPrimalMatrix (SCIP *scip, SCIP_CONS *cons, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval) |
constraint handler for saving SDP solutions in nodes
Definition in file cons_savesdpsol.c.
#define CONSHDLR_NAME "Savesdpsol" |
Definition at line 47 of file cons_savesdpsol.c.
Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), SCIP_DECL_CONSENFOPS(), SCIP_DECL_CONSENFORELAX(), SCIP_DECL_CONSHDLRCOPY(), SCIP_DECL_CONSLOCK(), and SCIPincludeConshdlrSavesdpsol().
#define CONSHDLR_DESC "saving the SDP solution at each node of the tree constraint handler" |
Definition at line 48 of file cons_savesdpsol.c.
Referenced by SCIPincludeConshdlrSavesdpsol().
#define CONSHDLR_ENFOPRIORITY 0 |
priority of the constraint handler for constraint enforcing
Definition at line 49 of file cons_savesdpsol.c.
Referenced by SCIPincludeConshdlrSavesdpsol().
#define CONSHDLR_CHECKPRIORITY 0 |
priority of the constraint handler for checking feasibility
Definition at line 50 of file cons_savesdpsol.c.
Referenced by SCIPincludeConshdlrSavesdpsol().
#define CONSHDLR_EAGERFREQ 100 |
frequency for using all instead of only the useful constraints in separation, propagation and enforcement, -1 for no eager evaluations, 0 for first only
Definition at line 51 of file cons_savesdpsol.c.
Referenced by SCIPincludeConshdlrSavesdpsol().
#define CONSHDLR_NEEDSCONS TRUE |
should the constraint handler be skipped, if no constraints are available?
Definition at line 54 of file cons_savesdpsol.c.
Referenced by SCIPincludeConshdlrSavesdpsol().
|
static |
frees specific constraint data
Definition at line 75 of file cons_savesdpsol.c.
References SCIP_DECL_CONSENFORELAX().
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 107 of file cons_savesdpsol.c.
References CONSHDLR_NAME, and SCIP_DECL_CONSENFOLP().
Referenced by SCIP_DECL_CONSDELETE().
|
static |
constraint enforcing method of constraint handler for LP solutions
Definition at line 123 of file cons_savesdpsol.c.
References CONSHDLR_NAME, and SCIP_DECL_CONSENFOPS().
Referenced by SCIP_DECL_CONSENFORELAX().
|
static |
constraint enforcing method of constraint handler for pseudo solutions
Definition at line 139 of file cons_savesdpsol.c.
References CONSHDLR_NAME, and SCIP_DECL_CONSCHECK().
Referenced by SCIP_DECL_CONSENFOLP().
|
static |
feasibility check method of constraint handler for primal solutions
Definition at line 155 of file cons_savesdpsol.c.
References CONSHDLR_NAME, and SCIP_DECL_CONSLOCK().
Referenced by SCIP_DECL_CONSENFOPS().
|
static |
variable rounding lock method of constraint handler
Definition at line 171 of file cons_savesdpsol.c.
References CONSHDLR_NAME, and SCIP_DECL_CONSHDLRCOPY().
Referenced by SCIP_DECL_CONSCHECK().
|
static |
copy method for constraint handler plugins (called when SCIP copies plugins)
Definition at line 184 of file cons_savesdpsol.c.
References CONSHDLR_NAME, SCIP_DECL_CONSCOPY(), and SCIPincludeConshdlrSavesdpsol().
Referenced by SCIP_DECL_CONSLOCK().
|
static |
constraint copying method of constraint handler
Definition at line 202 of file cons_savesdpsol.c.
References SCIPincludeConshdlrSavesdpsol().
Referenced by SCIP_DECL_CONSHDLRCOPY().
SCIP_RETCODE SCIPincludeConshdlrSavesdpsol | ( | SCIP * | scip | ) |
include Savesdpsol constraint handler
scip | SCIP data structure |
Definition at line 210 of file cons_savesdpsol.c.
References CONSHDLR_CHECKPRIORITY, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, and createConsSavesdpsol().
Referenced by SCIP_DECL_CONSCOPY(), SCIP_DECL_CONSHDLRCOPY(), and SCIPSDPincludeDefaultPlugins().
SCIP_RETCODE createConsSavesdpsol | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
SCIP_Longint | node, | ||
SCIP_SOL * | sol, | ||
SCIP_Real | maxprimalentry, | ||
int | nblocks, | ||
int * | startXnblocknonz, | ||
int ** | startXrow, | ||
int ** | startXcol, | ||
SCIP_Real ** | startXval | ||
) |
create a Savesdpsol-Cons, i.e. save the current optimal solution for the SDP-relaxation of this node
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
node | index of the node the solution belongs to |
sol | optimal solution for SDP-relaxation of this node |
maxprimalentry | maximum absolute value of primal matrix |
nblocks | number of blocks INCLUDING lp-block |
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 if nblocks = 0 |
startXrow | primal matrix X as starting point for the solver: row indices for each block; or NULL if nblocks = 0 |
startXcol | primal matrix X as starting point for the solver: column indices for each block; or NULL if nblocks = 0 |
startXval | primal matrix X as starting point for the solver: values for each block; or NULL if nblocks = 0 |
Definition at line 238 of file cons_savesdpsol.c.
References name, and SCIPconsSavesdpsolGetNodeIndex().
Referenced by calcRelax(), and SCIPincludeConshdlrSavesdpsol().
SCIP_Longint SCIPconsSavesdpsolGetNodeIndex | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
for the given cons of type Savesdpsol returns the node the information belongs to
scip | SCIP data structure |
cons | constraint to get starting point for |
Definition at line 317 of file cons_savesdpsol.c.
References SCIPconsSavesdpsolGetDualVector().
Referenced by calcRelax(), and createConsSavesdpsol().
SCIP_SOL* SCIPconsSavesdpsolGetDualVector | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
for the given cons of type Savesdpsol returns the previous dual solution vector y
scip | SCIP data structure |
cons | constraint to get starting point for |
Definition at line 335 of file cons_savesdpsol.c.
References SCIPconsSavesdpsolGetMaxPrimalEntry().
Referenced by calcRelax(), and SCIPconsSavesdpsolGetNodeIndex().
SCIP_Real SCIPconsSavesdpsolGetMaxPrimalEntry | ( | SCIP * | scip, |
SCIP_CONS * | cons | ||
) |
for the given cons of type Savesdpsol returns the maximum entry of primal solution X
scip | SCIP data structure |
cons | constraint to get maximum primal entry for |
Definition at line 353 of file cons_savesdpsol.c.
References SCIPconsSavesdpsolGetPrimalMatrixNonzeros().
Referenced by calcRelax(), and SCIPconsSavesdpsolGetDualVector().
SCIP_RETCODE SCIPconsSavesdpsolGetPrimalMatrixNonzeros | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | nblocks, | ||
int * | startXnblocknonz | ||
) |
for the given cons of type Savesdpsol returns the number of nonzeros for each block of previous primal solution X
scip | SCIP data structure |
cons | constraint to get maximum primal entry for |
nblocks | number of blocks INCLUDING lp-block |
startXnblocknonz | input: allocated memory for startXrow/col/val output: length of startXrow/col/val |
Definition at line 371 of file cons_savesdpsol.c.
References SCIPconsSavesdpsolGetPrimalMatrix().
Referenced by calcRelax(), and SCIPconsSavesdpsolGetMaxPrimalEntry().
SCIP_RETCODE SCIPconsSavesdpsolGetPrimalMatrix | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | nblocks, | ||
int * | startXnblocknonz, | ||
int ** | startXrow, | ||
int ** | startXcol, | ||
SCIP_Real ** | startXval | ||
) |
for the given cons of type Savesdpsol returns the previous primal solution X
scip | SCIP data structure |
cons | constraint to get maximum primal entry for |
nblocks | number of blocks INCLUDING lp-block |
startXnblocknonz | input: allocated memory for startXrow/col/val output: length of startXrow/col/val |
startXrow | pointer to store pointer to row indices of X |
startXcol | pointer to store pointer to column indices of X |
startXval | pointer to store pointer to values of X |
Definition at line 402 of file cons_savesdpsol.c.
Referenced by calcRelax(), and SCIPconsSavesdpsolGetPrimalMatrixNonzeros().