Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How to obtain the Pareto front via NSGA-II #400

Closed
Zcaic opened this issue May 19, 2024 · 1 comment
Closed

How to obtain the Pareto front via NSGA-II #400

Zcaic opened this issue May 19, 2024 · 1 comment

Comments

@Zcaic
Copy link

Zcaic commented May 19, 2024

I have a multi-objective problem and I found that when I optimize with NSGA-II, I get only one solution, how can I get the whole one Pareto front? thanks!!!

@ewu63
Copy link
Collaborator

ewu63 commented May 20, 2024

This information is provided in the files written out by NSGA2.

  1. Make sure PrintOut is set appropriately (say 1)
  2. The information is encoded in nsga2_best_pop.out but several other files are available with other information you may find useful.

Sample snippet for the example script nsga2_multi_objective.py:

import matplotlib.pyplot as plt
import numpy as np
x = np.loadtxt("nsga2_best_pop.out")
plt.plot(x[:,0], x[:,1], '.')
plt.show()

This plots the Pareto front for this simple 2-objective problem.
image

@mdolab mdolab locked and limited conversation to collaborators May 20, 2024
@ewu63 ewu63 converted this issue into discussion #401 May 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants