Reaktoro
A unified framework for modeling chemically reactive systems
OptimumProblem.hpp
1 // Reaktoro is a unified framework for modeling chemically reactive systems.
2 //
3 // Copyright (C) 2014-2018 Allan Leal
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library. If not, see <http://www.gnu.org/licenses/>.
17 
18 #pragma once
19 
20 // C++ includes
21 #include <functional>
22 
23 // Reaktoro includes
24 #include <Reaktoro/Math/Matrix.hpp>
25 #include <Reaktoro/Optimization/Hessian.hpp>
26 
27 namespace Reaktoro {
28 
31 {
33  double val = 0.0;
34 
36  Vector grad;
37 
40 };
41 
46 
49 {
52 
55 
57  Vector c;
58 
61 
63  Vector b;
64 
67 
69  Vector bi;
70 
72  Vector l;
73 
75  Vector u;
76 };
77 
79 auto isfinite(const ObjectiveResult& f) -> bool;
80 
81 } // namespace Reaktoro
Vector bi
The right-hand side vector of the linear equality constraint Ai*x = bi.
Definition: OptimumProblem.hpp:69
A type that describes the result of the evaluation of an objective function.
Definition: OptimumProblem.hpp:31
Matrix A
The coefficient matrix of the linear equality constraint A*x = b.
Definition: OptimumProblem.hpp:60
Vector grad
The gradient of the objective function evaluated at x.
Definition: OptimumProblem.hpp:36
A type that describes the non-linear constrained optimisation problem.
Definition: OptimumProblem.hpp:49
ObjectiveFunction objective
The objective function.
Definition: OptimumProblem.hpp:51
std::function< ObjectiveResult(VectorConstRef x)> ObjectiveFunction
A type that describes the functional signature of an objective function.
Definition: OptimumProblem.hpp:45
Vector b
The right-hand side vector of the linear equality constraint A*x = b.
Definition: OptimumProblem.hpp:63
Index n
The number of primal variables x
Definition: OptimumProblem.hpp:54
Matrix Ai
The coefficient matrix of the linear inequality constraint Ai*x = bi.
Definition: OptimumProblem.hpp:66
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
Vector l
The lower bound of the primal variables x.
Definition: OptimumProblem.hpp:72
double val
The value of the objective function evaluated at x.
Definition: OptimumProblem.hpp:33
std::size_t Index
Define a type that represents an index.
Definition: Index.hpp:26
Vector c
The coefficient vector of a linear programming problem min tr(c)*x subject to A*x = b.
Definition: OptimumProblem.hpp:57
Eigen::MatrixXd Matrix
Alias to Eigen type MatrixXd.
Definition: Matrix.hpp:42
Hessian hessian
The Hessian of the objective function evaluated at x.
Definition: OptimumProblem.hpp:39
auto isfinite(const ObjectiveResult &f) -> bool
Returns true if the evaluation of a objective function has finite value and gradient.
Definition: OptimumProblem.cpp:22
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
Vector u
The upper bound of the primal variables x.
Definition: OptimumProblem.hpp:75
A type to describe the Hessian of an objective function.
Definition: Hessian.hpp:27