28 #include "../exceptions.h"
30 #include "con2uncon.h"
32 namespace pagmo {
namespace problem {
43 problem.get_dimension(),
44 problem.get_i_dimension(),
45 problem.get_f_dimension(),
48 std::vector<double>()),
51 if((m_method < 0) || (m_method > 1)) {
52 pagmo_throw(value_error,
"the problem method must be either OPTIMALITY or FEASIBILITY.");
88 c_func += ( std::abs(c.at(j)) - c_tol.at(j) ) * ( std::abs(c.at(j)) - c_tol.at(j) );
95 c_func += c.at(j) - c_tol.at(j);
99 std::fill(f.begin(),f.end(), 0.);
102 if(c_func > boost::numeric::bounds<double>::highest()){
103 f[0] = boost::numeric::bounds<double>::highest();
120 std::ostringstream oss;
122 oss <<
"\n\tcon2unconed with method ";
125 oss <<
"OPTIMALITY ";
129 oss <<
"FEASIBILITY ";
143 method =
"OPTIMALITY ";
147 method =
"FEASIBILITY ";
boost::shared_ptr< base > base_ptr
Alias for shared pointer to base problem.
con2uncon(const base &=cec2006(4), const method_type=OPTIMALITY)
std::vector< double > decision_vector
Decision vector type.
The sum of the constraint violation is used as objective function of the transformed problem...
std::string get_name() const
Get problem's name.
The objective function of the original problem is used as objective function of the transformed probl...
Constrained to unconstrained meta-problem.
method_type
Mechanism used to transform the input problem.
std::vector< double > fitness_vector
Fitness vector type.
std::vector< double > constraint_vector
Constraint vector type.
std::string human_readable_extra() const
Extra human readable info for the problem.
constraint_vector::size_type c_size_type
Constraints' size type: the same as pagmo::constraint_vector's size type.
void objfun_impl(fitness_vector &, const decision_vector &) const
base_ptr clone() const
Clone method.