diff -r a3402913cffe -r f63e87b9748e lemon/lp_base.h --- a/lemon/lp_base.h Sat Apr 18 21:54:30 2009 +0200 +++ b/lemon/lp_base.h Tue Apr 21 10:34:49 2009 +0100 @@ -52,12 +52,12 @@ ///Possible outcomes of an LP solving procedure enum SolveExitStatus { - ///This means that the problem has been successfully solved: either + /// = 0. It means that the problem has been successfully solved: either ///an optimal solution has been found or infeasibility/unboundedness ///has been proved. SOLVED = 0, - ///Any other case (including the case when some user specified - ///limit has been exceeded) + /// = 1. Any other case (including the case when some user specified + ///limit has been exceeded). UNSOLVED = 1 }; @@ -69,6 +69,21 @@ MAX }; + ///Enum for \c messageLevel() parameter + enum MessageLevel { + /// No output (default value). + MESSAGE_NOTHING, + /// Error messages only. + MESSAGE_ERROR, + /// Warnings. + MESSAGE_WARNING, + /// Normal output. + MESSAGE_NORMAL, + /// Verbose output. + MESSAGE_VERBOSE + }; + + ///The floating point type used by the solver typedef double Value; ///The infinity constant @@ -973,6 +988,8 @@ virtual const char* _solverName() const = 0; + virtual void _messageLevel(MessageLevel level) = 0; + //Own protected stuff //Constant component of the objective function @@ -988,7 +1005,7 @@ ///Gives back the name of the solver. const char* solverName() const {return _solverName();} - ///\name Build up and modify the LP + ///\name Build Up and Modify the LP ///@{ @@ -1527,6 +1544,9 @@ ///Clears the problem void clear() { _clear(); } + /// Sets the message level of the solver + void messageLevel(MessageLevel level) { _messageLevel(level); } + ///@} }; @@ -1768,15 +1788,15 @@ /// The problem types for primal and dual problems enum ProblemType { - ///Feasible solution hasn't been found (but may exist). + /// = 0. Feasible solution hasn't been found (but may exist). UNDEFINED = 0, - ///The problem has no feasible solution + /// = 1. The problem has no feasible solution. INFEASIBLE = 1, - ///Feasible solution found + /// = 2. Feasible solution found. FEASIBLE = 2, - ///Optimal solution exists and found + /// = 3. Optimal solution exists and found. OPTIMAL = 3, - ///The cost function is unbounded + /// = 4. The cost function is unbounded. UNBOUNDED = 4 }; @@ -1832,7 +1852,7 @@ ///@} - ///\name Obtain the solution + ///\name Obtain the Solution ///@{ @@ -1954,17 +1974,16 @@ /// The problem types for MIP problems enum ProblemType { - ///Feasible solution hasn't been found (but may exist). + /// = 0. Feasible solution hasn't been found (but may exist). UNDEFINED = 0, - ///The problem has no feasible solution + /// = 1. The problem has no feasible solution. INFEASIBLE = 1, - ///Feasible solution found + /// = 2. Feasible solution found. FEASIBLE = 2, - ///Optimal solution exists and found + /// = 3. Optimal solution exists and found. OPTIMAL = 3, - ///The cost function is unbounded - /// - ///The Mip or at least the relaxed problem is unbounded + /// = 4. The cost function is unbounded. + ///The Mip or at least the relaxed problem is unbounded. UNBOUNDED = 4 }; @@ -1986,14 +2005,14 @@ ///@} - ///\name Setting column type + ///\name Set Column Type ///@{ ///Possible variable (column) types (e.g. real, integer, binary etc.) enum ColTypes { - ///Continuous variable (default) + /// = 0. Continuous variable (default). REAL = 0, - ///Integer variable + /// = 1. Integer variable. INTEGER = 1 }; @@ -2014,7 +2033,7 @@ } ///@} - ///\name Obtain the solution + ///\name Obtain the Solution ///@{