-
-
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.
- Loading branch information
Showing
9 changed files
with
434 additions
and
58 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
52 changes: 52 additions & 0 deletions
52
src/test/java/org/moeaframework/benchmarks/CarSideImpactTest.java
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,52 @@ | ||
/* Copyright 2009-2024 David Hadka and other contributors | ||
* | ||
* This file is part of the MOEA Framework. | ||
* | ||
* The MOEA Framework is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* The MOEA Framework is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.moeaframework.benchmarks; | ||
|
||
import org.junit.Test; | ||
|
||
public class CarSideImpactTest extends AbstractProblemTest { | ||
|
||
@Test | ||
public void testSolve() { | ||
testSolve("CarSideImpact"); | ||
} | ||
|
||
@Test | ||
public void testReferenceSet() { | ||
testReferenceSet("CarSideImpact"); | ||
} | ||
|
||
@Test | ||
public void testLowerBound() { | ||
testSolution("CarSideImpact", | ||
new double[] { 0.5, 0.45, 0.5, 0.5, 0.875, 0.4, 0.4 }, | ||
new double[] { 15.576004000000003, 4.42725, 13.091381250000001 }, | ||
new double[] { 1.07172109999999998, 0.23405105999999998, 0.20441605000000002, 0.48307069999999996, 29.380924, 32.569465, 39.67975, 4.42725, 10.1256125, 16.05715 }, | ||
false); | ||
} | ||
|
||
@Test | ||
public void testUpperBound() { | ||
testSolution("CarSideImpact", | ||
new double[] { 1.5, 1.35, 1.5, 1.5, 2.625, 1.2, 1.2 }, | ||
new double[] { 42.768012, 3.58525, 10.61064375 }, | ||
new double[] { 0.39336829999999995, 0.17596818000000003, 0.16976335, 0.24501710000000013, 24.512772, 20.246884999999995, 26.319249999999997, 3.58525, 8.3069375, 12.914349999999999 }, | ||
true); | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
src/test/java/org/moeaframework/benchmarks/ElectricMotorTest.java
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,52 @@ | ||
/* Copyright 2009-2024 David Hadka and other contributors | ||
* | ||
* This file is part of the MOEA Framework. | ||
* | ||
* The MOEA Framework is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* The MOEA Framework is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.moeaframework.benchmarks; | ||
|
||
import org.junit.Test; | ||
|
||
public class ElectricMotorTest extends AbstractProblemTest { | ||
|
||
@Test | ||
public void testSolve() { | ||
testSolve("ElectricMotor"); | ||
} | ||
|
||
@Test | ||
public void testReferenceSet() { | ||
testReferenceSet("ElectricMotor"); | ||
} | ||
|
||
@Test | ||
public void testLowerBound() { | ||
testSolution("ElectricMotor", | ||
new double[] { 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1, 100.0, 0.01, 1.0, 0.01, 0.01, 5.0E-4, 0.001, 0.1 }, | ||
new double[] { -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347, -2.1178860361093237E-5, 0.9829575175304347 }, | ||
new double[] { 0.05000000000380373, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.10000000000380374, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.12500000000380374, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.15000000000380373, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.20000000000380375, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.25000000000380374, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.3000000000038037, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.3500000000038037, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.40000000000380376, 288.6959885484, 0.0, 0.0, 0.0, 0.0, 0.5000000000038037, 288.6959885484, 0.0, 0.0, 0.0, 0.0 }, | ||
false); | ||
} | ||
|
||
@Test | ||
public void testUpperBound() { | ||
testSolution("ElectricMotor", | ||
new double[] { 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0, 1500.0, 1.0, 500.0, 1.0, 0.1, 0.1, 0.1, 6.0 }, | ||
new double[] { 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131, 0.08781367214553605, 0.9739676521739131 }, | ||
new double[] { 0.04692963432538349, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.0969296343253835, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.12192963432538349, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.14692963432538347, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.1969296343253835, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.24692963432538348, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.2969296343253835, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.3469296343253835, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.39692963432538353, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0, 0.4969296343253835, 372.03768, 0.0, 583388.4728341918, 0.0, 0.0 }, | ||
false); | ||
} | ||
|
||
} |
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,52 @@ | ||
/* Copyright 2009-2024 David Hadka and other contributors | ||
* | ||
* This file is part of the MOEA Framework. | ||
* | ||
* The MOEA Framework is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* The MOEA Framework is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.moeaframework.benchmarks; | ||
|
||
import org.junit.Test; | ||
|
||
public class GAATest extends AbstractProblemTest { | ||
|
||
@Test | ||
public void testSolve() { | ||
testSolve("GAA"); | ||
} | ||
|
||
@Test | ||
public void testReferenceSet() { | ||
testReferenceSet("GAA"); | ||
} | ||
|
||
@Test | ||
public void testLowerBound() { | ||
testSolution("GAA", | ||
new double[] { 0.24, 7.0, 0.0, 5.5, 19.0, 85.0, 14.0, 3.0, 0.46, 0.24, 7.0, 0.0, 5.5, 19.0, 85.0, 14.0, 3.0, 0.46, 0.24, 7.0, 0.0, 5.5, 19.0, 85.0, 14.0, 3.0, 0.46 }, | ||
new double[] { 73.239998, 1880.3199970000003, 62.38500200000003, 2.1867999999999994, 480.173996, 41699.24730800003, 3032.0586889999995, 15.726500000000003, 189.25630300000014, 1.9229626863835638E-16 }, | ||
new double[] { 0.33805332444444436 }, | ||
false); | ||
} | ||
|
||
@Test | ||
public void testUpperBound() { | ||
testSolution("GAA", | ||
new double[] { 0.48, 11.0, 6.0, 5.968, 25.0, 110.0, 20.0, 3.75, 1.0, 0.48, 11.0, 6.0, 5.968, 25.0, 110.0, 20.0, 3.75, 1.0, 0.48, 11.0, 6.0, 5.968, 25.0, 110.0, 20.0, 3.75, 1.0 }, | ||
new double[] { 75.19549799999994, 2097.8436029999993, 95.00900000000001, 2.078, 291.2477919999998, 47369.88729400002, 891.8127029999995, 17.929600000000004, 198.903706, 0.0 }, | ||
new double[] { 2.3017063231666643 }, | ||
false); | ||
} | ||
|
||
} |
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,52 @@ | ||
/* Copyright 2009-2024 David Hadka and other contributors | ||
* | ||
* This file is part of the MOEA Framework. | ||
* | ||
* The MOEA Framework is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* The MOEA Framework is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.moeaframework.benchmarks; | ||
|
||
import org.junit.Test; | ||
|
||
public class HBVTest extends AbstractProblemTest { | ||
|
||
@Test | ||
public void testSolve() { | ||
testSolve("HBV"); | ||
} | ||
|
||
@Test | ||
public void testReferenceSet() { | ||
testReferenceSet("HBV"); | ||
} | ||
|
||
@Test | ||
public void testLowerBound() { | ||
testSolution("HBV", | ||
new double[] { 0.0, 0.5, 1.0, 10.0, 0.0, 0.3, 0.0, 0.0, 24.0, -3.0, 0.0, 0.0, 0.0, 0.0 }, | ||
new double[] { 9.910673, 3.527903, 1.225312, 1.327312 }, | ||
new double[] { }, | ||
true); | ||
} | ||
|
||
@Test | ||
public void testUpperBound() { | ||
testSolution("HBV", | ||
new double[] { 100.0, 20.0, 100.0, 20000.0, 100.0, 1.0, 2000.0, 7.0, 120.0, 3.0, 20.0, 1.0, 0.8, 7.0 }, | ||
new double[] { 0.9951112, 3.319143, 0.6665916, 0.9936301 }, | ||
new double[] { }, | ||
true); | ||
} | ||
|
||
} |
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,47 @@ | ||
/* Copyright 2009-2024 David Hadka and other contributors | ||
* | ||
* This file is part of the MOEA Framework. | ||
* | ||
* The MOEA Framework is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* The MOEA Framework is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
* License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with the MOEA Framework. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.moeaframework.benchmarks; | ||
|
||
import org.junit.Test; | ||
|
||
public class LRGVTest extends AbstractProblemTest { | ||
|
||
@Test | ||
public void testSolve() { | ||
testSolve("LRGV"); | ||
} | ||
|
||
@Test | ||
public void testLowerBound() { | ||
testSolution("LRGV", | ||
new double[] { 0.0, 0.0, 0.1, 0.1, 0.0, 0.0, 0.0, 0.0 }, | ||
new double[] { 0.0678, 0.5427500000000001, 0.052332950946083, 0.0, 0.0, 8.237323224016374E-67 }, | ||
new double[] { -0.6038095238095238, -0.4517676767676767, 0.0, 0.0 }, | ||
false); | ||
} | ||
|
||
@Test | ||
public void testUpperBound() { | ||
testSolution("LRGV", | ||
new double[] { 1.0, 1.0, 1.0, 0.4, 3.0, 0.0, 3.0, 0.0 }, | ||
new double[] { 0.14687273772049875, 1.0, 0.7396398491493245, 0.0012601974979137415, 7.8E-4, 8.237323224016374E-67 }, | ||
new double[] { 0.0, 0.0, -0.0059376725451394385, 0.0 }, | ||
false); | ||
} | ||
|
||
} |
Oops, something went wrong.