MAiNGO
ubpIpopt.h
Go to the documentation of this file.
1 /**********************************************************************************
2  * Copyright (c) 2019 Process Systems Engineering (AVT.SVT), RWTH Aachen University
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0.
7  *
8  * SPDX-License-Identifier: EPL-2.0
9  *
10  **********************************************************************************/
11 
12 #pragma once
13 
14 #include "ipoptProblem.h"
15 #include "ubp.h"
16 
17 #include "IpIpoptApplication.hpp"
18 
19 
20 namespace maingo {
21 
22 
23 namespace ubp {
24 
25 
35 
36  public:
52  UbpIpopt(mc::FFGraph &DAG, const std::vector<mc::FFVar> &DAGvars, const std::vector<mc::FFVar> &DAGfunctions, const std::vector<babBase::OptimizationVariable> &variables,
53  const unsigned nineqIn, const unsigned neqIn, const unsigned nineqSquashIn, std::shared_ptr<Settings> settingsIn, std::shared_ptr<Logger> loggerIn, std::shared_ptr<std::vector<Constraint>> constraintPropertiesIn, UBS_USE useIn);
54 
55 
56  private:
66  SUBSOLVER_RETCODE _solve_nlp(const std::vector<double> &lowerVarBounds, const std::vector<double> &upperVarBounds, double &objectiveValue, std::vector<double> &solutionPoint);
67 
68  Ipopt::SmartPtr<Ipopt::IpoptApplication> _Ipopt;
69  Ipopt::SmartPtr<IpoptProblem> _theIpoptProblem;
71  // Prevent use of default copy constructor and copy assignment operator by declaring them private:
72  UbpIpopt(const UbpIpopt &);
73  UbpIpopt &operator=(const UbpIpopt &);
74 };
75 
76 
77 } // end namespace ubp
78 
79 
80 } // end namespace maingo
Wrapper for handling the upper bounding problems by interfacing Ipopt.
Definition: ubpIpopt.h:34
SUBSOLVER_RETCODE _solve_nlp(const std::vector< double > &lowerVarBounds, const std::vector< double > &upperVarBounds, double &objectiveValue, std::vector< double > &solutionPoint)
Function for actually solving the NLP sub-problem.
Definition: ubpIpopt.cpp:104
UbpIpopt & operator=(const UbpIpopt &)
UbpIpopt(mc::FFGraph &DAG, const std::vector< mc::FFVar > &DAGvars, const std::vector< mc::FFVar > &DAGfunctions, const std::vector< babBase::OptimizationVariable > &variables, const unsigned nineqIn, const unsigned neqIn, const unsigned nineqSquashIn, std::shared_ptr< Settings > settingsIn, std::shared_ptr< Logger > loggerIn, std::shared_ptr< std::vector< Constraint >> constraintPropertiesIn, UBS_USE useIn)
Constructor, stores information on the problem and initializes the local-subsolvers used...
Definition: ubpIpopt.cpp:25
Base class for wrappers for handling the upper bounding problems.
Definition: ubp.h:44
SUBSOLVER_RETCODE
Enum for representing the return codes returned by the different sub-solvers (UpperBoundingSolver, LowerBoundingSolver).
Definition: returnCodes.h:36
Ipopt::SmartPtr< IpoptProblem > _theIpoptProblem
Definition: ubpIpopt.h:69
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
Ipopt::SmartPtr< Ipopt::IpoptApplication > _Ipopt
Definition: ubpIpopt.h:68
UBS_USE
Enum for communicating what the intended purpose of the solver is. This determines which settings are...
Definition: ubp.h:51