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-2015 Allan Leal
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program 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
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. 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 
37 
40 };
41 
45 using ObjectiveFunction = std::function<ObjectiveResult(const Vector& x)>;
46 
49 {
52 
55 
58 
61 
64 
67 
70 
73 
76 };
77 
79 auto isfinite(const ObjectiveResult& f) -> bool;
80 
81 } // namespace Reaktoro
Eigen::MatrixXd Matrix
Define an alias to the matrix type of the Eigen library.
Definition: Matrix.hpp:387
A type that describes the non-linear constrained optimisation problem.
Definition: OptimumProblem.hpp:48
auto isfinite(const ObjectiveResult &f) -> bool
Returns true if the evaluation of a objective function has finite value and gradient.
Definition: OptimumProblem.cpp:22
Matrix Ai
The coefficient matrix of the linear inequality constraint Ai*x = bi.
Definition: OptimumProblem.hpp:66
A type that describes the result of the evaluation of an objective function.
Definition: OptimumProblem.hpp:30
Vector l
The lower bound of the primal variables x.
Definition: OptimumProblem.hpp:72
Index n
The number of primal variables x
Definition: OptimumProblem.hpp:54
Hessian hessian
The Hessian of the objective function evaluated at x.
Definition: OptimumProblem.hpp:39
ObjectiveFunction objective
The objective function.
Definition: OptimumProblem.hpp:51
Vector grad
The gradient of the objective function evaluated at x.
Definition: OptimumProblem.hpp:36
Matrix A
The coefficient matrix of the linear equality constraint A*x = b.
Definition: OptimumProblem.hpp:60
Eigen::VectorXd Vector
Define an alias to the vector type of the Eigen library.
Definition: Matrix.hpp:384
Vector b
The right-hand side vector of the linear equality constraint A*x = b.
Definition: OptimumProblem.hpp:63
Vector bi
The right-hand side vector of the linear equality constraint Ai*x = bi.
Definition: OptimumProblem.hpp:69
Vector c
The coefficient vector of a linear programming problem min tr(c)*x subject to A*x = b...
Definition: OptimumProblem.hpp:57
std::function< ObjectiveResult(const Vector &x)> ObjectiveFunction
A type that describes the functional signature of an objective function.
Definition: OptimumProblem.hpp:45
std::size_t Index
Define a type that represents an index.
Definition: Index.hpp:26
A type to describe the Hessian of an objective function.
Definition: Hessian.hpp:26
double val
The value of the objective function evaluated at x.
Definition: OptimumProblem.hpp:33
Vector u
The upper bound of the primal variables x.
Definition: OptimumProblem.hpp:75
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24