SCIP-SDP  3.2.0
Functions
cons_savesdpsol.h File Reference

constraint handler for saving SDP solutions in nodes More...

Go to the source code of this file.

Functions

SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSavesdpsol (SCIP *scip)
 
SCIP_EXPORT 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_EXPORT SCIP_Longint SCIPconsSavesdpsolGetNodeIndex (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_SOL * SCIPconsSavesdpsolGetDualVector (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_Real SCIPconsSavesdpsolGetMaxPrimalEntry (SCIP *scip, SCIP_CONS *cons)
 
SCIP_EXPORT SCIP_RETCODE SCIPconsSavesdpsolGetPrimalMatrixNonzeros (SCIP *scip, SCIP_CONS *cons, int nblocks, int *startXnblocknonz)
 
SCIP_EXPORT SCIP_RETCODE SCIPconsSavesdpsolGetPrimalMatrix (SCIP *scip, SCIP_CONS *cons, int nblocks, int *startXnblocknonz, int **startXrow, int **startXcol, SCIP_Real **startXval)
 

Detailed Description

constraint handler for saving SDP solutions in nodes

Author
Sonja Mars
Lars Schewe
Tristan Gally

Definition in file cons_savesdpsol.h.

Function Documentation

SCIP_EXPORT SCIP_RETCODE SCIPincludeConshdlrSavesdpsol ( SCIP *  scip)

include Savesdpsol constraint handler

Parameters
scipSCIP 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_EXPORT 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

Parameters
scipSCIP data structure
conspointer to hold the created constraint
namename of constraint
nodeindex of the node the solution belongs to
soloptimal solution for SDP-relaxation of this node
maxprimalentrymaximum absolute value of primal matrix
nblocksnumber of blocks INCLUDING lp-block
startXnblocknonzprimal matrix X as starting point for the solver: number of nonzeros for each block, also length of corresponding row/col/val-arrays; or NULL if nblocks = 0
startXrowprimal matrix X as starting point for the solver: row indices for each block; or NULL if nblocks = 0
startXcolprimal matrix X as starting point for the solver: column indices for each block; or NULL if nblocks = 0
startXvalprimal 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_EXPORT SCIP_Longint SCIPconsSavesdpsolGetNodeIndex ( SCIP *  scip,
SCIP_CONS *  cons 
)

for the given cons of type Savesdpsol returns the node the information belongs to

Parameters
scipSCIP data structure
consconstraint to get starting point for

Definition at line 317 of file cons_savesdpsol.c.

References SCIPconsSavesdpsolGetDualVector().

Referenced by calcRelax(), and createConsSavesdpsol().

SCIP_EXPORT SCIP_SOL* SCIPconsSavesdpsolGetDualVector ( SCIP *  scip,
SCIP_CONS *  cons 
)

for the given cons of type Savesdpsol returns the previous dual solution vector y

Parameters
scipSCIP data structure
consconstraint to get starting point for

Definition at line 335 of file cons_savesdpsol.c.

References SCIPconsSavesdpsolGetMaxPrimalEntry().

Referenced by calcRelax(), and SCIPconsSavesdpsolGetNodeIndex().

SCIP_EXPORT SCIP_Real SCIPconsSavesdpsolGetMaxPrimalEntry ( SCIP *  scip,
SCIP_CONS *  cons 
)

for the given cons of type Savesdpsol returns the maximum entry of primal solution X

Parameters
scipSCIP data structure
consconstraint to get maximum primal entry for

Definition at line 353 of file cons_savesdpsol.c.

References SCIPconsSavesdpsolGetPrimalMatrixNonzeros().

Referenced by calcRelax(), and SCIPconsSavesdpsolGetDualVector().

SCIP_EXPORT 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

Parameters
scipSCIP data structure
consconstraint to get maximum primal entry for
nblocksnumber of blocks INCLUDING lp-block
startXnblocknonzinput: 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_EXPORT 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

Parameters
scipSCIP data structure
consconstraint to get maximum primal entry for
nblocksnumber of blocks INCLUDING lp-block
startXnblocknonzinput: allocated memory for startXrow/col/val output: length of startXrow/col/val
startXrowpointer to store pointer to row indices of X
startXcolpointer to store pointer to column indices of X
startXvalpointer to store pointer to values of X

Definition at line 402 of file cons_savesdpsol.c.

Referenced by calcRelax(), and SCIPconsSavesdpsolGetPrimalMatrixNonzeros().