CppAD: A C++ Algorithmic Differentiation Package  20130918
solve_result.hpp
Go to the documentation of this file.
00001 /* $Id$ */
00002 # ifndef CPPAD_SOLVE_RESULT_INCLUDED
00003 # define CPPAD_SOLVE_RESULT_INCLUDED
00004 /* --------------------------------------------------------------------------
00005 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-14 Bradley M. Bell
00006 
00007 CppAD is distributed under multiple licenses. This distribution is under
00008 the terms of the 
00009                     Eclipse Public License Version 1.0.
00010 
00011 A copy of this license is included in the COPYING file of this distribution.
00012 Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
00013 -------------------------------------------------------------------------- */
00014 
00015 namespace CppAD { // BEGIN_CPPAD_NAMESPACE
00016 namespace ipopt {
00017 /*!
00018 \file solve_result.hpp
00019 Class that contains information about solve problem result
00020 */
00021 
00022 /*!
00023 Class that contains information about solve problem result
00024 
00025 \tparam Dvector
00026 a simple vector with elements of type double
00027 */
00028 template <class Dvector>
00029 class solve_result 
00030 {    
00031 public:
00032      /// possible values for the result status
00033      enum status_type {
00034           not_defined,
00035           success,
00036           maxiter_exceeded,
00037           stop_at_tiny_step,
00038           stop_at_acceptable_point,
00039           local_infeasibility,
00040           user_requested_stop,
00041           feasible_point_found,
00042           diverging_iterates,
00043           restoration_failure,
00044           error_in_step_computation,
00045           invalid_number_detected,
00046           too_few_degrees_of_freedom,
00047           internal_error,
00048           unknown
00049      };
00050 
00051      /// possible values for solution status
00052      status_type status;
00053      /// the approximation solution
00054      Dvector x;
00055      /// Lagrange multipliers corresponding to lower bounds on x
00056      Dvector zl;
00057      /// Lagrange multipliers corresponding to upper bounds on x
00058      Dvector zu;
00059      /// value of g(x)
00060      Dvector g;
00061      /// Lagrange multipliers correspondiing constraints on g(x)
00062      Dvector lambda;
00063      /// value of f(x)
00064      double obj_value;
00065      /// constructor initializes solution status as not yet defined
00066      solve_result(void)
00067      {    status = not_defined; }
00068 };
00069 
00070 } // end namespace ipopt
00071 } // END_CPPAD_NAMESPACE
00072 
00073 # endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines