Skip to content

Commit

Permalink
Update objectives in tests runtests.jl
Browse files Browse the repository at this point in the history
Updated the objective values in the testset for MOO.
  • Loading branch information
ParasPuneetSingh authored Aug 25, 2024
1 parent c721064 commit 202c88a
Showing 1 changed file with 37 additions and 37 deletions.
74 changes: 37 additions & 37 deletions lib/OptimizationMetaheuristics/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,42 +102,42 @@ function schaffer_n2(x)
return [f1, f2], gx, hx
end
OBJECTIVES = Dict(
"Metaheuristics.Algorithm{NSGA2} for sphere"=> [1.2825775684488987, 5.542698673334447],
"Metaheuristics.Algorithm{NSGA3} for sphere"=> [1.4037392987204247, 5.27960233564319],
"Metaheuristics.Algorithm{SPEA2} for sphere"=> [0.7489097792697987, 6.810116922148639],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for sphere"=> [0.705560866088165, 7.099072840195393],
"Metaheuristics.Algorithm{MOEAD_DE} for sphere"=> [0.07806395081944045, 10.569578390542956],
"Metaheuristics.Algorithm{SMS_EMOA} for sphere"=> [0.1786522135251722, 9.510830918969237],
"Metaheuristics.Algorithm{NSGA2} for rastrigin"=> [0.0, 12.0],
"Metaheuristics.Algorithm{NSGA3} for rastrigin"=> [3.6211843795326253, 8.094700083634313],
"Metaheuristics.Algorithm{SPEA2} for rastrigin"=> [4.621746036074858, 8.865705515641517],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rastrigin"=> [1.1057418927099407, 5.822357866887147],
"Metaheuristics.Algorithm{MOEAD_DE} for rastrigin"=> [4.066568903563153, 8.511756354624936],
"Metaheuristics.Algorithm{SMS_EMOA} for rastrigin"=> [3.713936191157112, 11.089405465875496],
"Metaheuristics.Algorithm{NSGA2} for rosenbrock"=> [13.066572378560455, 631.9299839626948],
"Metaheuristics.Algorithm{NSGA3} for rosenbrock"=> [10.050422620361184, 638.7582963114556],
"Metaheuristics.Algorithm{SPEA2} for rosenbrock"=> [32.65994969150141, 531.6251481922213],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rosenbrock"=> [1.1057418927099407, 5.822357866887147],
"Metaheuristics.Algorithm{MOEAD_DE} for rosenbrock"=> [57.11598017501275, 436.3573486523958],
"Metaheuristics.Algorithm{SMS_EMOA} for rosenbrock"=> [69.55872489888084, 425.9708273845619],
"Metaheuristics.Algorithm{NSGA2} for ackley"=> [3.5426389168269847, 6.192082150329497],
"Metaheuristics.Algorithm{NSGA3} for ackley"=> [2.600939673226922, 6.418843253009765],
"Metaheuristics.Algorithm{SPEA2} for ackley"=> [3.969736656218448, 4.704118905245824],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for ackley"=> [1.1057418927099407, 5.822357866887147],
"Metaheuristics.Algorithm{MOEAD_DE} for ackley"=> [3.014117404434334, 5.189544505776976],
"Metaheuristics.Algorithm{SMS_EMOA} for ackley"=> [2.4105461048882373, 5.915339334024861],
"Metaheuristics.Algorithm{NSGA2} for dtlz2"=> [0.02392674091616439, 0.009783549539645912],
"Metaheuristics.Algorithm{NSGA3} for dtlz2"=> [0.003629941363507031, 0.011059594788256341],
"Metaheuristics.Algorithm{SPEA2} for dtlz2"=> [0.00023267753741465326, 0.08058561661765253],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for dtlz2"=> [1.1057418927099407, 5.822357866887147],
"Metaheuristics.Algorithm{MOEAD_DE} for dtlz2"=> [0.03199207429508088, 0.0012836221622943944],
"Metaheuristics.Algorithm{SMS_EMOA} for dtlz2"=> [0.13316508540906347, 0.0008924220223277544],
"Metaheuristics.Algorithm{NSGA2} for schaffer_n2"=> [2.171298522190922, 0.27716785218921663],
"Metaheuristics.Algorithm{NSGA3} for schaffer_n2"=> [0.0403717729174977, 3.2366626422738527],
"Metaheuristics.Algorithm{SPEA2} for schaffer_n2"=> [2.5115325783832896, 0.17240635672366453],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for schaffer_n2"=> [0.0, 800.0],
"Metaheuristics.Algorithm{MOEAD_DE} for schaffer_n2"=> [0.019151313090508694, 3.4655982357364583],
"Metaheuristics.Algorithm{SMS_EMOA} for schaffer_n2"=> [0.06964400287148177, 3.0140379940103594],
"Metaheuristics.Algorithm{NSGA2} for sphere"=> [0.9179326495423358, 6.500479761845751],
"Metaheuristics.Algorithm{NSGA3} for sphere"=> [1.459119296264428, 5.316958184343253],
"Metaheuristics.Algorithm{SPEA2} for sphere"=> [0.6866588142724173, 7.18284015333389],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for sphere"=> [0.8829537455812262, 6.5718236788783555],
"Metaheuristics.Algorithm{MOEAD_DE} for sphere"=> [0.3976541196796912, 8.117594342458556],
"Metaheuristics.Algorithm{SMS_EMOA} for sphere"=> [0.5003293369817386, 7.837151299208113],
"Metaheuristics.Algorithm{NSGA2} for rastrigin"=> [3.2085851798990426, 11.008095021493556],
"Metaheuristics.Algorithm{NSGA3} for rastrigin"=> [7.651119804304736, 8.720012335441673],
"Metaheuristics.Algorithm{SPEA2} for rastrigin"=> [6.584283198538056, 11.285298996109109],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rastrigin"=> [1.5700038876682554, 4.889538439797789],
"Metaheuristics.Algorithm{MOEAD_DE} for rastrigin"=> [3.630324386882652, 11.255596145071413],
"Metaheuristics.Algorithm{SMS_EMOA} for rastrigin"=> [2.429354909458187, 10.665738548398641],
"Metaheuristics.Algorithm{NSGA2} for rosenbrock"=> [8.289098963014444, 690.3540872929669],
"Metaheuristics.Algorithm{NSGA3} for rosenbrock"=> [5.809098608164398, 677.7633682236716] ,
"Metaheuristics.Algorithm{SPEA2} for rosenbrock"=> [78.91822306586232, 426.30261147533],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rosenbrock"=> [1.5700038876682554, 4.889538439797789],
"Metaheuristics.Algorithm{MOEAD_DE} for rosenbrock"=> [14.107118783363653, 615.3036153255869],
"Metaheuristics.Algorithm{SMS_EMOA} for rosenbrock"=> [30.756427683784672, 542.6831635776932],
"Metaheuristics.Algorithm{NSGA2} for ackley"=> [2.240787163704834, 5.990002878952371],
"Metaheuristics.Algorithm{NSGA3} for ackley"=> [4.440892098500626e-16, 6.593599079287213],
"Metaheuristics.Algorithm{SPEA2} for ackley"=> [2.6329825257456503, 6.060788875236632],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for ackley"=> [1.5700038876682554, 4.889538439797789],
"Metaheuristics.Algorithm{MOEAD_DE} for ackley"=> [4.440892098500626e-16, 6.593599079287213],
"Metaheuristics.Algorithm{SMS_EMOA} for ackley"=> [2.1417573971815256, 6.015324307249184],
"Metaheuristics.Algorithm{NSGA2} for dtlz2"=> [0.013283104966270814, 0.010808186786590583],
"Metaheuristics.Algorithm{NSGA3} for dtlz2"=> [0.013428265441897881, 0.03589930489326534],
"Metaheuristics.Algorithm{SPEA2} for dtlz2"=> [0.019006068021099495, 0.0009905093731377751],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for dtlz2"=> [1.5700038876682554, 4.889538439797789],
"Metaheuristics.Algorithm{MOEAD_DE} for dtlz2"=> [0.027075258566241527, 0.00973958317460759],
"Metaheuristics.Algorithm{SMS_EMOA} for dtlz2"=> [0.056304481489060705, 0.026075248436234502],
"Metaheuristics.Algorithm{NSGA2} for schaffer_n2"=> [1.4034569322987955, 0.6647534264038837],
"Metaheuristics.Algorithm{NSGA3} for schaffer_n2"=> [0.9679143048226242, 1.0326088684985277],
"Metaheuristics.Algorithm{SPEA2} for schaffer_n2"=> [0.24369709729308642, 2.269069649724968],
"Metaheuristics.Algorithm{CCMO{NSGA2}} for schaffer_n2"=> [3.632401400816196e-17, 4.9294679997494206e-17],
"Metaheuristics.Algorithm{MOEAD_DE} for schaffer_n2"=> [0.059772358446876686, 3.0818369131591896],
"Metaheuristics.Algorithm{SMS_EMOA} for schaffer_n2"=> [0.4978888767998813, 1.67543922644328],
)
# Define the testset
@testset "Multi-Objective Optimization with Various Functions and Metaheuristics" begin
Expand Down Expand Up @@ -185,7 +185,7 @@ OBJECTIVES = Dict(
key = "$alg_name for $prob_name"
value = OBJECTIVES[key]
objectives = sol.objective
@test value==objectives
@test value objectives atol=1e-1
end
end
end
Expand Down

0 comments on commit 202c88a

Please sign in to comment.