Skip to content

[BUG] python decorator unconstrain nf does not match up with inner problem #614

@sunzhenyang2018

Description

@sunzhenyang2018

pygmo 2.19.7 python 3.12

udp is a constrained problem with 6 objectives and 2 inequality constraints. udp.fitness(x) returns a list of 8 numbers.

uc = unconstrain(prob=udp, method='kuri')
pop = population(prob=uc, b=pg.mp_bfe())

Then uc.inner_problem.get_nf() returns 8, while curr_prop.problem.get_nf() returns 6.

An error is raised when doing pop.push_back(),

ValueError:
function: push_back_impl
where: /home/conda/feedstock_root/build_artifacts/pagmo_1763106561708/work/src/population.cpp, 579
what: Trying to add a fitness of dimension: 8, while the problem's fitness has dimension: 6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions