DSDP
Functions
DSDP Convergence

Functions

int DSDPDefaultConvergence (DSDP, void *)
 Check for Convergence. More...
 
int DSDPGetDualBound (DSDP dsdp, double *dbound)
 Get the termination parameter. More...
 
int DSDPGetGapHistory (DSDP dsdp, double hist[], int length)
 Copy a history of the duality gap into an array. More...
 
int DSDPGetGapTolerance (DSDP dsdp, double *gaptol)
 Get the termination tolerance. More...
 
int DSDPGetIts (DSDP dsdp, int *its)
 Copy the current iteration number. More...
 
int DSDPGetMaxIts (DSDP dsdp, int *its)
 Copy the maximum number of iterations from the solver. More...
 
int DSDPGetPInfeasibility (DSDP dsdp, double *pperror)
 Copy the infeasibility in (P). More...
 
int DSDPGetPNormTolerance (DSDP dsdp, double *ptol)
 Get the termination tolerance. More...
 
int DSDPGetPTolerance (DSDP dsdp, double *inftol)
 Copy the feasibility tolerance. More...
 
int DSDPGetRHistory (DSDP dsdp, double hist[], int length)
 Copy a history of the infeasibility in (D) into an array. More...
 
int DSDPGetRTolerance (DSDP dsdp, double *inftol)
 Copy the maximum infeasibility allowed (D). More...
 
int DSDPGetStepTolerance (DSDP dsdp, double *steptol)
 Get the current tolerance. More...
 
int DSDPSetConvergenceFlag (DSDP dsdp, DSDPTerminationReason reason)
 Monitor each iteration of the solver. More...
 
int DSDPSetDualBound (DSDP dsdp, double dbound)
 Terminate the solver if the objective value in (DD) is greater than this tolerance. More...
 
int DSDPSetGapTolerance (DSDP dsdp, double gaptol)
 Terminate the solver when the relative duality gap is less than this tolerance. More...
 
int DSDPSetMaxIts (DSDP dsdp, int its)
 Terminate the solver after this number of iterations. More...
 
int DSDPSetPNormTolerance (DSDP dsdp, double ptol)
 Terminate the solver when the relative duality gap is suffiently small and the PNorm is less than this quantity. Smaller values imply the final solution will be nearer to the central path. More...
 
int DSDPSetPTolerance (DSDP dsdp, double inftol)
 Classify (P) as feasible only if the infeasibility is less than this tolerance. More...
 
int DSDPSetRTolerance (DSDP dsdp, double inftol)
 Classify (D) as feasible only if the variable r is less than this tolerance. More...
 
int DSDPSetStepTolerance (DSDP dsdp, double steptol)
 Terminate the solver if the step length in (DD) is below this tolerance. More...
 
int DSDPStopReason (DSDP dsdp, DSDPTerminationReason *reason)
 Copy the reason why the solver terminated. More...
 

Detailed Description

The subroutines listed below define convergence and termination criteria for the solver and problems in DSDP Standard Form.

#include dsdp5.h
Return values
0if successful

Function Documentation

◆ DSDPDefaultConvergence()

int DSDPDefaultConvergence ( DSDP  dsdp,
void *  ctx 
)

Check for Convergence.

Parameters
dsdpis the solver
ctxis a pointer to a structure containing convergence parameters
See also
DSDPSetGapTolerance()
DSDPSetStepTolerance()
Note
DSDP calls this routine before each iteration.

Definition at line 26 of file dsdpconverge.c.

◆ DSDPGetDualBound()

int DSDPGetDualBound ( DSDP  dsdp,
double *  dbound 
)

Get the termination parameter.

Parameters
dsdpis the solver
*dboundis a bound on (DD)
See also
DSDPSetDualBound()
DSDPGetDDObjective()

Definition at line 227 of file dsdpconverge.c.

Referenced by DSDPView().

◆ DSDPGetGapHistory()

int DSDPGetGapHistory ( DSDP  dsdp,
double  hist[],
int  length 
)

Copy a history of the duality gap into an array.

Parameters
dsdpis the solver
histis an array
lengthis the length of the array
See also
DSDPGetDualityGap()
DSDPGetRHistory()

Definition at line 321 of file dsdpconverge.c.

◆ DSDPGetGapTolerance()

int DSDPGetGapTolerance ( DSDP  dsdp,
double *  gaptol 
)

