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

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_SEPAPRIORITY   0
 
#define CONSHDLR_ENFOPRIORITY   0
 
#define CONSHDLR_CHECKPRIORITY   0
 
#define CONSHDLR_SEPAFREQ   -1
 
#define CONSHDLR_PROPFREQ   -1
 
#define CONSHDLR_EAGERFREQ   100
 
#define CONSHDLR_MAXPREROUNDS   -1
 
#define CONSHDLR_DELAYSEPA   FALSE
 
#define CONSHDLR_DELAYPROP   FALSE
 
#define CONSHDLR_DELAYPRESOL   FALSE
 
#define CONSHDLR_NEEDSCONS   TRUE
 
#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP
 

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)
 

Detailed Description

constraint handler for saving SDP solutions in nodes

Author
Tristan Gally

Definition in file cons_savesdpsol.c.

Macro Definition Documentation

#define CONSHDLR_NAME   "Savesdpsol"
#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_SEPAPRIORITY   0

priority of the constraint handler for separation

Definition at line 49 of file cons_savesdpsol.c.

#define CONSHDLR_ENFOPRIORITY   0

priority of the constraint handler for constraint enforcing

Definition at line 50 of file cons_savesdpsol.c.

Referenced by SCIPincludeConshdlrSavesdpsol().

#define CONSHDLR_CHECKPRIORITY   0

priority of the constraint handler for checking feasibility

Definition at line 51 of file cons_savesdpsol.c.

Referenced by SCIPincludeConshdlrSavesdpsol().

#define CONSHDLR_SEPAFREQ   -1

frequency for separating cuts; zero means to separate only in the root node

Definition at line 52 of file cons_savesdpsol.c.

#define CONSHDLR_PROPFREQ   -1

frequency for propagating domains; zero means only preprocessing propagation

Definition at line 53 of file cons_savesdpsol.c.

#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 54 of file cons_savesdpsol.c.

Referenced by SCIPincludeConshdlrSavesdpsol().

#define CONSHDLR_MAXPREROUNDS   -1

maximal number of presolving rounds the constraint handler participates in (-1: no limit)

Definition at line 57 of file cons_savesdpsol.c.

#define CONSHDLR_DELAYSEPA   FALSE

should separation method be delayed, if other separators found cuts?

Definition at line 58 of file cons_savesdpsol.c.

#define CONSHDLR_DELAYPROP   FALSE

should propagation method be delayed, if other propagators found reductions?

Definition at line 59 of file cons_savesdpsol.c.

#define CONSHDLR_DELAYPRESOL   FALSE

should presolving method be delayed, if other presolvers found reductions?

Definition at line 60 of file cons_savesdpsol.c.

#define CONSHDLR_NEEDSCONS   TRUE

should the constraint handler be skipped, if no constraints are available?

Definition at line 61 of file cons_savesdpsol.c.

Referenced by SCIPincludeConshdlrSavesdpsol().

#define CONSHDLR_PROP_TIMING   SCIP_PROPTIMING_BEFORELP

Definition at line 63 of file cons_savesdpsol.c.

Function Documentation

static SCIP_DECL_CONSDELETE ( consDeleteSavesdpsol  )
static

frees specific constraint data

Definition at line 84 of file cons_savesdpsol.c.

static SCIP_DECL_CONSENFORELAX ( consEnforelaxSavesdpsol  )
static

constraint enforcing method of constraint handler for LP solutions

Definition at line 116 of file cons_savesdpsol.c.

References CONSHDLR_NAME.

static SCIP_DECL_CONSENFOLP ( consEnfolpSavesdpsol  )
static

constraint enforcing method of constraint handler for LP solutions

Definition at line 132 of file cons_savesdpsol.c.

References CONSHDLR_NAME.

static SCIP_DECL_CONSENFOPS ( consEnfopsSavesdpsol  )
static

constraint enforcing method of constraint handler for pseudo solutions

Definition at line 148 of file cons_savesdpsol.c.

References CONSHDLR_NAME.

static SCIP_DECL_CONSCHECK ( consCheckSavesdpsol  )
static

feasibility check method of constraint handler for primal solutions

Definition at line 164 of file cons_savesdpsol.c.

References CONSHDLR_NAME.

static SCIP_DECL_CONSLOCK ( consLockSavesdpsol  )
static

variable rounding lock method of constraint handler

Definition at line 180 of file cons_savesdpsol.c.

References CONSHDLR_NAME.

static SCIP_DECL_CONSHDLRCOPY ( conshdlrCopySavesdpsol  )
static

copy method for constraint handler plugins (called when SCIP copies plugins)

Definition at line 193 of file cons_savesdpsol.c.

References CONSHDLR_NAME, and SCIPincludeConshdlrSavesdpsol().

static SCIP_DECL_CONSCOPY ( consCopySavesdpsol  )
static

constraint copying method of constraint handler

Definition at line 211 of file cons_savesdpsol.c.

SCIP_RETCODE SCIPincludeConshdlrSavesdpsol ( SCIP *  scip)

include Savesdpsol constraint handler

Parameters
scipSCIP data structure

Definition at line 221 of file cons_savesdpsol.c.

References CONSHDLR_CHECKPRIORITY, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_NAME, and CONSHDLR_NEEDSCONS.

Referenced by runSCIP(), and SCIP_DECL_CONSHDLRCOPY().

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 249 of file cons_savesdpsol.c.

Referenced by calcRelax().

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 327 of file cons_savesdpsol.c.

Referenced by calcRelax().

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 345 of file cons_savesdpsol.c.

Referenced by calcRelax().

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 363 of file cons_savesdpsol.c.

Referenced by calcRelax().

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 381 of file cons_savesdpsol.c.

Referenced by calcRelax().

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 412 of file cons_savesdpsol.c.

Referenced by calcRelax().