-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor RST_NSGAIII code, add serialization, prepare experiment
Add parameters exploration and exploitation num generations Add parameters numElicitations1,2 and elicitationFrequency Next step is to investigate why MinXZ does not work as good as Central Chebyshev Ranker. Should also change rho value from 0 to small positive, should also replace ideal point located in origin with adjustable one. Also should refactor Gradient Lambda Search - remove unused improvement directions
- Loading branch information
Showing
23 changed files
with
746 additions
and
490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package core; | ||
|
||
import core.points.Solution; | ||
import history.ExecutionHistory; | ||
import solutionRankers.ChebyshevRanker; | ||
import utils.Geometry; | ||
import utils.MyMath; | ||
|
||
public class Evaluator { | ||
public static void evaluateRun(Problem prob, ChebyshevRanker dmr, Population res) { | ||
String pname = prob.getName(); | ||
double targetPoint[] = {}; | ||
|
||
switch(pname){ | ||
case "DTLZ1": | ||
targetPoint = Geometry.lineCrossDTLZ1HyperplanePoint(Geometry.invert(dmr.getLambda())); | ||
break; | ||
case "DTLZ2": | ||
case "DTLZ3": | ||
case "DTLZ4": | ||
targetPoint = Geometry.lineCrossDTLZ234HyperspherePoint(Geometry.invert(dmr.getLambda())); | ||
break; | ||
} | ||
System.out.println("TARGET POINT: "); | ||
for(double d : targetPoint){ | ||
System.out.print(d + " "); | ||
} | ||
System.out.println(); | ||
|
||
System.out.println("PREF: "); | ||
for(int i=0; i< prob.getNumObjectives(); i++){ | ||
double min = Double.MAX_VALUE, sum = 0, max = -Double.MAX_VALUE; | ||
for(Solution s : res.getSolutions()){ | ||
double o = s.getObjective(i); | ||
min = Double.min(min, o); | ||
max = Double.max(max, o); | ||
sum += o; | ||
} | ||
|
||
System.out.println(i + ": " + min + ", " + sum/res.getSolutions().size() + ", "); | ||
} | ||
|
||
if(targetPoint.length > 0){ | ||
ExecutionHistory.getInstance().setFinalMinDist(MyMath.getMinDist(targetPoint, res)); | ||
ExecutionHistory.getInstance().setFinalAvgDist(MyMath.getAvgDist(targetPoint, res)); | ||
} | ||
|
||
ExecutionHistory.getInstance().setLambdasConverged(Lambda.getInstance().converged()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.