Get the termination tolerance.

Parameters
dsdpis the solver
*gaptolwill be set to the termination tolerance
See also
DSDPGetDualityGap()
DSDPSetGapTolerance()

Definition at line 132 of file dsdpconverge.c.

Referenced by DSDPView().

◆ DSDPGetIts()

int DSDPGetIts ( DSDP  dsdp,
int *  its 
)

Copy the current iteration number.

Parameters
dsdpis the solver
*itswill be set to the current iteration number.
See also
DSDPSetMaxIts()

Definition at line 564 of file dsdpsetdata.c.

Referenced by DSDPDefaultConvergence().

◆ DSDPGetMaxIts()

int DSDPGetMaxIts ( DSDP  dsdp,
int *  maxits 
)

Copy the maximum number of iterations from the solver.

Parameters
dsdpis the solver
*maxitswill be the maximum number of iterations in DSDP
See also
DSDPSetMaxIts()
DSDPGetIts()

Definition at line 225 of file dsdpsetdata.c.

Referenced by DSDPView().

◆ DSDPGetPInfeasibility()

int DSDPGetPInfeasibility ( DSDP  dsdp,
double *  pperror 
)

Copy the infeasibility in (P).

This infeasibility is the maximum difference between the values xl and xu correponding to the bounds on the variables y. Due to roundoff error, this number is usually much less than the true infeasiblity in (P). The true infeasibility is not available at each iteration due to its high computational cost.

Parameters
dsdpis the solver
*pperrorwill be set to the infeasibility in (P)
See also
DSDPSetYBounds()
DSDPSetPTolerance()

Definition at line 343 of file dsdpx.c.

◆ DSDPGetPNormTolerance()

int DSDPGetPNormTolerance ( DSDP  dsdp,
double *  ptol 
)

Get the termination tolerance.

Parameters
dsdpis the solver
*ptolwill be set to the termination tolerance
See also
DSDPGetPnorm()
DSDPSetPNormTolerance()

Definition at line 180 of file dsdpconverge.c.

Referenced by DSDPView().

◆ DSDPGetPTolerance()

int DSDPGetPTolerance ( DSDP  dsdp,
double *  inftol 
)

Copy the feasibility tolerance.

Parameters
dsdpis the solver
*inftolwill be set to the infeasibility in (P)
See also
DSDPSetYBounds()
DSDPGetPInfeasibility()
DSDPSetPTolerance()

Definition at line 386 of file dsdpx.c.

Referenced by DSDPView().

◆ DSDPGetRHistory()

int DSDPGetRHistory ( DSDP  dsdp,
double  hist[],
int  length 
)

Copy a history of the infeasibility in (D) into an array.

Elememt i of the array will be set the the infeasibility in (D) at iteration i (unless i exceeds the length of the array)

Parameters
dsdpis the solver
histis an array
lengthis the length of the array
See also
DSDPGetR()
DSDPGetGapHistory()

Definition at line 298 of file dsdpconverge.c.

◆ DSDPGetRTolerance()

int DSDPGetRTolerance ( DSDP  dsdp,
double *  inftol 
)

Copy the maximum infeasibility allowed (D).

DSDP will classify the solution to (D) as feasible only if the variable r in (DD) is less than this tolerance. Small values for r are enforced through a penalty parameter.

Parameters
dsdpis the solver
*inftolwill be set to the tolerance for r in (DD)
See also
DSDPSetPenaltyParameter()
DSDPGetR()
DSDPSetRTolerance()

Definition at line 434 of file dsdpx.c.

Referenced by DSDPDefaultConvergence(), and DSDPView().

◆ DSDPGetStepTolerance()

int DSDPGetStepTolerance ( DSDP  dsdp,
double *  steptol 
)

Get the current tolerance.

Parameters
dsdpis the solver
*steptolwill be set to the current tolerance
See also
DSDPSetStepTolerance()
DSDPGetStepLengths()

Definition at line 273 of file dsdpconverge.c.

Referenced by DSDPView().

◆ DSDPSetConvergenceFlag()

int DSDPSetConvergenceFlag ( DSDP  dsdp,
DSDPTerminationReason  reason 
)

Monitor each iteration of the solver.

Parameters
dsdpis the solver
reasonis the termination reason
See also
DSDPStopReason()

Definition at line 968 of file dsdpsetdata.c.

Referenced by DSDPComputeDualStepDirections(), and DSDPDefaultConvergence().

