Skip to content

Commit

Permalink
Merge pull request #2088 from numbbo/release
Browse files Browse the repository at this point in the history
Release 2.6.1
  • Loading branch information
brockho authored Mar 13, 2022
2 parents fa736fe + 1cdbb93 commit ffd4fae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code-experiments/src/suite_cons_bbob_problems.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static coco_problem_t *f_linear_slope_c_linear_cons_bbob_problem_allocate(const
/* Apply a translation to the whole problem so that the constrained
* minimum is no longer at the origin.
*/
problem = transform_vars_shift(problem, xopt, 0);
problem = transform_vars_shift(problem, xopt, 1);

/* Construct problem type */
coco_problem_set_type(problem, "%s_%s", problem_type_temp,
Expand Down
6 changes: 2 additions & 4 deletions code-experiments/src/transform_vars_shift.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ static void transform_vars_shift_free(void *thing) {
*/
static coco_problem_t *transform_vars_shift(coco_problem_t *inner_problem,
const double *offset,
const int shift_bounds) {
const int shift_constraint_only) {
transform_vars_shift_data_t *data;
coco_problem_t *problem;
size_t i;
if (shift_bounds)
coco_error("shift_bounds not implemented.");

data = (transform_vars_shift_data_t *) coco_allocate_memory(sizeof(*data));
data->offset = coco_duplicate_vector(offset, inner_problem->number_of_variables);
Expand All @@ -124,7 +122,7 @@ static coco_problem_t *transform_vars_shift(coco_problem_t *inner_problem,
problem = coco_problem_transformed_allocate(inner_problem, data,
transform_vars_shift_free, "transform_vars_shift");

if (inner_problem->number_of_objectives > 0)
if (inner_problem->number_of_objectives > 0 && shift_constraint_only == 0)
problem->evaluate_function = transform_vars_shift_evaluate_function;

if (inner_problem->number_of_constraints > 0)
Expand Down

0 comments on commit ffd4fae

Please sign in to comment.