SCIP-SDP  4.0.0
Macros | Functions
solveonevarsdp.c File Reference

Solve SDP with one variable. More...

Go to the source code of this file.

Macros

#define BMS_CALL(x)
 

Functions

static SCIP_RETCODE SCIPoneVarFeasible (BMS_BUFMEM *bufmem, int blocksize, SCIP_Real *tmpmatrix, SCIP_Real *fullconstmatrix, SCIP_Real *fullmatrix, SCIP_Real alpha, SCIP_Real *eigenvalue, SCIP_Real *eigenvector)
 
static void computeSupergradient (int sdpnnonz, int *sdprow, int *sdpcol, SCIP_Real *sdpval, SCIP_Real *eigenvector, SCIP_Real *supergradient)
 
SCIP_RETCODE SCIPsolveOneVarSDP (BMS_BUFMEM *bufmem, SCIP_Real obj, SCIP_Real lb, SCIP_Real ub, int blocksize, int sdpconstnnonz, int *sdpconstrow, int *sdpconstcol, SCIP_Real *sdpconstval, int sdpnnonz, int *sdprow, int *sdpcol, SCIP_Real *sdpval, SCIP_Real infinity, SCIP_Real feastol, SCIP_Real *objval, SCIP_Real *optval)
 
SCIP_RETCODE SCIPsolveOneVarSDPDense (BMS_BUFMEM *bufmem, SCIP_Real obj, SCIP_Real lb, SCIP_Real ub, int blocksize, SCIP_Real *fullconstmatrix, int sdpnnonz, int *sdprow, int *sdpcol, SCIP_Real *sdpval, SCIP_Real infinity, SCIP_Real feastol, SCIP_Real *objval, SCIP_Real *optval)
 

Detailed Description

Solve SDP with one variable.

Author
Marc Pfetsch

Definition in file solveonevarsdp.c.

Macro Definition Documentation

#define BMS_CALL (   x)
Value:
do \
{ \
if( NULL == (x) ) \
{ \
SCIPerrorMessage("No memory in function call\n"); \
return SCIP_NOMEMORY; \
} \
} \
while( FALSE )

Checks if a BMSallocMemory-call was successfull, otherwise returns SCIP_NOMEMORY

Definition at line 43 of file solveonevarsdp.c.

Referenced by SCIPsolveOneVarSDP(), and SCIPsolveOneVarSDPDense().

Function Documentation

static SCIP_RETCODE SCIPoneVarFeasible ( BMS_BUFMEM *  bufmem,
int  blocksize,
SCIP_Real *  tmpmatrix,
SCIP_Real *  fullconstmatrix,
SCIP_Real *  fullmatrix,
SCIP_Real  alpha,
SCIP_Real *  eigenvalue,
SCIP_Real *  eigenvector 
)
static

determine whether linear combination with value alpha is feasible

Parameters
bufmembuffer memory
blocksizesize of the SDP-block
tmpmatrixtemporary matrix
fullconstmatrixconstant matrix
fullmatrixconstant matrix
alphavariable value to test
eigenvaluepointer to store eigenvalue
eigenvectorcorresponding eigenvector

Definition at line 56 of file solveonevarsdp.c.

References SCIPlapackComputeIthEigenvalue().

Referenced by SCIPsolveOneVarSDP(), and SCIPsolveOneVarSDPDense().

static void computeSupergradient ( int  sdpnnonz,
int *  sdprow,
int *  sdpcol,
SCIP_Real *  sdpval,
SCIP_Real *  eigenvector,
SCIP_Real *  supergradient 
)
static

compute supergradient

Parameters
sdpnnonznumber of nonzero elements in the SDP-constraint-matrix
sdprowarray of row-indices of nonzero matrix entries
sdpcolarray of column-indices of nonzero matrix entries
sdpvalarray of nonzero values
eigenvectorarray of eigenvector
supergradientpointer to store the value of the supergradient

Definition at line 92 of file solveonevarsdp.c.

Referenced by SCIPsolveOneVarSDP(), and SCIPsolveOneVarSDPDense().

SCIP_RETCODE SCIPsolveOneVarSDP ( BMS_BUFMEM *  bufmem,
SCIP_Real  obj,
SCIP_Real  lb,
SCIP_Real  ub,
int  blocksize,
int  sdpconstnnonz,
int *  sdpconstrow,
int *  sdpconstcol,
SCIP_Real *  sdpconstval,
int  sdpnnonz,
int *  sdprow,
int *  sdpcol,
SCIP_Real *  sdpval,
SCIP_Real  infinity,
SCIP_Real  feastol,
SCIP_Real *  objval,
SCIP_Real *  optval 
)

solves SDP with one variable and one SDP block

Parameters
bufmembuffer memory
objobjective coefficient of variable
lblower bound of variable
ubupper bound of variable
blocksizesize of the SDP-block
sdpconstnnonznumber of nonzero elements in the constant matrix of the SDP-block
sdpconstrowarray of row-indices of constant matrix
sdpconstcolarray of column-indices of constant matrix
sdpconstvalarray of nonzero values of entries of constant matrix
sdpnnonznumber of nonzero elements in the SDP-constraint-matrix
sdprowarray of row-indices of nonzero matrix entries
sdpcolarray of column-indices of nonzero matrix entries
sdpvalarray of nonzero values
infinityinfinity value
feastolfeasibility tolerance
objvalpointer to store optimal objective value
optvalpointer to store optimal value of variable

Definition at line 120 of file solveonevarsdp.c.

References BMS_CALL, computeSupergradient(), and SCIPoneVarFeasible().

Referenced by SCIPsdpiSolve().

SCIP_RETCODE SCIPsolveOneVarSDPDense ( BMS_BUFMEM *  bufmem,
SCIP_Real  obj,
SCIP_Real  lb,
SCIP_Real  ub,
int  blocksize,
SCIP_Real *  fullconstmatrix,
int  sdpnnonz,
int *  sdprow,
int *  sdpcol,
SCIP_Real *  sdpval,
SCIP_Real  infinity,
SCIP_Real  feastol,
SCIP_Real *  objval,
SCIP_Real *  optval 
)

solves SDP with one variable and one SDP block - variant for dense constant matrix

Parameters
bufmembuffer memory
objobjective coefficient of variable
lblower bound of variable
ubupper bound of variable
blocksizesize of the SDP-block
fullconstmatrixdense full constant matrix
sdpnnonznumber of nonzero elements in the SDP-constraint-matrix
sdprowarray of row-indices of nonzero matrix entries
sdpcolarray of column-indices of nonzero matrix entries
sdpvalarray of nonzero values
infinityinfinity value
feastolfeasibility tolerance
objvalpointer to store optimal objective value
optvalpointer to store optimal value of variable

Definition at line 305 of file solveonevarsdp.c.

References BMS_CALL, computeSupergradient(), and SCIPoneVarFeasible().

Referenced by tightenBounds(), and tightenMatrices().