Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]cstrs_self_adaptive hides the problems integer dimensions from the algorithm #465

Open
SchwarzschildX opened this issue Feb 10, 2021 · 3 comments
Labels

Comments

@SchwarzschildX
Copy link
Contributor

SchwarzschildX commented Feb 10, 2021

Describe the bug
If a constrained integer problem is solved using cstrs_self_adaptive with pagmo::sga (or any other integer capable algorithm), the decision vectors consist of floating point numbers instead of integers.

Expected behavior
Using cstrs_self_adaptive on constrained integer problems creates integer decision vectors.

Environment (please complete the following information):

  • OS: Win10 x64
  • Installation method: source
  • Version: 2.16.0

Idea
As far as I understand, cstrs_self_adaptive creates a penalized_udp of the original problem. This penalized_udp simply must relay the get_nix to the underlying problem.

vector_double::size_type penalized_udp::get_nix() const {
    return m_pop_ptr->get_problem().get_nix();
}

@bluescarni
Copy link
Member

Thanks for the report. I am going to ping @darioizzo for this as he wrote the algorithm originally.

@SchwarzschildX
Copy link
Contributor Author

to summarize:

  • using cstrs_self_adaptive, the original problem is encapsulated within a penalized_udp problem
  • the algorithm tries to get the problems integer dimensions via a call to the problems get_nix() method
  • penalized_udp has no get_nix() method implemented

@SchwarzschildX
Copy link
Contributor Author

#466 pull request

bluescarni added a commit that referenced this issue Dec 27, 2021
fixed cstrs_self_adpative integer problem handling #465
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants