source: trunk/include/ClpSolve.hpp @ 414

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

barrier stuff

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 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 ClpSolve_H
11#define ClpSolve_H
12
13/**
14    This is a very simple class to guide algorithms.  It is used to tidy up
15    passing parameters to initialSolve and maybe for output from that
16
17*/
18
19class ClpSolve  {
20
21public:
22
23  /** enums for solve function */
24  enum SolveType {
25    useDual=0,
26    usePrimal,
27    usePrimalorSprint,
28    useBarrier,
29    useBarrierNoCross,
30    automatic
31  };
32  enum PresolveType {
33    presolveOn=0,
34    presolveOff,
35    presolveNumber
36  };
37
38  /**@name Constructors and destructor and copy */
39  //@{
40  /// Default constructor
41    ClpSolve (  );
42
43  /// Copy constructor.
44  ClpSolve(const ClpSolve &);
45  /// Assignment operator. This copies the data
46    ClpSolve & operator=(const ClpSolve & rhs);
47  /// Destructor
48   ~ClpSolve (  );
49  //@}
50
51  /**@name Functions most useful to user */
52  //@{
53  /** Special options - bits
540      4 - use crash (default allslack in dual, idiot in primal)
55      8 - all slack basis in primal
562      16 - switch off interrupt handling
573      32 - do not try and make plus minus one matrix
58      64 - do not use sprint even if problem looks good
59   */
60  /** which translation is:
61      which:
62      0 - startup in Dual  (nothing if basis exists).:
63                   0 - no basis
64                   1 - crash
65                   2 - use initiative about idiot! but no crash
66      1 - startup in Primal (nothing if basis exists):
67                   0 - use initiative
68                   1 - use crash
69                   2 - use idiot and look at further info
70                   3 - use sprint and look at further info
71                   4 - use all slack
72                   5 - use initiative but no idiot
73                   6 - use initiative but no sprint
74                   7 - use initiative but no crash
75                   8 - do allslack or idiot
76                   9 - do allslack or sprint
77                   10 - slp before
78      2 - interrupt handling - 0 yes, 1 no (for threadsafe)
79      3 - whether to make +- 1matrix - 0 yes, 1 no
80      4 - for barrier
81                   0 - dense cholesky
82                   1 - Wssmp allowing some long columns
83                   2 - Wssmp not allowing long columns
84                   3 - Wssmp using KKT
85                   4 - bit set to do scaling
86                   8 - set to be aggressive with gamma/delta?
87  */
88  void setSpecialOption(int which,int value,int extraInfo=-1);
89  int getSpecialOption(int which) const;
90
91  /// Solve types
92  void setSolveType(SolveType method, int extraInfo=-1);
93  SolveType getSolveType();
94
95  // Presolve types
96  void setPresolveType(PresolveType amount, int extraInfo=-1);
97  PresolveType getPresolveType();
98  int getPresolvePasses() const;
99  /// Extra info for idiot (or sprint)
100  int getExtraInfo(int which) const;
101  //@}
102
103////////////////// data //////////////////
104private:
105
106  /**@name data.
107  */
108  //@{
109  /// Solve type
110  SolveType method_;
111  /// Presolve type
112  PresolveType presolveType_;
113  /// Amount of presolve
114  int numberPasses_;
115  /// Options
116  int options_[4];
117  /// Extra information
118  int extraInfo_[4];
119  //@}
120};
121#endif
Note: See TracBrowser for help on using the repository browser.