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

Fix improvement calculation #222

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Fix improvement calculation #222

merged 4 commits into from
Jan 25, 2024

Conversation

dhadka
Copy link
Member

@dhadka dhadka commented Jan 24, 2024

Fixes #221

platypus/core.py Outdated
@@ -987,9 +987,11 @@ def add(self, solution):
else:
self._contents = list(itertools.compress(self._contents, nondominated)) + [solution]

if dominated and not_same_box:
if any(dominated) and all(not_same_box):
Copy link
Member Author

@dhadka dhadka Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also consider getting rid of the dominated check.

In the MOEA Framework, which is the precursor to this library, I actual split out two types of improvement:

https://github.com/MOEAFramework/MOEAFramework/blob/28d11977f5cf0a52881b6862f265009bb0dd9f55/src/org/moeaframework/core/EpsilonBoxDominanceArchive.java#L46-L55

	/**
	 * The number of ε-box improvements that have occurred.
	 */
	private int numberOfImprovements;

	/**
	 * The number of ε-box improvements dominating an existing solution
	 * that have occurred.
	 */
	private int numberOfDominatingImprovements;

Copy link
Member Author

@dhadka dhadka Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think to keep the two libraries consistent, non-dominated solutions should count as improvements so long as they fall within a new epsilon-box.

@dhadka dhadka merged commit ba5e497 into master Jan 25, 2024
8 of 9 checks passed
@dhadka dhadka deleted the fix-improvements branch January 25, 2024 03:17
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.

EpsilonBoxArchive improvements attribute is not consistant
2 participants