esa / esa/pygmo2

[BUG] Auglag algorithm from NLOPT library does not evolve the population

Open
#126 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
536
Forks
74
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I am trying to use `auglag` and `auglag_eq` algorithms from the NLOPT library. However, when I run the code the population does not evolve. In fact, I checked if the gradient was being evaluated, but it wasn't. So, the model is running, but it's not evolving.

It is important to note that all the other algorithms available for pygmo are working correctly.

**To Reproduce**
The code is quite large, so I will summarise here the structure:

`class pygmo_run:`
`prob = pg.problem(my_udp)`
`nl_algo = pg.nlopt('auglag')`
`nl_algo.local_optimizer = pg.nlopt('slsqp')`
`algo = pg.algorithm(uda = nl_algo)`
`pop = pg.population(prob, size=10, seed = 0)`
`pop = algo.evolve(pop)`

`class my_udp:`
`def fitness:`
`def get_bounds:`
`def gradient:`

**Expected behavior**
The population should evolve and search for the minimum.

**Environment (please complete the following information):**
- OS: Windows 10
- Installation method: conda
- Version: 2.19

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported behavior with pg.nlopt('auglag'), the SLSQP local optimizer, and the my_udp structure described in the issue. Compare gradient evaluation and population results with a working algorithm; done means auglag and auglag_eq evolve the population and search for the minimum, ideally with a small complete reproducer and a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.