Skip to content

NSGA3 evaluates the same point multiple times #113

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

Open
mschytt opened this issue Oct 2, 2024 · 0 comments
Open

NSGA3 evaluates the same point multiple times #113

mschytt opened this issue Oct 2, 2024 · 0 comments

Comments

@mschytt
Copy link

mschytt commented Oct 2, 2024

Hello👋

After its first iteration, NSGA3 seems to evaluate the objective functions at the same place approximately N/2 times.

Consider the following MWE:

using Metaheuristics

function objective(x)
    @info x
    return [sum((x .- 0.5).^2), sum((x .+ 0.5).^2)], [0.0], [0.0]
end

n = 2
N = 10
bounds = boxconstraints(lb = -ones(n), ub = ones(n))
options = Options(f_calls_limit=30, seed = 1337, verbose = true)
alg = NSGA3(N=N, options=options)

res = optimize(objective, bounds, alg)

which prints

Algorithm Parameters
====================
  NSGA3(N=10, η_cr=20.0, p_cr=0.9, η_m=20.0, p_m=-1.0, partitions=12)

Optimization Result
===================
  Empty status.


[ Info: [-0.1846656815945078, 0.2207039622817888]
[ Info: [-0.6617257513975063, 0.5195810051063896]
[ Info: [-0.8600008519021676, -0.4525735697266313]
[ Info: [0.6619126923119993, -0.8102844592899499]
[ Info: [0.34437628136171505, -0.9199862534059393]
[ Info: [0.4682413588709464, -0.7137176659081459]
[ Info: [0.6520704859020932, 0.614884883865771]
[ Info: [0.9116517810532121, -0.08297745716276861]
[ Info: [-0.6813744510917941, -0.17653930805284945]
[ Info: [0.669531010267163, -0.28043736764844707]
+-----------+------------+------------+------------+------------+
| Iteration | Num. Evals |     NDS    |  Mean CVio |    Time    |
+-----------+------------+------------+------------+------------+
|         1 |         10 |       5/10 | 0.0000e+00 |   0.0005 s | 
[ Info: [0.6706522261009393, -0.6646945997629945]
[ Info: [0.9544391771955858, -0.8785267643421679]
[ Info: [-0.2086137305927499, 0.2207039622817888]
[ Info: [-0.8631268073141017, -0.45866738194687895]
[ Info: [0.6749481247627177, -0.8251998363497399]
[ Info: [-0.675059249086544, 0.6677026560781374]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
|         2 |         20 |       7/10 | 0.0000e+00 |   0.0009 s | 
[ Info: [-0.1445567175792214, 0.26853208083242375]
[ Info: [-0.8599313117016076, -0.45886403320924973]
[ Info: [0.5925739891731482, 0.6017591988536004]
[ Info: [-0.02052696868519399, -0.08142545469223275]
[ Info: [-0.5821146955091046, -0.19470510394965335]
[ Info: [-0.05076294939677822, 0.018196310337433505]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
[ Info: [0.0, 0.0]
|         3 |         30 |      10/10 | 0.0000e+00 |   0.0013 s | 
Optimization Result
===================
  Iteration:       3
  Non-dominated:   10 / 10
  Function calls:  30
  Feasibles:       10 / 10 in final population
  Total time:      0.0013 s
  Stop reason:     Maximum objective function calls exceeded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant