DSDP
Functions
Bounds

Functions

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

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.

◆ 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().

◆ 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.

◆ 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().

◆ 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]);

Definition at line 467 of file dbounds.c.