Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Globals | Related Pages

DSDP Basics


Detailed Description

DSDP can be used within a C application through a set of subroutines.

The subroutines listed below use DSDP to solve problems in DSDP Standard Form. Several examples of applications that use the DSDP application program interface are included in the distribution.

Each of these applications includes the header

#include dsdp5.h 
and link to the DSDP library.

Return values:
0 if successful
The documentation of DSDP subroutines in this chapter will not show the return integer, but we highly recommend that applications check for errors after each subroutine.


Functions

int DSDPComputeX (DSDP dsdp)
 Compute the X variables.
int DSDPCreate (int m, DSDP *dsdpnew)
 Create a DSDP solver. FIRST DSDP routine!
int DSDPDestroy (DSDP dsdp)
 Free the internal data structures of the solver and the cones associated with it.
int DSDPGetSolutionType (DSDP dsdp, DSDPSolutionType *pdfeasible)
 Solutions can be bounded, infeasible, or unbounded.
int DSDPGetY (DSDP dsdp, double y[], int m)
 Copies the variables y into an array.
int DSDPSetDualObjective (DSDP dsdp, int i, double bi)
 Set the objective vector b in (D).
int DSDPSetOptions (DSDP dsdp, char *runargs[], int nargs)
 Read command line arguments to set options in DSDP.
int DSDPSetStandardMonitor (DSDP dsdp, int k)
 Print at every kth iteration.
int DSDPSetup (DSDP dsdp)
 Set up data structures in the solver and the cones associated with it.
int DSDPSolve (DSDP dsdp)
 Apply DSDP to the problem.
int DSDPView (DSDP dsdp)
 Print many of the parameters currently set in DSDP.


Function Documentation

int DSDPComputeX DSDP  dsdp  ) 
 

Compute the X variables.

This routine explicitly computes X and determines the feasibility and unboundedness of the solution. This routine should be called after DSDPSolve().

The cost of the dual-scaling direction is less than the cost of other interior-point directions because the X matrix does not have to be computed explicitly at each iteration.

Parameters:
dsdp the solver
See also:
DSDPSolve()

DSDPGetSolutionType()

DSDPGetPObjective()

These four routines can usually be called together.
DSDP dsdp;
DSDPSolutionType type;

DSDPSetup(dsdp);
DSDPSolve(dsdp);
DSDPComputeX(dsdp);
DSDPGetSolutionType(dsdp,&type);

Definition at line 55 of file dsdpx.c.

Referenced by DSDPPrintSolution(), LovaszTheta(), MaxCut(), mexFunction(), ReadSDPAFile(), and StableSet().

int DSDPCreate int  m,
DSDP dsdpnew
 

Create a DSDP solver. FIRST DSDP routine!

Parameters:
m the number of variables y
*dsdpnew will be set to a new solver object
See also:
DSDPSetDualObjective()

DSDPSetup()

DSDPSolve()

DSDPDestroy()

For example, to create a DSDP solver for a problem with 10 y variables,
int m=10;
DSDP dsdp;
DSDPCreate(m,&dsdp);

Definition at line 30 of file dsdpsetup.c.

Referenced by LovaszTheta(), MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), and StableSet().

int DSDPDestroy DSDP  dsdp  ) 
 

Free the internal data structures of the solver and the cones associated with it.

Parameters:
dsdp the solver
See also:
DSDPCreate()

DSDPSolve()

DSDPSetup()

Definition at line 496 of file dsdpsetup.c.

Referenced by LovaszTheta(), MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), and StableSet().

int DSDPGetSolutionType DSDP  dsdp,
DSDPSolutionType pdfeasible
 

Solutions can be bounded, infeasible, or unbounded.

Parameters:
dsdp is the solver
*pdfeasible will be set to the proper enumerated type.
See also:
DSDPSetPenaltyParameter()

DSDPSetYBounds()

DSDPStopReason()

Definition at line 254 of file dsdpx.c.

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

int DSDPGetY DSDP  dsdp,
double  y[],
int  m
 

Copies the variables y into an array.

Parameters:
dsdp is the solver
y is an array
m is the length of the array and the dimension of y
See also:
DSDPSetY0()

DSDPComputeX()

Definition at line 100 of file dsdpsetdata.c.

Referenced by DSDPPrintSolution(), MaxCut(), and mexFunction().

int DSDPSetDualObjective DSDP  dsdp,
int  i,
double  bi
 

Set the objective vector b in (D).

Parameters:
dsdp is the solver
i is the variable number from 1 through m
bi is the objective value associated with variable i
See also:
DSDPSetY0()

DSDPGetDObjective()

The dual objective function is $ \mbox{maximize} \ \ {\displaystyle \sum_{i=1}^m b_i \ y_i } $ .

Definition at line 25 of file dsdpsetdata.c.

