SCIP-SDP
2.1.0
|
Constraint handler for SDP-constraints. More...
Go to the source code of this file.
Functions | |
EXTERN SCIP_RETCODE | SCIPincludeConshdlrSdp (SCIP *scip) |
EXTERN SCIP_RETCODE | SCIPcreateConsSdp (SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, int nnonz, int blocksize, int *nvarnonz, int **col, int **row, SCIP_Real **val, SCIP_VAR **vars, int constnnonz, int *constcol, int *constrow, SCIP_Real *constval) |
EXTERN SCIP_RETCODE | SCIPconsSdpGetData (SCIP *scip, SCIP_CONS *cons, int *nvars, int *nnonz, int *blocksize, int *arraylength, int *nvarnonz, int **col, int **row, SCIP_Real **val, SCIP_VAR **vars, int *constnnonz, int *constcol, int *constrow, SCIP_Real *constval) |
EXTERN SCIP_RETCODE | SCIPconsSdpGetNNonz (SCIP *scip, SCIP_CONS *cons, int *nnonz, int *constnnonz) |
EXTERN SCIP_RETCODE | SCIPconsSdpGetFullAj (SCIP *scip, SCIP_CONS *cons, int j, SCIP_Real *Aj) |
EXTERN SCIP_RETCODE | SCIPconsSdpGetFullConstMatrix (SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat) |
EXTERN SCIP_RETCODE | SCIPconsSdpGetLowerTriangConstMatrix (SCIP *scip, SCIP_CONS *cons, SCIP_Real *mat) |
EXTERN SCIP_RETCODE | SCIPconsSdpCheckSdpCons (SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool printreason, SCIP_RESULT *result) |
EXTERN SCIP_RETCODE | SCIPconsSdpGuessInitialPoint (SCIP *scip, SCIP_CONS *cons, SCIP_Real *lambdastar) |
Constraint handler for SDP-constraints.
Constraint handler for semidefinite constraints of the form , where the matrices and need to be symmetric. Only the nonzero entries of the matrices are stored.
Definition in file cons_sdp.h.
EXTERN SCIP_RETCODE SCIPincludeConshdlrSdp | ( | SCIP * | scip | ) |
creates the handler for SDP constraints and includes it in SCIP
scip | SCIP data structure |
Definition at line 2270 of file cons_sdp.c.
References CONSHDLR_CHECKPRIORITY, CONSHDLR_DELAYSEPA, CONSHDLR_DESC, CONSHDLR_EAGERFREQ, CONSHDLR_ENFOPRIORITY, CONSHDLR_MAXPREROUNDS, CONSHDLR_NAME, CONSHDLR_NEEDSCONS, CONSHDLR_PRESOLTIMING, CONSHDLR_SEPAFREQ, and CONSHDLR_SEPAPRIORITY.
Referenced by runSCIP(), and SCIP_DECL_CONSHDLRCOPY().
EXTERN SCIP_RETCODE SCIPcreateConsSdp | ( | SCIP * | scip, |
SCIP_CONS ** | cons, | ||
const char * | name, | ||
int | nvars, | ||
int | nnonz, | ||
int | blocksize, | ||
int * | nvarnonz, | ||
int ** | col, | ||
int ** | row, | ||
SCIP_Real ** | val, | ||
SCIP_VAR ** | vars, | ||
int | constnnonz, | ||
int * | constcol, | ||
int * | constrow, | ||
SCIP_Real * | constval | ||
) |
creates an SDP-constraint
scip | SCIP data structure |
cons | pointer to hold the created constraint |
name | name of constraint |
nvars | number of variables in this SDP constraint |
nnonz | number of nonzeros in this SDP constraint |
blocksize | size of this SDP-block |
nvarnonz | number of nonzeros for each variable, also length of the arrays col/row/val point to |
col | pointer to column indices of the nonzeros for each variable |
row | pointer to row indices of the nonzeros for each variable |
val | pointer to values of the nonzeros for each variable |
vars | SCIP_VARiables present in this SDP constraint that correspond to the indices in col/row/val |
constnnonz | number of nonzeros in the constant part of this SDP constraint |
constcol | column indices of the constant nonzeros |
constrow | row indices of the constant nonzeros |
constval | values of the constant nonzeros |
Definition at line 2634 of file cons_sdp.c.
References setMaxRhsEntry().
Referenced by SCIP_DECL_CONSCOPY(), and scip::ObjReaderSDPA::scip_read().
EXTERN SCIP_RETCODE SCIPconsSdpGetData | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int * | nvars, | ||
int * | nnonz, | ||
int * | blocksize, | ||
int * | arraylength, | ||
int * | nvarnonz, | ||
int ** | col, | ||
int ** | row, | ||
SCIP_Real ** | val, | ||
SCIP_VAR ** | vars, | ||
int * | constnnonz, | ||
int * | constcol, | ||
int * | constrow, | ||
SCIP_Real * | constval | ||
) |
get the data belonging to a single SDP-constraint
In arraylength the length of the nvarnonz, col, row and val arrays has to be given, if it is not sufficient to store all block-pointers that need to be inserted, a debug message will be thrown and this variable will be set to the needed length. constnnonz should give the length of the const arrays, if it is too short it will also give the needed number and a debug message is thrown.
scip | SCIP data structure |
cons | SDP constraint to get data of |
nvars | pointer to store the number of variables in this SDP constraint |
nnonz | pointer to store the number of nonzeros in this SDP constraint |
blocksize | pointer to store the size of this SDP-block |
arraylength | length of the given nvarnonz, col, row and val arrays, if this is too short this will return the needed length |
nvarnonz | pointer to store the number of nonzeros for each variable, also length of the arrays col/row/val are pointing to |
col | pointer to store the column indices of the nonzeros for each variable |
row | pointer to store the row indices of the nonzeros for each variable |
val | pointer to store the values of the nonzeros for each variable |
vars | pointer to store the SCIP variables present in this constraint that correspond to the indices in col/row/val |
constnnonz | pointer to store the number of nonzeros in the constant part of this SDP constraint, also length of the const arrays |
constcol | pointer to store the column indices of the constant nonzeros |
constrow | pointer to store the row indices of the constant nonzeros |
constval | pointer to store the values of the constant nonzeros |
Definition at line 2319 of file cons_sdp.c.
Referenced by putSdpDataInInterface().
EXTERN SCIP_RETCODE SCIPconsSdpGetNNonz | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int * | nnonz, | ||
int * | constnnonz | ||
) |
gets the number of nonzeros and constant nonzeros for this SDP constraint
Either nnonz or constnnonz may be NULL if only the other one is needed.
scip | SCIP data structure |
cons | SDP constraint to get data of |
nnonz | pointer to store the number of nonzeros in this SDP constraint |
constnnonz | pointer to store the number of nonzeros in the constant part of this SDP constraint |
Definition at line 2415 of file cons_sdp.c.
Referenced by putSdpDataInInterface().
EXTERN SCIP_RETCODE SCIPconsSdpGetFullAj | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
int | j, | ||
SCIP_Real * | Aj | ||
) |
gets the full constraint Matrix for a given variable j
scip | SCIP data structure |
cons | SDP constraint to get data of |
j | the variable j to get the corresponding matrix for |
Aj | pointer to store the full matrix |
Definition at line 2440 of file cons_sdp.c.
Referenced by SCIP_DECL_CONSLOCK().
EXTERN SCIP_RETCODE SCIPconsSdpGetFullConstMatrix | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real * | mat | ||
) |
gives an n*n-long array with the full constant matrix
scip | SCIP data structure |
cons | SDP constraint to get data of |
mat | pointer to store the full constant matrix |
Definition at line 2475 of file cons_sdp.c.
Referenced by cutUsingEigenvector().
EXTERN SCIP_RETCODE SCIPconsSdpGetLowerTriangConstMatrix | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real * | mat | ||
) |
gives a 0.5*n*(n+1)-long array with the lower triangular part of the constant matrix indexed by compLowerTriangPos
scip | SCIP data structure |
cons | SDP constraint to get data of |
mat | pointer to store the lower triangular part of the constant matrix |
Definition at line 2509 of file cons_sdp.c.
References compLowerTriangPos().
Referenced by diagGEzero().
EXTERN SCIP_RETCODE SCIPconsSdpCheckSdpCons | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_SOL * | sol, | ||
SCIP_Bool | checkintegrality, | ||
SCIP_Bool | checklprows, | ||
SCIP_Bool | printreason, | ||
SCIP_RESULT * | result | ||
) |
checks feasibility for a single SDP constraint
scip | SCIP data structure |
cons | the constraint which should be checked |
sol | the solution to check feasibility for |
checkintegrality | has integrality to be checked? |
checklprows | have current LP rows to be checked? |
printreason | should the reason for the violation be printed? |
result | pointer to store the result of the feasibility checking call |
Definition at line 357 of file cons_sdp.c.
References computeSdpMatrix(), expandSymMatrix(), and SCIPlapackComputeIthEigenvalue().
Referenced by SCIP_DECL_CONSCHECK(), SCIP_DECL_CONSENFOLP(), and SCIP_DECL_CONSENFOPS().
EXTERN SCIP_RETCODE SCIPconsSdpGuessInitialPoint | ( | SCIP * | scip, |
SCIP_CONS * | cons, | ||
SCIP_Real * | lambdastar | ||
) |
Compute a heuristic guess for a good starting solution .
The solution is computed as
where measures the sparsity of the matrices.
scip | SCIP data structure |
cons | the constraint for which the Matrix should be assembled |
lambdastar | pointer to store the guess for the initial point |
Definition at line 2548 of file cons_sdp.c.
References CONSHDLR_NAME.
Referenced by SCIP_DECL_RELAXINITSOL().