source: trunk/include/ClpSolve.hpp @ 461

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

Trying to make faster

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 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      5 - for presolve
88                   1 - switch off dual stuff
89      6 - for detailed printout (initially just presolve)
90                   1 - presolve statistics
91  */
92  void setSpecialOption(int which,int value,int extraInfo=-1);
93  int getSpecialOption(int which) const;
94
95  /// Solve types
96  void setSolveType(SolveType method, int extraInfo=-1);
97  SolveType getSolveType();
98
99  // Presolve types
100  void setPresolveType(PresolveType amount, int extraInfo=-1);
101  PresolveType getPresolveType();
102  int getPresolvePasses() const;
103  /// Extra info for idiot (or sprint)
104  int getExtraInfo(int which) const;
105  //@}
106
107////////////////// data //////////////////
108private:
109
110  /**@name data.
111  */
112  //@{
113  /// Solve type
114  SolveType method_;
115  /// Presolve type
116  PresolveType presolveType_;
117  /// Amount of presolve
118  int numberPasses_;
119  /// Options
120  int options_[6];
121  /// Extra information
122  int extraInfo_[6];
123  //@}
124};
125#endif
Note: See TracBrowser for help on using the repository browser.