Open jschueller opened 2 years ago
Any idea @Sceki ?
more generally, do we have to check is the population is inside the bounds before calling pagmo, or do the algorithms will manage to "jump" inside the bounds ?
As I wrote in the other thread, what happens with out-of-bounds conditions is algorithm-dependent. But in any case it should never lead to a hang/crash, and if it does it's a bug.
I believe that the problem is that this while
loop can be endless in case the initial population is out of bounds: https://github.com/esa/pagmo2/blob/master/src/algorithms/gaco.cpp#L855.
I think there are two possibilities: either we avoid the while loop (i.e., the re-sampling until we satisfy the bounds) for the case in which the user decides that out-of-bounds solutions are acceptable, or we simply do not accept initial populations that are out of bounds.
In the former case, we would need to add a boolean flag (similar to the cmaes
force_bounds
one) and skip that while loop (i.e., the re-sampling) in case that is set to true
.
I am a bit busy these days, but I will try to fix it with a PR as soon as possible..
yes, a simple throw to reject initial populations out of bounds would be the simplest
I believe that the problem is that this
while
loop can be endless in case the initial population is out of bounds: https://github.com/esa/pagmo2/blob/master/src/algorithms/gaco.cpp#L855.I think there are two possibilities: either we avoid the while loop (i.e., the re-sampling until we satisfy the bounds) for the case in which the user decides that out-of-bounds solutions are acceptable, or we simply do not accept initial populations that are out of bounds. In the former case, we would need to add a boolean flag (similar to the
cmaes
force_bounds
one) and skip that while loop (i.e., the re-sampling) in case that is set totrue
.I am a bit busy these days, but I will try to fix it with a PR as soon as possible..
Cheers!
Do you think it helps algorithmic performance to allow for out-of-bounds individuals? If you think it does not, then I'd personally be more in favour of throwing, rather than adding another configuration parameter.
Indeed, another configuration parameter seems a bit too much, and if the bounds are chosen wide enough the performance should be the same, so I will just throw I guess :)
when some points of the initial population are outside the bounds and the objective tend to make it go outside, gaco can hang:
more generally, do we have to check is the population is inside the bounds before calling pagmo, or do the algorithms will manage to "jump" inside the bounds ?