suite_cons_bbob_problems.c File Reference

Implementation of the problems in the constrained BBOB suite. More...

#include <math.h>
#include "coco.h"
#include "coco_utilities.c"
#include "coco_random.c"
#include "c_linear.c"
#include "f_different_powers.c"
#include "f_discus.c"
#include "f_ellipsoid.c"
#include "f_linear_slope.c"
#include "f_rastrigin.c"
#include "f_sphere.c"

Functions

static size_t obj_function_type (const size_t function)
 Calculates the objective function type based on the value of "function". More...
 
static size_t nb_of_linear_constraints (const size_t function, const size_t dimension)
 Returns the number of linear constraints associated to the value of "function". More...
 
static void feasible_direction_set_length (double *feasible_direction, const double *xopt, size_t dimension, long rseed)
 Scale feasible direction depending on xopt such that xopt + feasible_direction remains in [-5, 5]. More...
 
static coco_problem_tf_sphere_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: sphere Constraint(s): linear. More...
 
static coco_problem_tf_ellipsoid_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: ellipsoid Constraint(s): linear. More...
 
static coco_problem_tf_ellipsoid_rotated_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: rotated ellipsoid Constraint(s): linear. More...
 
static coco_problem_tf_linear_slope_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: linear slope Constraint(s): linear. More...
 
static coco_problem_tf_discus_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: discus Constraint(s): linear. More...
 
static coco_problem_tf_bent_cigar_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: bent cigar Constraint(s): linear. More...
 
static coco_problem_tf_different_powers_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: different powers Constraint(s): linear. More...
 
static coco_problem_tf_rastrigin_c_linear_cons_bbob_problem_allocate (const size_t function, const size_t dimension, const size_t instance, const size_t number_of_linear_constraints, const long rseed, double *feasible_direction, const double *xopt, const char *problem_id_template, const char *problem_name_template)
 Objective function: rastrigin Constraint(s): linear. More...
 

Detailed Description

Implementation of the problems in the constrained BBOB suite.

This suite contains 48 constrained functions in continuous domain which are derived from combining 8 single-objective functions of the noiseless bbob test suite with randomly-generated linear constraints perturbed by nonlinear transformations. Each one of the 8 functions is combined with 6 different numbers of constraints: 1, 2, 6, 6+n/2, 6+n and 6+3n.

We consider constrained optimization problems of the form

min f(x) s.t. g_i(x) <= 0, i=1,...,l.

The constrained functions are built in a way such that the KKT conditions are satisied at the origin, which is the initial optimal solution. We then translate the constrained function by a random vector in order to move the optimal solution away from the origin.


General idea for building the constrained functions


  1. Choose a bbob function f whose raw version is pseudoconvex to be the objective function. (see note below)
  2. Remove possible nonlinear transformations from f. (see note below)
  3. In order to make sure that the feasible set is not empty, we choose a direction p that should be feasible. Define p as the gradient of f at the origin.
  4. Define the first constraint g_1(x)=a_1'*x by setting its gradient to a_1 = -p. By definition, g_1(p) < 0. Thus p is feasible for g_1.
  5. Generate the other constraints randomly while making sure that p remains feasible for each one.
  6. Apply to the whole constrained function the nonlinear transformations that were removed from the objective function in Step 2. (see note below)
  7. Choose a random point xopt and move the optimum away from the origin to xopt by translating the constrained function by -xopt.
Note
The pseudoconvexity in Step 1 guarantees that the KKT conditions are sufficient for optimality.
The removal of possible nonlinear transformations in Step 2 and posterior application in Step 6 are necessary to make sure that the KKT conditions are satisfied in the optimum
  • until then the origin. As explained in the documentation, the application of the nonlinear transformations in Step 6 does not affect the location of the optimum.
a_1 is set to -p, i.e. the negative gradient of f at the origin, in order to have the KKT conditions easily satisfied.
Steps 1 and 2 are done within the 'allocate' function of the objective function, e.g. f_ellipsoid_cons_bbob_problem_allocate().
Steps 4 and 5 are done within c_linear_cons_bbob_problem_allocate().
The constrained Rastrigin function's construction differs a bit from the steps above. Since it is a multimodal function with well distributed local optima, we choose one of its local optima to be the global constrained optimum by adding constraints that pass through that point.
The testbed provides the user an initial solution which is given by the feasible direction p scaled by some constant.

COCO data structure for the constrained functions


First, we create a coco_problem_t object for the objective function. Then, coco_problem_t objects are created for each constraint and stacked together into a single coco_problem_t object (see "c_linear.c"). Finally, the coco_problem_t object containing the constraints and the coco_problem_t object containing the objective function are stacked together to form the constrained function.

Function Documentation

static coco_problem_t* f_bent_cigar_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: bent cigar Constraint(s): linear.

static coco_problem_t* f_different_powers_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: different powers Constraint(s): linear.

static coco_problem_t* f_discus_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: discus Constraint(s): linear.

static coco_problem_t* f_ellipsoid_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: ellipsoid Constraint(s): linear.

static coco_problem_t* f_ellipsoid_rotated_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: rotated ellipsoid Constraint(s): linear.

static coco_problem_t* f_linear_slope_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: linear slope Constraint(s): linear.

static coco_problem_t* f_rastrigin_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: rastrigin Constraint(s): linear.

static coco_problem_t* f_sphere_c_linear_cons_bbob_problem_allocate ( const size_t  function,
const size_t  dimension,
const size_t  instance,
const size_t  number_of_linear_constraints,
const long  rseed,
double *  feasible_direction,
const double *  xopt,
const char *  problem_id_template,
const char *  problem_name_template 
)
static

Objective function: sphere Constraint(s): linear.

static void feasible_direction_set_length ( double *  feasible_direction,
const double *  xopt,
size_t  dimension,
long  rseed 
)
static

Scale feasible direction depending on xopt such that xopt + feasible_direction remains in [-5, 5].

static size_t nb_of_linear_constraints ( const size_t  function,
const size_t  dimension 
)
static

Returns the number of linear constraints associated to the value of "function".

static size_t obj_function_type ( const size_t  function)
static

Calculates the objective function type based on the value of "function".