◆ DSDPSetDualBound()

int DSDPSetDualBound ( DSDP  dsdp,
double  dbound 
)

Terminate the solver if the objective value in (DD) is greater than this tolerance.

This parameter is helpful in branch and bound applictions.

Parameters
dsdpis the solver
dboundis the bound
See also
DSDPGetDualBound()
DSDPGetDDObjective()
DSDP_UPPERBOUND

Definition at line 205 of file dsdpconverge.c.

Referenced by DSDPSetOptions().

◆ DSDPSetGapTolerance()

int DSDPSetGapTolerance ( DSDP  dsdp,
double  gaptol 
)

Terminate the solver when the relative duality gap is less than this tolerance.

If pp is the objective value of (PP) and dd is the objective value of (DD), the relative duality gap is defined to be (pp-dd)/(1 + fabs(pp)/2 + fabs(dd)/2);

Parameters
dsdpis the solver
gaptolis the tolerance
See also
DSDPGetDualityGap()
DSDPGetGapTolerance()
DSDP_CONVERGED

Definition at line 110 of file dsdpconverge.c.

Referenced by DSDPSetDefaultParameters(), and DSDPSetOptions().

◆ DSDPSetMaxIts()

int DSDPSetMaxIts ( DSDP  dsdp,
int  maxits 
)

Terminate the solver after this number of iterations.

Parameters
dsdpis the solver
maxitsis the maximum number of DSDP iterations (>0)
See also
DSDPGetMaxIts()
DSDPGetIts()
DSDPSetGapTolerance()

Definition at line 206 of file dsdpsetdata.c.

Referenced by DSDPSetDefaultParameters(), and DSDPSetOptions().

◆ DSDPSetPNormTolerance()

int DSDPSetPNormTolerance ( DSDP  dsdp,
double  ptol 
)

Terminate the solver when the relative duality gap is suffiently small and the PNorm is less than this quantity. Smaller values imply the final solution will be nearer to the central path.

Parameters
dsdpis the solver
ptolis the tolerance, (>0, default is very big)
See also
DSDPGetPnorm()
DSDPGetPNormTolerance()
DSDPSetGapTolerance()
DSDP_CONVERGED

Definition at line 158 of file dsdpconverge.c.

Referenced by DSDPSetDefaultParameters(), and DSDPSetOptions().

◆ DSDPSetPTolerance()

int DSDPSetPTolerance ( DSDP  dsdp,
double  inftol 
)

Classify (P) as feasible only if the infeasibility is less than this tolerance.

Parameters
dsdpis the solver
inftolwill be set to the infeasibility in (P) (>0)
See also
DSDPSetYBounds()
DSDPGetPInfeasibility()
DSDPGetPTolerance()
DSDPGetRTolerance()
DSDPSolutionType

Definition at line 365 of file dsdpx.c.

Referenced by DSDPSetOptions().

◆ DSDPSetRTolerance()

int DSDPSetRTolerance ( DSDP  dsdp,
double  inftol 
)

Classify (D) as feasible only if the variable r is less than this tolerance.

Parameters
dsdpis the solver
inftolis the tolerance (>0)
See also
DSDPSetPenaltyParameter()
DSDPGetR()
DSDPGetRTolerance()
DSDPSolutionType

Definition at line 409 of file dsdpx.c.

Referenced by DSDPSetOptions().

◆ DSDPSetStepTolerance()

int DSDPSetStepTolerance ( DSDP  dsdp,
double  steptol 
)

Terminate the solver if the step length in (DD) is below this tolerance.

This heuristic will only be applied when the objective values in (PP) and (DD) match to three significant digits.

Parameters
dsdpis the solver
steptolis the tolerance
See also
DSDPGetStepTolerance()
DSDPGetStepLengths()
DSDP_SMALL_STEPS

Definition at line 252 of file dsdpconverge.c.

Referenced by DSDPSetOptions().

◆ DSDPStopReason()

int DSDPStopReason ( DSDP  dsdp,
DSDPTerminationReason reason 
)

Copy the reason why the solver terminated.

Parameters
dsdpis the solver
*reasonwill be set to the proper enumerated type.
See also
DSDPSetMaxIts()
DSDPSetGapTolerance()

Definition at line 582 of file dsdpsetdata.c.

Referenced by DSDPComputeX(), and DSDPDefaultConvergence().