DSDP
Bounds

Functions

int BConeAllocateBounds (BCone bcone, int nnz)
 Set a surplus variable in constraint in (P).
 
int BConeCopyX (BCone bcone, double xl[], double xu[], int m)
 Copy the variables into arrays.
 
int BConeSetLowerBound (BCone bcone, int vari, double lbound)
 Set a lower bound on a variable y.
 
int BConeSetPSlackVariable (BCone bcone, int vari)
 Set a slack variable to a constraint in (P).
 
int BConeSetPSurplusVariable (BCone bcone, int vari)
 Set a surplus variable in constraint in (P).
 
int BConeSetUpperBound (BCone bcone, int vari, double ubound)
 Set an upper bound on a variable y.
 
int DSDPCreateBCone (DSDP dsdp, BCone *dspcone)
 Create a new cone that represents bounds on the y variables.
 

Detailed Description

Bounds on the variables y are a special type of semidefinite and LP cone. Corresponding to lower and upper bounds on the y variables are surplus and slack variables in (P) with an a cost.

Variables y are numbered 1 through m.

#include dsdp5.h
Return values
0if successful

Function Documentation

◆ BConeAllocateBounds()

int BConeAllocateBounds ( BCone bcone,
int nnz )

Set a surplus variable in constraint in (P).

Parameters
bconebounds
nnznumber of bounds that will be set.

This optional routine allows for efficient allocation of memory for this object.

See also
BConeSetLowerBound()
BConeSetUpperBound()

Definition at line 645 of file dbounds.c.

Referenced by mexFunction(), MinColoring(), and ReadSDPAFile().

◆ BConeCopyX()

int BConeCopyX ( BCone bcone,
double xl[],
double xu[],
int m )

Copy the variables into arrays.

Parameters
bconeBounds
xlarray
xuarray
mlength of the arrays
See also
DSDPComputeX()

This routine will set the values of this array to the value of the corresponding variable. When no bound is present, the variable will equal zero.

Definition at line 517 of file dbounds.c.

◆ BConeSetLowerBound()

int BConeSetLowerBound ( BCone bcone,
int vari,
double lbound )

Set a lower bound on a variable y.

Parameters
bconebounds
variy variable number
lboundlower bound

Definition at line 566 of file dbounds.c.

Referenced by BConeSetPSurplusVariable(), mexFunction(), and ReadSDPAFile().

◆ BConeSetPSlackVariable()

int BConeSetPSlackVariable ( BCone bcone,
int vari )

Set a slack variable to a constraint in (P).

Parameters
bconebounds
variy variable number
See also
BConeSetUpperBound()
BConeSetPSurplusVariable()

When a constraint in (P) is best expressed with an inequality constraint, a slack variable may be added.

This command is equivalent to setting an upper bound on variable $y_i$ to zero.

Definition at line 607 of file dbounds.c.

Referenced by MinColoring().

◆ BConeSetPSurplusVariable()

int BConeSetPSurplusVariable ( BCone bcone,
int vari )

Set a surplus variable in constraint in (P).

Parameters
bconebounds
variy variable number
See also
BConeSetLowerBound()

Definition at line 624 of file dbounds.c.

◆ BConeSetUpperBound()

int BConeSetUpperBound ( BCone bcone,
int vari,
double ubound )

Set an upper bound on a variable y.

Parameters
bconebounds
variy variable number
uboundupper bound

Definition at line 583 of file dbounds.c.

Referenced by BConeSetPSlackVariable(), mexFunction(), and ReadSDPAFile().

◆ DSDPCreateBCone()

int DSDPCreateBCone ( DSDP dsdp,
BCone * dspcone )

Create a new cone that represents bounds on the y variables.

Parameters
dsdpthe solver
dspconenew cone

For example, to bound the first of three y variables below by 0 and 10,

DSDP dsdp;
BCone bcone;
int xl[3],xu[3];
DSDPCreate(3,&dsdp);
DSDPCreateBCone(dsdp,&bcone);
BConeSetLowerBound(bcone,1,0.0);
BConeSetLowerBound(bcone,1,10.0);
...
DSDPComputeX(dsdp);
BConeCopyX(bcone,xl,xu,3);
printf("The sensitivity of the solution to lower bound is %4.4f\n",xl[0]);
struct BCone_C * BCone
The BCone object points to lower and upper bounds on the variable y in (D).
Definition dsdp5.h:28
struct DSDP_C * DSDP
An implementation of the dual-scaling algorithm for semidefinite programming.
int BConeCopyX(BCone bcone, double xl[], double xu[], int m)
Copy the variables into arrays.
Definition dbounds.c:517
int BConeSetLowerBound(BCone bcone, int vari, double lbound)
Set a lower bound on a variable y.
Definition dbounds.c:566
int DSDPCreateBCone(DSDP dsdp, BCone *dspcone)
Create a new cone that represents bounds on the y variables.
Definition dbounds.c:467
int DSDPCreate(int m, DSDP *dsdpnew)
Create a DSDP solver. FIRST DSDP routine!
Definition dsdpsetup.c:30

Definition at line 467 of file dbounds.c.

Referenced by mexFunction(), MinColoring(), and ReadSDPAFile().