# SensApplication.hpp

Go to the documentation of this file.

    00001 // Copyright 2009, 2011 Hans Pirnay
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // Date   : 2009-05-06
    00006
    00007 #ifndef __SENSAPPLICATION_HPP__
    00008 #define __SENSAPPLICATION_HPP__
    00009
    00010 #include "IpReferenced.hpp"
    00011 #include "SensUtils.hpp"
    00012 #include "SensUtils.hpp"
    00013 #include "IpRegOptions.hpp"
    00014
    00015 #include "IpIpoptApplication.hpp"
    00016 #include "IpPDSystemSolver.hpp"
    00017 namespace Ipopt
    00018 {
    00020   DECLARE_STD_EXCEPTION(SENS_SUFFIX_ERROR);
    00021
    00022   class SensApplication : public ReferencedObject
    00023   {
    00024   public:
    00025     // constructor
    00026     SensApplication(SmartPtr<Journalist> jnlst,
    00027                     SmartPtr<OptionsList> options,
    00028                     SmartPtr<RegisteredOptions> reg_options);
    00029
    00030     ~SensApplication();
    00031
    00032     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00033
    00034     SensAlgorithmExitStatus Run();
    00035
    00036     void Initialize();
    00037
    00038     void SetIpoptAlgorithmObjects(SmartPtr<IpoptApplication> app_ipopt,
    00039                                   ApplicationReturnStatus ipopt_retval);
    00040
    00041     SmartPtr<Journalist> Jnlst()
    00042     {
    00043       return jnlst_;
    00044     }
    00045
    00046
    00047     SmartPtr<OptionsList> Options()
    00048     {
    00049       return options_;
    00050     }
    00051
    00053     SmartPtr<const OptionsList> Options() const
    00054     {
    00055       return ConstPtr(options_);
    00056     }
    00057
    00058
    00059   private:
    00060
    00061     // standard constructor just so it can't be used
    00062     //    SensApplication();
    00063
    00064     // Pointers that are immediately passed from Ipopt and initialized by the constructor
    00065     SmartPtr<Journalist> jnlst_;
    00066     SmartPtr<OptionsList> options_;
    00067     SmartPtr<IpoptData> ip_data_;
    00068     SmartPtr<IpoptCalculatedQuantities> ip_cq_;
    00069     SmartPtr<PDSystemSolver> pd_solver_;
    00070     SmartPtr<IpoptNLP> ip_nlp_;
    00071     SmartPtr<RegisteredOptions> reg_options_;
    00072     ApplicationReturnStatus ipopt_retval_;
    00073
    00075     bool run_sens_;
    00076     bool compute_red_hessian_;
    00077     Index n_sens_steps_;
    00078   };
    00079 }
    00080
    00081 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines