MAiNGO
MAiNGOmodelEpsCon.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 "MAiNGOmodel.h"
15 
16 
21 namespace maingo {
22 
23 
31 
32  public:
36  virtual ~MAiNGOmodelEpsCon() {}
37 
43  virtual EvaluationContainer evaluate_user_model(const std::vector<Var> &optVars) = 0;
44 
48  virtual std::vector<OptimizationVariable> get_variables() = 0;
49 
55  EvaluationContainer evaluate(const std::vector<Var> &optVars) final;
56 
60  virtual std::vector<double> get_initial_point() { return std::vector<double>(); }
61 
67  void set_epsilon(const std::vector<double> &epsilon)
68  {
69  _epsilon = epsilon;
70  }
71 
77  void set_objective_index(const size_t objectiveIndex)
78  {
79  _objectiveIndex = objectiveIndex;
80  }
81 
87  void set_single_objective(bool singleObjective)
88  {
89  _singleObjective = singleObjective;
90  }
91 
92  private:
93  std::vector<double> _epsilon;
94  size_t _objectiveIndex;
95  bool _singleObjective = true;
96 };
97 
98 
99 } // end namespace maingo
void set_single_objective(bool singleObjective)
Function for setting the _singleObjective flag.
Definition: MAiNGOmodelEpsCon.h:87
This class is the base class for implementing bi-objective problems.
Definition: MAiNGOmodelEpsCon.h:30
bool _singleObjective
Definition: MAiNGOmodelEpsCon.h:95
EvaluationContainer evaluate(const std::vector< Var > &optVars) final
Virtual function which has to be implemented by the user in order to enable evaluation of the model...
Definition: MAiNGOmodelEpsCon.cpp:27
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: MAiNGOmodelEpsCon.h:60
Struct for storing the values returned by model evaluation at the given point "var".
Definition: evaluationContainer.h:208
virtual EvaluationContainer evaluate_user_model(const std::vector< Var > &optVars)=0
Virtual function which has to be implemented by the user in order to enable evaluation of the model...
This class is the base class for models to be solved by MAiNGO.
Definition: MAiNGOmodel.h:87
void set_epsilon(const std::vector< double > &epsilon)
Function for changing the epsilon-parameters.
Definition: MAiNGOmodelEpsCon.h:67
size_t _objectiveIndex
Definition: MAiNGOmodelEpsCon.h:94
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
virtual ~MAiNGOmodelEpsCon()
Destructor.
Definition: MAiNGOmodelEpsCon.h:36
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...
std::vector< double > _epsilon
Definition: MAiNGOmodelEpsCon.h:93
void set_objective_index(const size_t objectiveIndex)
Function for setting the objective index.
Definition: MAiNGOmodelEpsCon.h:77