MAiNGO
MAiNGOmodel.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 "evaluationContainer.h"
15 
16 #include "babOptVar.h"
17 #include "babUtils.h"
18 
19 #include "ffunc.hpp"
20 #include "functionWrapper.h"
21 
22 
23 #include <vector>
24 
25 
26 // Using declarations of all additional functions defined in MC++ for a comfortable use of these functions in the model
27 using mc::acquisition_function;
28 using mc::arh;
29 using mc::bounding_func;
30 using mc::cost_function;
31 using mc::covariance_function;
32 using mc::enthalpy_of_vaporization;
33 using mc::euclidean_norm_2d;
34 using mc::expx_times_y;
35 using mc::fabsx_times_x;
36 using mc::gaussian_probability_density_function;
37 using mc::iapws;
38 using mc::ideal_gas_enthalpy;
39 using mc::lb_func;
40 using mc::lmtd;
41 using mc::mc_print;
42 using mc::neg;
43 using mc::nrtl_dGtau;
44 using mc::nrtl_dtau;
45 using mc::nrtl_G;
46 using mc::nrtl_Gdtau;
47 using mc::nrtl_Gtau;
48 using mc::nrtl_tau;
49 using mc::p_sat_ethanol_schroeder;
50 using mc::pos;
51 using mc::regnormal;
52 using mc::rho_liq_sat_ethanol_schroeder;
53 using mc::rho_vap_sat_ethanol_schroeder;
54 using mc::rlmtd;
55 using mc::saturation_temperature;
56 using mc::sqr;
57 using mc::squash_node;
58 using mc::sum_div;
59 using mc::ub_func;
60 using mc::vapor_pressure;
61 using mc::xexpax;
62 using mc::xlog;
63 using mc::xlog_sum;
64 using std::max;
65 using std::min;
66 
67 
72 namespace maingo {
73 
87 class MAiNGOmodel {
88 
89  public:
90  using Var = mc::FFVar;
95  virtual ~MAiNGOmodel() {}
96 
102  virtual EvaluationContainer evaluate(const std::vector<Var> &optVars) = 0;
103 
107  virtual std::vector<OptimizationVariable> get_variables() = 0;
108 
112  virtual std::vector<double> get_initial_point() { return std::vector<double>(); }
113 
114  private:
115 };
116 
117 
118 } // namespace maingo
Definition: babOptVar.h:46
virtual EvaluationContainer evaluate(const std::vector< Var > &optVars)=0
Virtual function which has to be implemented by the user in order to enable evaluation of the model...
Auxiliary struct for representing bounds on an optimization variable.
Definition: babBounds.h:32
Definition: babOptVar.h:44
Class for representing an optimization variable specified by the user.
Definition: babOptVar.h:60
constexpr VT VT_INTEGER
Definition: MAiNGOmodel.h:79
Struct for storing the values returned by model evaluation at the given point "var".
Definition: evaluationContainer.h:208
This class is the base class for models to be solved by MAiNGO.
Definition: MAiNGOmodel.h:87
constexpr VT VT_CONTINUOUS
Definition: MAiNGOmodel.h:77
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
mc::FFVar Var
Definition: MAiNGOmodel.h:90
virtual std::vector< OptimizationVariable > get_variables()=0
Virtual function which has to be implemented by the user in order to enable getting data on optimizat...
virtual std::vector< double > get_initial_point()
Virtual function which has to be implemented by the user in order to enable getting data on the initi...
Definition: MAiNGOmodel.h:112
mc::FFVar nrtl_tau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:200
mc::FFVar nrtl_dtau(const mc::FFVar &T, const std::vector< double > p)
Definition: functionWrapper.h:207
babBase::OptimizationVariable OptimizationVariable
Definition: MAiNGOmodel.h:74
VT
Enum for representing the Variable Type of an optimization variable as specified by the user...
Definition: babOptVar.h:43
constexpr VT VT_BINARY
Definition: MAiNGOmodel.h:78
virtual ~MAiNGOmodel()
Destructor.
Definition: MAiNGOmodel.h:95
babBase::Bounds Bounds
Definition: MAiNGOmodel.h:75
Definition: babOptVar.h:45