source: trunk/include/ClpPredictorCorrector.hpp @ 414

Last change on this file since 414 was 414, checked in by forrest, 15 years ago

barrier stuff

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.7 KB
Line 
1// Copyright (C) 2003, International Business Machines
2// Corporation and others.  All Rights Reserved.
3
4/*
5   Authors
6   
7   John Forrest
8
9 */
10#ifndef ClpPredictorCorrector_H
11#define ClpPredictorCorrector_H
12
13#include "ClpInterior.hpp"
14
15/** This solves LPs using the predictor-corrector method due to Mehrotra.
16    It also uses multiple centrality corrections as in Gondzio.
17
18    See;
19    S. Mehrotra, "On the implementation of a primal-dual interior point method",
20    SIAM Journal on optimization, 2 (1992)
21    J. Gondzio, "Multiple centraility corrections in a primal-dual method for linear programming",
22    Computational Optimization and Applications",6 (1996)
23
24
25    It is rather basic as Interior point is not my speciality
26
27    It inherits from ClpInterior.  It has no data of its own and
28    is never created - only cast from a ClpInterior object at algorithm time.
29
30    It can also solve QPs
31
32   
33
34*/
35
36class ClpPredictorCorrector : public ClpInterior {
37
38public:
39
40  /**@name Description of algorithm */
41  //@{
42  /** Primal Dual Predictor Corrector algorithm
43
44      Method
45
46      Big TODO
47  */
48
49  int solve();
50  //@}
51
52  /**@name Functions used in algorithm */
53  //@{
54  /// findStepLength.
55  //phase  - 0 predictor
56  //         1 corrector
57  //         2 primal dual
58  double findStepLength( int phase);
59  /// findDirectionVector.
60  double findDirectionVector(const int phase);
61  /// createSolution.  Creates solution from scratch (- code if no memory)
62  int createSolution();
63  /// complementarityGap.  Computes gap
64  //phase 0=as is , 1 = after predictor , 2 after corrector
65  double complementarityGap(int & numberComplementarityPairs,int & numberComplementarityItems,
66                            const int phase);
67  /// setupForSolve.
68  //phase 0=affine , 1 = corrector , 2 = primal-dual
69  void setupForSolve(const int phase);
70  /** Does solve. region1 is for deltaX (columns+rows), region2 for deltaPi (rows) */
71  void solveSystem(double * region1, double * region2,
72                   const double * region1In, const double * region2In,
73                   const double * saveRegion1, const double * saveRegion2,
74                   bool gentleRefine);
75  /// sees if looks plausible change in complementarity
76  bool checkGoodMove(const bool doCorrector,double & bestNextGap,
77                     bool allowIncreasingGap);
78  ///:  checks for one step size
79  bool checkGoodMove2(double move,double & bestNextGap,
80                      bool allowIncreasingGap);
81  /// updateSolution.  Updates solution at end of iteration
82  //returns number fixed
83  int updateSolution(double nextGap);
84  ///  Save info on products of affine deltaT*deltaW and deltaS*deltaZ
85  double affineProduct();
86  ///See exactly what would happen given current deltas
87  void debugMove(int phase,double primalStep, double dualStep);
88  //@}
89
90};
91#endif
Note: See TracBrowser for help on using the repository browser.