{"action":"created","issue":{"url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/15","labels_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/15/comments","events_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/15/events","html_url":"https://github.com/MOEAFramework/MOEAFramework/issues/15","id":115492666,"number":15,"title":"NondominatedPopulation: Adding solutions with the same objective values","user":{"login":"Nozo","id":5185195,"avatar_url":"https://avatars.githubusercontent.com/u/5185195?v=3","gravatar_id":"","url":"https://api.github.com/users/Nozo","html_url":"https://github.com/Nozo","followers_url":"https://api.github.com/users/Nozo/followers","following_url":"https://api.github.com/users/Nozo/following{/other_user}","gists_url":"https://api.github.com/users/Nozo/gists{/gist_id}","starred_url":"https://api.github.com/users/Nozo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nozo/subscriptions","organizations_url":"https://api.github.com/users/Nozo/orgs","repos_url":"https://api.github.com/users/Nozo/repos","events_url":"https://api.github.com/users/Nozo/events{/privacy}","received_events_url":"https://api.github.com/users/Nozo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-06T12:00:45Z","updated_at":"2015-11-11T13:12:52Z","closed_at":null,"body":"At the end I attached the implementation of the add method of the NondominatedPopulation. Especially I respond to the following line:\r\n\r\n    else if (!allowDuplicates && distance(newSolution, oldSolution) < Settings.EPS) {\r\n\t\t\r\nI recognized, if there are 2 different solutions with different decision variables but the same objective values only one Solution is added to the NondominatedPopulation. In My Opinion this is because the decision is only made in the objective space. There maybe should be a possibility to check the decision variables to distinguish if the solutions are duplicates or only have the same objective values but different decision variables.\r\n\r\n```javascript\r\n\t@Override\r\n\tpublic boolean add(Solution newSolution) {\r\n\t\tIterator<Solution> iterator = iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tSolution oldSolution = iterator.next();\r\n\t\t\tint flag = comparator.compare(newSolution, oldSolution);\r\n\r\n\t\t\tif (flag < 0) {\r\n\t\t\t\titerator.remove();\r\n\t\t\t} else if (flag > 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (!allowDuplicates &&\r\n\t\t\t\t\tdistance(newSolution, oldSolution) < Settings.EPS) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn super.add(newSolution);\r\n\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/comments/155782900","html_url":"https://github.com/MOEAFramework/MOEAFramework/issues/15#issuecomment-155782900","issue_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/15","id":155782900,"user":{"login":"dhadka","id":2496211,"avatar_url":"https://avatars.githubusercontent.com/u/2496211?v=3","gravatar_id":"","url":"https://api.github.com/users/dhadka","html_url":"https://github.com/dhadka","followers_url":"https://api.github.com/users/dhadka/followers","following_url":"https://api.github.com/users/dhadka/following{/other_user}","gists_url":"https://api.github.com/users/dhadka/gists{/gist_id}","starred_url":"https://api.github.com/users/dhadka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhadka/subscriptions","organizations_url":"https://api.github.com/users/dhadka/orgs","repos_url":"https://api.github.com/users/dhadka/repos","events_url":"https://api.github.com/users/dhadka/events{/privacy}","received_events_url":"https://api.github.com/users/dhadka/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T13:12:52Z","updated_at":"2015-11-11T13:12:52Z","body":"@Nozo, I plan to work on this over the weekend, so likely by next Monday."}}