{"action":"created","issue":{"url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/176","repository_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework","labels_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/176/comments","events_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/176/events","html_url":"https://github.com/MOEAFramework/MOEAFramework/issues/176","id":318898505,"number":176,"title":"NGSA-II result always returns only 1 solution in the NonDominatedPopulation","user":{"login":"Nobik2","id":6951339,"avatar_url":"https://avatars1.githubusercontent.com/u/6951339?v=4","gravatar_id":"","url":"https://api.github.com/users/Nobik2","html_url":"https://github.com/Nobik2","followers_url":"https://api.github.com/users/Nobik2/followers","following_url":"https://api.github.com/users/Nobik2/following{/other_user}","gists_url":"https://api.github.com/users/Nobik2/gists{/gist_id}","starred_url":"https://api.github.com/users/Nobik2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nobik2/subscriptions","organizations_url":"https://api.github.com/users/Nobik2/orgs","repos_url":"https://api.github.com/users/Nobik2/repos","events_url":"https://api.github.com/users/Nobik2/events{/privacy}","received_events_url":"https://api.github.com/users/Nobik2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-30T13:55:35Z","updated_at":"2018-04-30T15:06:49Z","closed_at":null,"author_association":"NONE","body":"Hi @dhadka,\r\n\r\nNSGA-II runs but even when I set the population size property, I notice that the results(Pareto set) only contains 1 solution i.e. (`results.size() == 1`) I have tried running different population sizes and still get the same outcome. Also, I have two objectives and I notice that the values of the objectives when printed are `0.0000` and `0.0000`. Please what am I doing wrong?\r\n \r\n```java\r\n    public Solution newSolution() {\r\n    \tSolution solution = new Solution(1, 2);\r\n        solution.setVariable(0, new Obi_TransitScheduleJSONDecisionVariable());\r\n        return solution;\r\n    }\r\n```\r\n\r\n```java\r\n\tpublic void evaluate(Solution solution) {\r\n  \r\n    \tSystem.out.println(callsToEvaluate++);\r\n    \tTransitScheduleJSONDecisionVariable var = (TransitScheduleJSONDecisionVariable) solution.getVariable(0);\r\n        System.out.println(\"Number of MOEA Evaluations is:\" + \" \" + currentMOEAEvaluationNumber++);\r\n        JSONObject Jvar = var.getTransitSchedule();\r\n        TransitScheduleXMLFileUtils.getXMLFromJSONDecisionVar(Jvar);\r\n\r\n        runSimulation(Simulation inputs);\r\n\t\tObjectives objectives = processOutputFiles(Simulation results);\r\n\t\tsolution.setObjective(0, objectives.objectives[0]);\r\n                solution.setObjective(1, objectives.objectives[1]);\r\n        \r\n    }\r\n```\r\n\r\n```java\r\npublic class TransitScheduleJSONDecisionVariable implements Variable {\r\n\r\n    private static final long serialVersionUID = 1L;\r\n    private JSONObject transitSchedule; // transitSchedule.xml file's json representation\r\n\r\n    public TransitScheduleJSONDecisionVariable() {\r\n    \tsuper();\r\n    }\r\n    public TransitScheduleJSONDecisionVariable(JSONObject transitSchedule) {\r\n\t\tthis();\r\n\t\tthis.transitSchedule = transitSchedule;\r\n    }\r\n\r\n    public Variable copy() {\r\n        TransitScheduleJSONDecisionVariable v = new TransitScheduleJSONDecisionVariable();\r\n        v.setTransitSchedule(new JSONObject(this.getTransitSchedule().toString()));\r\n        return v;\r\n    }\r\n\r\n    public void randomize() {\r\n    \t\r\n        transitSchedule = TransitScheduleXMLFileUtils.getRandomTransitSchedule();\t\r\n        \r\n    }\r\n\r\n    public JSONObject getTransitSchedule() {\r\n        return transitSchedule;\r\n    }\r\n\r\n    public void setTransitSchedule(JSONObject transitSchedule) {\r\n        this.transitSchedule = transitSchedule;\r\n    }\r\n}\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/comments/385427386","html_url":"https://github.com/MOEAFramework/MOEAFramework/issues/176#issuecomment-385427386","issue_url":"https://api.github.com/repos/MOEAFramework/MOEAFramework/issues/176","id":385427386,"user":{"login":"Nobik2","id":6951339,"avatar_url":"https://avatars1.githubusercontent.com/u/6951339?v=4","gravatar_id":"","url":"https://api.github.com/users/Nobik2","html_url":"https://github.com/Nobik2","followers_url":"https://api.github.com/users/Nobik2/followers","following_url":"https://api.github.com/users/Nobik2/following{/other_user}","gists_url":"https://api.github.com/users/Nobik2/gists{/gist_id}","starred_url":"https://api.github.com/users/Nobik2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nobik2/subscriptions","organizations_url":"https://api.github.com/users/Nobik2/orgs","repos_url":"https://api.github.com/users/Nobik2/repos","events_url":"https://api.github.com/users/Nobik2/events{/privacy}","received_events_url":"https://api.github.com/users/Nobik2/received_events","type":"User","site_admin":false},"created_at":"2018-04-30T15:06:49Z","updated_at":"2018-04-30T15:06:49Z","author_association":"NONE","body":"@dhadka \r\nThis is a print out I get after running with a pop size of 25. The simulation gives results its only strange that the algorithm cannot pick them up\r\n\r\n```java\r\nTotal time objective: 48.22                // objective 1\r\nSecond objective: 2488301.1410     // objective 2\r\nSize of Pareto front is: 1\r\nEvaluate called 25 times...\r\nSystem.out.format(\"%.4f      %.4f%n\", solution.getObjective(0), solution.getObjective(1));  //0.0000      0.0000\r\n```\r\n"}}
{"actor":{"display_login":"Nobik2"}}