Referenced by MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), SetStableSetData(), and SetThetaData().

int DSDPSetOptions DSDP  dsdp,
char *  runargs[],
int  nargs
 

Read command line arguments to set options in DSDP.

Parameters:
dsdp is the solver
runargs is the array of strings representing the options
nargs is the number of arguments
See also:
DSDPReadOptions()

DSDPPrintOptions()

DSDPSetGapTolerance()

DSDPSetStandardMonitor()

DSDPSetPenaltyParameter()

DSDPSetMaxIts()

DSDPSetR0()

DSDPSetYBounds()

DSDPSetPotentialParameter()

Definition at line 46 of file dsdpsetoptions.c.

Referenced by DSDPReadOptions(), LovaszTheta(), MinColoring(), and StableSet().

int DSDPSetStandardMonitor DSDP  dsdp,
int  k
 

Print at every kth iteration.

Parameters:
dsdp is the solver
k is the frequency to print information.
Iter   PP Objective      DD Objective    PInfeas   DInfeas     Nu     StepLength   Pnrm
---------------------------------------------------------------------------------------
0     1.00000000e+02   -1.13743137e+05   2.2e+00   3.8e+02   1.1e+05  0.00  0.00   0.00
1     1.36503342e+06   -6.65779055e+04   5.1e+00   2.2e+02   1.1e+04  1.00  0.33   4.06
2     1.36631922e+05   -6.21604409e+03   5.4e+00   1.9e+01   4.5e+02  1.00  1.00   7.85
3     5.45799174e+03   -3.18292092e+03   1.5e-03   9.1e+00   7.5e+01  1.00  1.00  17.63
4     1.02930559e+03   -5.39166166e+02   1.1e-05   5.3e-01   2.7e+01  1.00  1.00   7.58
5     4.30074471e+02   -3.02460061e+01   3.3e-09   0.0e+00   5.6e+00  1.00  1.00  11.36
...
11    8.99999824e+00    8.99999617e+00   1.1e-16   0.0e+00   1.7e-08  1.00  1.00   7.03
12    8.99999668e+00    8.99999629e+00   2.9e-19   0.0e+00   3.4e-09  1.00  1.00  14.19

  • Iter - the current iteration number,
  • PP Objective - the current objective value in (PP),
  • DD Objective - the current objective value in (DD),
  • PInfeas - is the largest number $(x^u - x^l)_i$ in (PP),
  • DInfeas - the variable r in (DD) that corresponds to the infeasibility of y and S in (D).
  • Nu - the current barrier parameter $\frac{\bar{z} - b^Ty}{\rho}$ . This parameter decreases to zero as the points get closer to the solution,
  • StepLength - the multiple of the step-directions in (PP) and (DD),
  • Pnrm - the proximity to a point on the central path: $\sqrt{-\nabla \psi^T(y^k,\bar{z}^k ) \Delta y}$ .

See also:
DSDPGetIts()

DSDPGetDDObjective()

DSDPGetPPObjective()

DSDPGetR()

DSDPGetPInfeasibility()

DSDPGetBarrierParameter()

DSDPGetStepLengths()

DSDPGetPnorm()

Definition at line 153 of file dsdpprintout.c.

Referenced by LovaszTheta(), MaxCut(), MinColoring(), and StableSet().

int DSDPSetup DSDP  dsdp  ) 
 

Set up data structures in the solver and the cones associated with it.

Parameters:
dsdp the solver
See also:
DSDPCreate()

DSDPSolve()

DSDPDestroy()

This routine must be called before DSDPSolve(). Do not create SDP, LP or other cones after calling this routines, and do not set data into the cones after calling this routine.

Definition at line 193 of file dsdpsetup.c.

Referenced by LovaszTheta(), MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), and StableSet().

int DSDPSolve DSDP  dsdp  ) 
 

Apply DSDP to the problem.

Call this routine after DSDPCreate() and DSDPSetup(), and after setting the data.

Parameters:
dsdp is the solver
See also:
DSDPCreate()

DSDPGetSolutionType()

DSDPGetDObjective()

DSDPGetY()

DSDPStopReason()

Definition at line 343 of file dsdpsetup.c.

Referenced by LovaszTheta(), MaxCut(), mexFunction(), MinColoring(), ReadSDPAFile(), and StableSet().

int DSDPView DSDP  dsdp  ) 
 

Print many of the parameters currently set in DSDP.

Parameters:
dsdp is the solver
See also:
DSDPSetOptions()

DSDPGetPenaltyParameter()

DSDPGetSolutionType()

DSDPGetGapTolerance()

Definition at line 190 of file dsdpsetoptions.c.

Referenced by ReadSDPAFile().


Generated on Fri Oct 21 14:28:41 2005 for DSDP by  doxygen 1.4.2