lemon/lp_base.h
changeset 599 f63e87b9748e
parent 576 745e182d0139
child 746 e4554cd6b2bf
child 957 2eebc8f7dca5
     1.1 --- a/lemon/lp_base.h	Sat Apr 18 21:54:30 2009 +0200
     1.2 +++ b/lemon/lp_base.h	Tue Apr 21 10:34:49 2009 +0100
     1.3 @@ -52,12 +52,12 @@
     1.4  
     1.5      ///Possible outcomes of an LP solving procedure
     1.6      enum SolveExitStatus {
     1.7 -      ///This means that the problem has been successfully solved: either
     1.8 +      /// = 0. It means that the problem has been successfully solved: either
     1.9        ///an optimal solution has been found or infeasibility/unboundedness
    1.10        ///has been proved.
    1.11        SOLVED = 0,
    1.12 -      ///Any other case (including the case when some user specified
    1.13 -      ///limit has been exceeded)
    1.14 +      /// = 1. Any other case (including the case when some user specified
    1.15 +      ///limit has been exceeded).
    1.16        UNSOLVED = 1
    1.17      };
    1.18  
    1.19 @@ -69,6 +69,21 @@
    1.20        MAX
    1.21      };
    1.22  
    1.23 +    ///Enum for \c messageLevel() parameter
    1.24 +    enum MessageLevel {
    1.25 +      /// No output (default value).
    1.26 +      MESSAGE_NOTHING,
    1.27 +      /// Error messages only.
    1.28 +      MESSAGE_ERROR,
    1.29 +      /// Warnings.
    1.30 +      MESSAGE_WARNING,
    1.31 +      /// Normal output.
    1.32 +      MESSAGE_NORMAL,
    1.33 +      /// Verbose output.
    1.34 +      MESSAGE_VERBOSE
    1.35 +    };
    1.36 +    
    1.37 +
    1.38      ///The floating point type used by the solver
    1.39      typedef double Value;
    1.40      ///The infinity constant
    1.41 @@ -973,6 +988,8 @@
    1.42  
    1.43      virtual const char* _solverName() const = 0;
    1.44  
    1.45 +    virtual void _messageLevel(MessageLevel level) = 0;
    1.46 +
    1.47      //Own protected stuff
    1.48  
    1.49      //Constant component of the objective function
    1.50 @@ -988,7 +1005,7 @@
    1.51      ///Gives back the name of the solver.
    1.52      const char* solverName() const {return _solverName();}
    1.53  
    1.54 -    ///\name Build up and modify the LP
    1.55 +    ///\name Build Up and Modify the LP
    1.56  
    1.57      ///@{
    1.58  
    1.59 @@ -1527,6 +1544,9 @@
    1.60      ///Clears the problem
    1.61      void clear() { _clear(); }
    1.62  
    1.63 +    /// Sets the message level of the solver
    1.64 +    void messageLevel(MessageLevel level) { _messageLevel(level); }
    1.65 +
    1.66      ///@}
    1.67  
    1.68    };
    1.69 @@ -1768,15 +1788,15 @@
    1.70  
    1.71      /// The problem types for primal and dual problems
    1.72      enum ProblemType {
    1.73 -      ///Feasible solution hasn't been found (but may exist).
    1.74 +      /// = 0. Feasible solution hasn't been found (but may exist).
    1.75        UNDEFINED = 0,
    1.76 -      ///The problem has no feasible solution
    1.77 +      /// = 1. The problem has no feasible solution.
    1.78        INFEASIBLE = 1,
    1.79 -      ///Feasible solution found
    1.80 +      /// = 2. Feasible solution found.
    1.81        FEASIBLE = 2,
    1.82 -      ///Optimal solution exists and found
    1.83 +      /// = 3. Optimal solution exists and found.
    1.84        OPTIMAL = 3,
    1.85 -      ///The cost function is unbounded
    1.86 +      /// = 4. The cost function is unbounded.
    1.87        UNBOUNDED = 4
    1.88      };
    1.89  
    1.90 @@ -1832,7 +1852,7 @@
    1.91  
    1.92      ///@}
    1.93  
    1.94 -    ///\name Obtain the solution
    1.95 +    ///\name Obtain the Solution
    1.96  
    1.97      ///@{
    1.98  
    1.99 @@ -1954,17 +1974,16 @@
   1.100  
   1.101      /// The problem types for MIP problems
   1.102      enum ProblemType {
   1.103 -      ///Feasible solution hasn't been found (but may exist).
   1.104 +      /// = 0. Feasible solution hasn't been found (but may exist).
   1.105        UNDEFINED = 0,
   1.106 -      ///The problem has no feasible solution
   1.107 +      /// = 1. The problem has no feasible solution.
   1.108        INFEASIBLE = 1,
   1.109 -      ///Feasible solution found
   1.110 +      /// = 2. Feasible solution found.
   1.111        FEASIBLE = 2,
   1.112 -      ///Optimal solution exists and found
   1.113 +      /// = 3. Optimal solution exists and found.
   1.114        OPTIMAL = 3,
   1.115 -      ///The cost function is unbounded
   1.116 -      ///
   1.117 -      ///The Mip or at least the relaxed problem is unbounded
   1.118 +      /// = 4. The cost function is unbounded.
   1.119 +      ///The Mip or at least the relaxed problem is unbounded.
   1.120        UNBOUNDED = 4
   1.121      };
   1.122  
   1.123 @@ -1986,14 +2005,14 @@
   1.124  
   1.125      ///@}
   1.126  
   1.127 -    ///\name Setting column type
   1.128 +    ///\name Set Column Type
   1.129      ///@{
   1.130  
   1.131      ///Possible variable (column) types (e.g. real, integer, binary etc.)
   1.132      enum ColTypes {
   1.133 -      ///Continuous variable (default)
   1.134 +      /// = 0. Continuous variable (default).
   1.135        REAL = 0,
   1.136 -      ///Integer variable
   1.137 +      /// = 1. Integer variable.
   1.138        INTEGER = 1
   1.139      };
   1.140  
   1.141 @@ -2014,7 +2033,7 @@
   1.142      }
   1.143      ///@}
   1.144  
   1.145 -    ///\name Obtain the solution
   1.146 +    ///\name Obtain the Solution
   1.147  
   1.148      ///@{
   1.149