# source:trunk/include/ClpPredictorCorrector.hpp@389

Last change on this file since 389 was 389, checked in by forrest, 16 years ago

Barrier

• Property svn:eol-style set to `native`
• Property svn:keywords set to `Author Date Id Revision`
File size: 2.3 KB
Line
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.
16
17    It is rather basic as Interior point is not my speciality
18
19    It inherits from ClpInterior.  It has no data of its own and
20    is never created - only cast from a ClpInterior object at algorithm time.
21
22*/
23
24class ClpPredictorCorrector : public ClpInterior {
25
26public:
27
28  /**@name Description of algorithm */
29  //@{
30  /** Primal Dual Predictor Corrector algorithm
31
32      Method
33
34      Big TODO
35  */
36
37  int solve();
38  //@}
39
40  /**@name Functions used in algorithm */
41  //@{
42  /// findStepLength.
43  //phase  - 0 predictor
44  //         1 corrector
45  //         2 primal dual
46  double findStepLength( int phase);
47  /// findDirectionVector.
48  double findDirectionVector(const int phase);
49  /// createSolution.  Creates solution from scratch (- code if no memory)
50  int createSolution();
51  /// complementarityGap.  Computes gap
52  //phase 0=as is , 1 = after predictor , 2 after corrector
53  double complementarityGap(int & numberComplementarityPairs,int & numberComplementarityItems,
54                            const int phase);
55  /// setupForSolve.
56  //phase 0=affine , 1 = corrector , 2 = primal-dual
57  void setupForSolve(const int phase);
58  /** Does solve. region1 is for deltaX (columns+rows), region2 for deltaPi (rows) */
59  void solveSystem(double * region1, double * region2,
60                   const double * region1In, const double * region2In,
61                   const double * saveRegion1, const double * saveRegion2,
62                   bool gentleRefine);
63  /// sees if looks plausible change in complementarity
64  bool checkGoodMove(const bool doCorrector,double & bestNextGap,
65                     bool allowIncreasingGap);
66  ///:  checks for one step size
67  bool checkGoodMove2(const double move,double & bestNextGap,
68                      bool allowIncreasingGap);