DSDP
|
Functions | |
int | DSDPComputeX (DSDP dsdp) |
Compute the X variables. More... | |
int | DSDPCreate (int m, DSDP *dsdpnew) |
Create a DSDP solver. FIRST DSDP routine! More... | |
int | DSDPDestroy (DSDP dsdp) |
Free the internal data structures of the solver and the cones associated with it. More... | |
int | DSDPGetSolutionType (DSDP dsdp, DSDPSolutionType *pdfeasible) |
Solutions can be bounded, infeasible, or unbounded. More... | |
int | DSDPGetY (DSDP dsdp, double y[], int m) |
Copies the variables y into an array. More... | |
int | DSDPSetDualObjective (DSDP dsdp, int i, double bi) |
Set the objective vector b in (D). More... | |
int | DSDPSetOptions (DSDP dsdp, char *runargs[], int nargs) |
Read command line arguments to set options in DSDP. More... | |
int | DSDPSetStandardMonitor (DSDP dsdp, int k) |
Print at every kth iteration. More... | |
int | DSDPSetup (DSDP dsdp) |
Set up data structures in the solver and the cones associated with it. More... | |
int | DSDPSolve (DSDP dsdp) |
Apply DSDP to the problem. More... | |
int | DSDPView (DSDP dsdp) |
Print many of the parameters currently set in DSDP. More... | |
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
and link to the DSDP library.
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.
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.
dsdp | the solver |
These four routines can usually be called together.
int DSDPCreate | ( | int | m, |
DSDP * | dsdpnew | ||
) |
Create a DSDP solver. FIRST DSDP routine!
m | the number of variables y |
*dsdpnew | will be set to a new solver object |
For example, to create a DSDP solver for a problem with 10 y variables,
Definition at line 30 of file dsdpsetup.c.
Referenced by MaxCut(), and mexFunction().
int DSDPDestroy | ( | DSDP | dsdp | ) |
Free the internal data structures of the solver and the cones associated with it.
dsdp | the solver |
Definition at line 496 of file dsdpsetup.c.
int DSDPGetSolutionType | ( | DSDP | dsdp, |
DSDPSolutionType * | pdfeasible | ||
) |
Solutions can be bounded, infeasible, or unbounded.
dsdp | is the solver |
*pdfeasible | will be set to the proper enumerated type. |
Definition at line 254 of file dsdpx.c.
Referenced by DSDPView().
int DSDPGetY | ( | DSDP | dsdp, |
double | y[], | ||
int | m | ||
) |
Copies the variables y into an array.
dsdp | is the solver |
y | is an array |
m | is the length of the array and the dimension of y |
Definition at line 100 of file dsdpsetdata.c.
Referenced by DSDPPrintSolution().
int DSDPSetDualObjective | ( | DSDP | dsdp, |
int | i, | ||
double | bi | ||
) |
Set the objective vector b in (D).
dsdp | is the solver |
i | is the variable number from 1 through m |
bi | is the objective value associated with variable i |
The dual objective function is .
Definition at line 25 of file dsdpsetdata.c.
Referenced by SetStableSetData().
int DSDPSetOptions | ( | DSDP | dsdp, |
char * | runargs[], | ||
int | nargs | ||
) |
Read command line arguments to set options in DSDP.
dsdp | is the solver |
runargs | is the array of strings representing the options |
nargs | is the number of arguments |
Definition at line 46 of file dsdpsetoptions.c.
Referenced by DSDPReadOptions().
int DSDPSetStandardMonitor | ( | DSDP | dsdp, |
int | k | ||
) |
Print at every kth iteration.
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 DInfeas
- the variable r in (DD) that corresponds to the infeasibility of y and S in (D).Nu
- the current barrier parameter StepLength
- the multiple of the step-directions in (PP) and (DD),Pnrm
- the proximity to a point on the central path: Definition at line 153 of file dsdpprintout.c.
int DSDPSetup | ( | DSDP | dsdp | ) |
Set up data structures in the solver and the cones associated with it.
dsdp | the solver |
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.
int DSDPSolve | ( | DSDP | dsdp | ) |
Apply DSDP to the problem.
Call this routine after DSDPCreate() and DSDPSetup(), and after setting the data.
dsdp | is the solver |
Definition at line 343 of file dsdpsetup.c.
int DSDPView | ( | DSDP | dsdp | ) |
Print many of the parameters currently set in DSDP.
dsdp | is the solver |
Definition at line 190 of file dsdpsetoptions.c.