25 #include <boost/math/constants/constants.hpp>
28 #include "../exceptions.h"
33 namespace pagmo {
namespace problem {
43 set_lb(-std::atan(1.0f) * 4.0f);
44 set_ub(std::atan(1.0f) * 4.0f);
56 pagmo_assert(f.size() == 2);
57 pagmo_assert(x.size() == 2);
62 double a1 = 0.5 * sin(1.0) - 2 * cos(1.0) + sin(2.0) - 1.5 * cos(2.0);
64 double a2 = 1.5 * sin(1.0) - cos(1.0) + 2 * sin(2.0) - 0.5 * cos(2.0);
66 double b1 = 0.5 * sin(x[0]) - 2 * cos(x[0]) + sin(x[1]) - 1.5 * cos(x[1]);
68 double b2 = 1.5 * sin(x[0]) - cos(x[0]) + 2 * sin(x[1]) - 0.5 * cos(x[1]);
70 f[0] = 1 + (a1-b1)*(a1-b1) + (a2-b2)*(a2-b2);
71 f[1] = (x[0]+3)*(x[0]+3) + (x[1]+1)*(x[1]+1);
76 return "Poloni's study";
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
std::vector< double > decision_vector
Decision vector type.
std::string get_name() const
Get problem's name.
void objfun_impl(fitness_vector &, const decision_vector &) const
Implementation of the objective function.
void set_lb(const decision_vector &)
Set lower bounds from pagmo::decision_vector.
base_ptr clone() const
Clone method.
void set_ub(const decision_vector &)
Set upper bounds from pagmo::decision_vector.
std::vector< double > fitness_vector
Fitness vector type.