PaGMO  1.1.5
cec2006.h
1 /*****************************************************************************
2  * Copyright (C) 2004-2015 The PaGMO development team, *
3  * Advanced Concepts Team (ACT), European Space Agency (ESA) *
4  * *
5  * https://github.com/esa/pagmo *
6  * *
7  * act@esa.int *
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  * This program is distributed in the hope that it will be useful, *
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17  * GNU General Public License for more details. *
18  * *
19  * You should have received a copy of the GNU General Public License *
20  * along with this program; if not, write to the *
21  * Free Software Foundation, Inc., *
22  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
23  *****************************************************************************/
24 
25 #ifndef PAGMO_PROBLEM_CEC2006_H
26 #define PAGMO_PROBLEM_CEC2006_H
27 
28 #include "../config.h"
29 #include "../serialization.h"
30 #include "../types.h"
31 #include "base.h"
32 
33 namespace pagmo{ namespace problem {
34 
36 
49 class __PAGMO_VISIBLE cec2006 : public base
50 {
51  public:
52  cec2006(int = 1);
53  base_ptr clone() const;
54  std::string get_name() const;
55 
56  protected:
57  void objfun_impl(fitness_vector &, const decision_vector &) const;
58  void compute_constraints_impl(constraint_vector &, const decision_vector &) const;
59 
60  private:
61  void g01_objfun_impl(fitness_vector &, const decision_vector &) const;
62  void g01_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
63  void g02_objfun_impl(fitness_vector &, const decision_vector &) const;
64  void g02_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
65  void g03_objfun_impl(fitness_vector &, const decision_vector &) const;
66  void g03_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
67  void g04_objfun_impl(fitness_vector &, const decision_vector &) const;
68  void g04_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
69  void g05_objfun_impl(fitness_vector &, const decision_vector &) const;
70  void g05_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
71  void g06_objfun_impl(fitness_vector &, const decision_vector &) const;
72  void g06_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
73  void g07_objfun_impl(fitness_vector &, const decision_vector &) const;
74  void g07_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
75  void g08_objfun_impl(fitness_vector &, const decision_vector &) const;
76  void g08_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
77  void g09_objfun_impl(fitness_vector &, const decision_vector &) const;
78  void g09_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
79  void g10_objfun_impl(fitness_vector &, const decision_vector &) const;
80  void g10_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
81  void g11_objfun_impl(fitness_vector &, const decision_vector &) const;
82  void g11_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
83  void g12_objfun_impl(fitness_vector &, const decision_vector &) const;
84  void g12_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
85  void g13_objfun_impl(fitness_vector &, const decision_vector &) const;
86  void g13_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
87  void g14_objfun_impl(fitness_vector &, const decision_vector &) const;
88  void g14_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
89  void g15_objfun_impl(fitness_vector &, const decision_vector &) const;
90  void g15_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
91  void g16_objfun_impl(fitness_vector &, const decision_vector &) const;
92  void g16_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
93  void g17_objfun_impl(fitness_vector &, const decision_vector &) const;
94  void g17_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
95  void g18_objfun_impl(fitness_vector &, const decision_vector &) const;
96  void g18_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
97  void g19_objfun_impl(fitness_vector &, const decision_vector &) const;
98  void g19_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
99  void g20_objfun_impl(fitness_vector &, const decision_vector &) const;
100  void g20_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
101  void g21_objfun_impl(fitness_vector &, const decision_vector &) const;
102  void g21_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
103  void g22_objfun_impl(fitness_vector &, const decision_vector &) const;
104  void g22_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
105  void g23_objfun_impl(fitness_vector &, const decision_vector &) const;
106  void g23_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
107  void g24_objfun_impl(fitness_vector &, const decision_vector &) const;
108  void g24_compute_constraints_impl(constraint_vector &c, const decision_vector &x) const;
109 
110  void initialize_best(void);
111 
112  friend class boost::serialization::access;
113  template <class Archive>
114  void serialize(Archive &ar, const unsigned int)
115  {
116  ar & boost::serialization::base_object<base>(*this);
117  ar & const_cast<unsigned int&>(m_problem_number);
118  }
119 
120  const unsigned int m_problem_number;
121 
122  // no need to serialize these static vectors
123  static const decision_vector::size_type m_problems_dimension[];
124  static const constraint_vector::size_type m_problems_c_dimension[];
125  static const constraint_vector::size_type m_problems_ic_dimension[];
126 };
127 
128 }} //namespaces
129 
130 BOOST_CLASS_EXPORT_KEY(pagmo::problem::cec2006)
131 
132 #endif
Root PaGMO namespace.
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
Definition: problem/base.h:62
std::vector< double > decision_vector
Decision vector type.
Definition: types.h:40
Base problem class.
Definition: problem/base.h:148
The CEC 2006 problems: Constrained Real-Parameter Optimization.
Definition: cec2006.h:49
std::vector< double > fitness_vector
Fitness vector type.
Definition: types.h:42
std::vector< double > constraint_vector
Constraint vector type.
Definition: types.h:44