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

resolve bug that prevents two equally seeded reference direction calculations (energy reduction method) to produce the same output #556

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NikHoh
Copy link

@NikHoh NikHoh commented Feb 2, 2024

Test with:


import numpy as np

from pymoo.util.ref_dirs import get_reference_directions

a = get_reference_directions("energy", n_dim=3, n_points=100, seed=2)

b = get_reference_directions("energy", n_dim=3, n_points=100, seed=2)

print(np.array_equal(a, b))


Behavior before change:
Expected output: True
Given output: False

Behavior after change:
Expected output: True
Given output: True

Hohmann, Nikolas added 2 commits February 2, 2024 16:26
@blankjul
Copy link
Collaborator

blankjul commented Feb 5, 2024

I am happy to merge the commit with the random seed directly. However, for the NSGA-III merge I would like to be a little more careful. Please see my comment in the review.

@blankjul blankjul self-assigned this Feb 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants