diff --git a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/dtlz/DTLZModule.java b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/dtlz/DTLZModule.java index 9122316a..87b6dc36 100644 --- a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/dtlz/DTLZModule.java +++ b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/dtlz/DTLZModule.java @@ -1,28 +1,24 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.benchmarks.dtlz; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.MAY; + import org.opt4j.benchmarks.BinaryCreator; import org.opt4j.benchmarks.BinaryToDoubleDecoder; import org.opt4j.benchmarks.Bits; @@ -30,6 +26,7 @@ import org.opt4j.benchmarks.DoubleCreator; import org.opt4j.benchmarks.M; import org.opt4j.benchmarks.N; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Order; import org.opt4j.core.config.annotations.Required; @@ -40,14 +37,13 @@ import org.opt4j.core.start.Constant; /** - * Module for the DTLZ benchmarks as proposed in "Scalable multi-objective - * optimization test problems, Kalyanmoy Deb,Lothar Thiele, Marco Laumanns, - * Eckart Zitzler, Proc. Congress Evolutionary Computation Volume 1 (May 2002)". + * Module for the DTLZ benchmarks as proposed in Deb et al. 2002. * * @author lukasiewycz * */ @Info("DTLZ Problem Suite. (n = m + k - 1)") +@Citation(title = "Scalable multi-objective optimization test problems", authors = "Kalyanmoy Deb, Lothar Thiele, Marco Laumanns, and Eckart Zitzler", journal = "Proceedings of the 2002 Congress on Evolutionary Computation", volume = 1, month = MAY, year = 2002, doi = "10.1109/CEC.2002.1007032") public class DTLZModule extends ProblemModule { @Order(0) diff --git a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/knapsack/KnapsackModule.java b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/knapsack/KnapsackModule.java index 256b4a1c..d3d4639b 100644 --- a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/knapsack/KnapsackModule.java +++ b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/knapsack/KnapsackModule.java @@ -1,27 +1,25 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ package org.opt4j.benchmarks.knapsack; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.NOVEMBER; + +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.File; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Required; @@ -29,19 +27,16 @@ import org.opt4j.core.start.Constant; /** - * The multiobjective 0/1 ILP knapsack problem as proposed in "E. Zitzler and L. - * Thiele: Multiobjective evolutionary algorithms: A comparative case study and - * the strength Pareto approach. IEEE Transactions on Evolutionary Computation, - * vol. 3, no. 4, pp. 257-271, Nov. 1999.". Either one of the nine benchmark - * problems from Zitzler and Thiele 1999 can be selected or the number of - * knapsacks and items can be set manually. + * The multiobjective 0/1 ILP knapsack problem as proposed in Zitzler and Thiele 1999. Either one of the nine benchmark + * problems from Zitzler and Thiele 1999 can be selected or the number of knapsacks and items can be set manually. * - * @see http://www.tik.ee.ethz.ch/sop/download/supplementary/testProblemSuite/ + * @see http://www.tik.ee.ethz.ch/sop/download/supplementary/testProblemSuite/ * * @author reimann, lukasiewycz * */ +@Citation(authors = "Eckart Zitzler and Lothar Thiele", title = "Multiobjective evolutionary algorithms: A comparative case study and the strength Pareto approach", journal = "IEEE Transactions on Evolutionary Computation", volume = 3, number = 4, pageFirst = 257, pageLast = 271, month = NOVEMBER, year = 1999) public class KnapsackModule extends ProblemModule { protected int knapsacks = 5; @@ -140,7 +135,8 @@ protected void config() { KnapsackProfitEvaluator.class); break; case SAT: - bindProblem(KnapsackSATCreatorDecoder.class, KnapsackSATCreatorDecoder.class, KnapsackProfitEvaluator.class); + bindProblem(KnapsackSATCreatorDecoder.class, KnapsackSATCreatorDecoder.class, + KnapsackProfitEvaluator.class); break; } addEvaluator(KnapsackOverloadEvaluator.class); diff --git a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/wfg/WFGModule.java b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/wfg/WFGModule.java index 74e3cb3a..1228c356 100644 --- a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/wfg/WFGModule.java +++ b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/wfg/WFGModule.java @@ -8,8 +8,8 @@ * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -19,7 +19,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *******************************************************************************/ - package org.opt4j.benchmarks.wfg; @@ -31,6 +30,8 @@ import org.opt4j.benchmarks.K; import org.opt4j.benchmarks.M; import org.opt4j.benchmarks.N; +import org.opt4j.core.config.annotations.Citation; +import org.opt4j.core.config.annotations.Citation.PublicationMonth; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Order; import org.opt4j.core.config.annotations.Required; @@ -40,14 +41,13 @@ import org.opt4j.core.problem.ProblemModule; /** - * Module for the WFG (Walking Fish Group) benchmarks, see "A Scalable - * Multi-objective Test Problem Toolkit, Simon Huband, Luigi Barone, R. Lyndon - * While, and Philip Hingston (EMO 2005)". + * Module for the WFG (Walking Fish Group) benchmarks, see Huband et al. 2005. * * @author lukasiewycz * */ @Info("WFG Problem Suite. The number of search variables is n=k+l.") +@Citation(title = "A Scalable Multi-objective Test Problem Toolkit", authors = "Simon Huband, Luigi Barone, Lyndon While, and Philip Hingston", journal = "Evolutionary Multi-Criterion Optimization", pageFirst = 280, pageLast = 295, year = 2005, month = PublicationMonth.UNKNOWN, doi = "10.1007/978-3-540-31880-4_20") public class WFGModule extends ProblemModule { @Order(0) diff --git a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/zdt/ZDTModule.java b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/zdt/ZDTModule.java index 76ff0731..de02bc73 100644 --- a/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/zdt/ZDTModule.java +++ b/opt4j-benchmarks/src/main/java/org/opt4j/benchmarks/zdt/ZDTModule.java @@ -8,8 +8,8 @@ * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -19,7 +19,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *******************************************************************************/ - package org.opt4j.benchmarks.zdt; @@ -30,6 +29,8 @@ import org.opt4j.benchmarks.DoubleCopyDecoder; import org.opt4j.benchmarks.DoubleCreator; import org.opt4j.benchmarks.N; +import org.opt4j.core.config.annotations.Citation; +import org.opt4j.core.config.annotations.Citation.PublicationMonth; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Order; import org.opt4j.core.config.annotations.Required; @@ -39,15 +40,13 @@ import org.opt4j.core.problem.ProblemModule; /** - * The {@link ZDTModule} configures the ZDT benchmarks, see "Comparison of - * Multiobjective Evolutionary Algorithms: Empirical Results, Eckart Zitzler, - * Kalyanmoy Deb, Lothar Thiele, Evolutionary Computation Volume 8 , Issue 2 - * (June 2000)". + * The {@link ZDTModule} configures the ZDT benchmarks, see Zitzler et al. 2000. * * @author lukasiewycz * */ @Info("ZDT Problem Suite.") +@Citation(title = "Comparison of Multiobjective Evolutionary Algorithms: Empirical Results", authors = "Eckart Zitzler, Kalyanmoy Deb, and Lothar Thiele", journal = "Evolutionary Computation Volume", volume = 8, number = 2, month = PublicationMonth.JUNE, year = 2000) public class ZDTModule extends ProblemModule { @Order(0) diff --git a/opt4j-core/src/main/java/org/opt4j/core/common/archive/AdaptiveGridArchive.java b/opt4j-core/src/main/java/org/opt4j/core/common/archive/AdaptiveGridArchive.java index 943b9bbe..56e80e70 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/common/archive/AdaptiveGridArchive.java +++ b/opt4j-core/src/main/java/org/opt4j/core/common/archive/AdaptiveGridArchive.java @@ -1,23 +1,18 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ package org.opt4j.core.common.archive; @@ -38,10 +33,9 @@ import com.google.inject.Inject; /** - * The {@link AdaptiveGridArchive} uses an adaptive grid in order to bound the - * size of the {@link Archive}, see "Properties of an Adaptive Archiving - * Algorithm for Storing Nondominated Vectors, J. Knowles, D. Corne, - * Transactions of Evolutionary Computation, Vol. 7, No. 2, April 2003". + * The {@link AdaptiveGridArchive} uses an adaptive grid in order to bound the size of the {@link Archive}, see + * "Properties of an Adaptive Archiving Algorithm for Storing Nondominated Vectors, J. Knowles, D. Corne, Transactions + * of Evolutionary Computation, Vol. 7, No. 2, April 2003". * * @author lukasiewycz, helwig * @@ -119,9 +113,7 @@ public AdaptiveGridArchive(@Constant(value = "capacity", namespace = BoundedArch /* * (non-Javadoc) * - * @see - * org.opt4j.common.archive.AbstractArchive#updateWithNondominated(java. - * util.Collection) + * @see org.opt4j.common.archive.AbstractArchive#updateWithNondominated(java. util.Collection) */ @Override protected boolean updateWithNondominated(Collection candidates) { @@ -277,8 +269,7 @@ public boolean remove(Object o) { } /** - * Adds all {@link Individual}s to theirs {@link Cell}s and the {@link Cell} - * s to the {@link Archive}. + * Adds all {@link Individual}s to theirs {@link Cell}s and the {@link Cell} s to the {@link Archive}. * * @param individuals * the individuals to be added @@ -292,9 +283,8 @@ protected void addToCell(Iterable individuals) { } /** - * Removes this {@link Individual} from its {@link Cell} and removes the - * {@link Cell} from the {@link org.opt4j.core.optimizer.Archive} if it is - * empty. + * Removes this {@link Individual} from its {@link Cell} and removes the {@link Cell} from the + * {@link org.opt4j.core.optimizer.Archive} if it is empty. * * @param individual * the individual to be removed @@ -308,8 +298,7 @@ protected void removeFromCell(Individual individual) { } /** - * Determines the new bounds for the individuals and returns {@code true} if - * the bounds have changed. + * Determines the new bounds for the individuals and returns {@code true} if the bounds have changed. * * @param individuals * the individuals diff --git a/opt4j-core/src/main/java/org/opt4j/core/common/archive/ArchiveModule.java b/opt4j-core/src/main/java/org/opt4j/core/common/archive/ArchiveModule.java index 459bf775..ff95d1fa 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/common/archive/ArchiveModule.java +++ b/opt4j-core/src/main/java/org/opt4j/core/common/archive/ArchiveModule.java @@ -1,29 +1,27 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.core.common.archive; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.APRIL; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.AUGUST; + import org.opt4j.core.config.Icons; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Icon; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Required; @@ -32,8 +30,7 @@ import org.opt4j.core.start.Opt4JModule; /** - * The {@link ArchiveModule} determines an implementation for the - * {@link Archive} interface. + * The {@link ArchiveModule} determines an implementation for the {@link Archive} interface. * * @see UnboundedArchive * @see PopulationArchive @@ -56,6 +53,7 @@ public class ArchiveModule extends Opt4JModule { protected int capacity = 100; @Info("Divisions for the adaptive grid archive. A convergence is guaranteed if 'capacity>1+div^m+(div-1)^m+2*m' with m being the number of objectives holds") + @Citation(title = "Properties of an Adaptive Archiving Algorithm for Storing Nondominated Vectors", authors = "Joshua Knowles and David Corne", journal = "Transactions of Evolutionary Computation", volume = 7, number = 2, month = APRIL, year = 2003) @Required(property = "type", elements = { "ADAPTIVE_GRID" }) @Constant(value = "div", namespace = AdaptiveGridArchive.class) protected int divisions = 7; @@ -84,6 +82,7 @@ public enum Type { * @see AdaptiveGridArchive */ @Info("Adaptive grid archive") + @Citation(title = "Properties of an Adaptive Archiving Algorithm for Storing Nondominated Vectors", authors = "Joshua Knowles and David Corne", journal = "Transactions of Evolutionary Computation", volume = 7, number = 2, month = APRIL, year = 2003) ADAPTIVE_GRID, /** @@ -92,6 +91,7 @@ public enum Type { * @see CrowdingArchive */ @Info("Bounded archive based on the crowding distance (NSGA2)") + @Citation(title = "A fast and elitist multiobjective genetic algorithm : NSGA-II", authors = "Kalyanmoy Deb, Amrit Pratap, Samir Agarwal, and Tanaka Meyarivan", journal = "IEEETransactions on Evolutionary Computation", pageFirst = 182, pageLast = 197, month = AUGUST, year = 2002) CROWDING; } diff --git a/opt4j-core/src/main/java/org/opt4j/core/common/archive/Crowding.java b/opt4j-core/src/main/java/org/opt4j/core/common/archive/Crowding.java index 84a8c07a..bac338ff 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/common/archive/Crowding.java +++ b/opt4j-core/src/main/java/org/opt4j/core/common/archive/Crowding.java @@ -1,25 +1,20 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - + package org.opt4j.core.common.archive; import java.util.ArrayList; @@ -33,19 +28,17 @@ import org.opt4j.core.Individual; /** - * The {@link Crowding}, see "A fast and elitist multiobjective genetic - * algorithm : NSGA-II, K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan - * Evolutionary Computation, IEEETransactions on, vol. 6, no. 2, pp. 182-197, - * August 2002.", calculates the crowding distance of {@link Individual}s as - * used for instance in the the {@code Nsga2} algorithm. A bounding box around - * each individual is defined and restricted by the neighboring individuals in - * each dimension. The crowding distance is the sum of the side-lengths of the - * bounding box. If an individual does not have neighbors on all sides, the - * crowding distance is maximal. A normalization in each dimension is applied. + * The {@link Crowding}, see "A fast and elitist multiobjective genetic algorithm : NSGA-II, K. Deb, A. Pratap, S. + * Agarwal, and T. Meyarivan Evolutionary Computation, IEEETransactions on, vol. 6, no. 2, pp. 182-197, August 2002.", + * calculates the crowding distance of {@link Individual}s as used for instance in the the {@code Nsga2} algorithm. A + * bounding box around each individual is defined and restricted by the neighboring individuals in each dimension. The + * crowding distance is the sum of the side-lengths of the bounding box. If an individual does not have neighbors on all + * sides, the crowding distance is maximal. A normalization in each dimension is applied. * * @author lukasiewycz * */ + public class Crowding implements FrontDensityIndicator { /** @@ -97,9 +90,8 @@ public int compare(Individual o1, Individual o2) { } /** - * Returns an ordered list of the {@link Individual}s corresponding to their - * crowding distance. {@link Individual}s with a high crowding distance are - * sorted to the front. + * Returns an ordered list of the {@link Individual}s corresponding to their crowding distance. {@link Individual}s + * with a high crowding distance are sorted to the front. * * @param values * the map of individuals to their crowding distance values @@ -119,9 +111,7 @@ public int compare(Individual o1, Individual o2) { /* * (non-Javadoc) * - * @see - * org.opt4j.optimizer.ea.FrontDensityIndicator#getDensityValues(java.util - * .Collection) + * @see org.opt4j.optimizer.ea.FrontDensityIndicator#getDensityValues(java.util .Collection) */ @Override public Map getDensityValues(Collection individuals) { diff --git a/opt4j-core/src/main/java/org/opt4j/core/config/annotations/Citation.java b/opt4j-core/src/main/java/org/opt4j/core/config/annotations/Citation.java new file mode 100644 index 00000000..752a196d --- /dev/null +++ b/opt4j-core/src/main/java/org/opt4j/core/config/annotations/Citation.java @@ -0,0 +1,146 @@ +package org.opt4j.core.config.annotations; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; +import java.time.DateTimeException; +import java.time.Month; + +import org.opt4j.core.start.Opt4JModule; + +/** + * The {@link Citation} can be used in {@link Opt4JModule}s to add citations to + * scientific works. + * + * Example: + * + *
+ * @Citation(title     = "Opt4J: A Modular Framework for Meta-heuristic Optimization",
+ *           authors   = "Martin Lukasiewycz, Michael Glaß, Felix Reimann, and Jürgen Teich",
+ *           journal   = "Proceedings of the 13th Annual Conference on Genetic and Evolutionary Computation",
+ *           pageFirst = 1723
+ *           pageLast  = 1730
+ *           volume    = 13
+ *           number    = 1
+ *           month     = PublicationMonth.JULY,
+ *           year      = 2011,
+ *           doi       = "10.1145/2001576.2001808")
+ * 
+ * + * @author Felix Reimann + * + */ +@Retention(RUNTIME) +@Target({ METHOD, TYPE, FIELD }) +@Documented +public @interface Citation { + enum PublicationMonth { + UNKNOWN, JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER; + + public Month toMonth() { + switch (this) { + case JANUARY: + return Month.JANUARY; + case FEBRUARY: + return Month.FEBRUARY; + case MARCH: + return Month.MARCH; + case APRIL: + return Month.APRIL; + case MAY: + return Month.MAY; + case JUNE: + return Month.JUNE; + case JULY: + return Month.JULY; + case AUGUST: + return Month.AUGUST; + case SEPTEMBER: + return Month.SEPTEMBER; + case OCTOBER: + return Month.OCTOBER; + case NOVEMBER: + return Month.NOVEMBER; + case DECEMBER: + return Month.DECEMBER; + default: + throw new DateTimeException("publication month is unkown"); + } + } + } + + /** + * The title. + * + * @return the title of the citation + */ + String title(); + + /** + * The authors of the work. + * + * @return the authors + */ + String authors() default ""; + + /** + * The volume of the journal. + * + * @return the volume + */ + int volume() default -1; + + /** + * The number of the journal issue. + * + * @return the number + */ + int number() default -1; + + /** + * The month, in which the paper has been published. + * + * @return the month + */ + PublicationMonth month(); + + /** + * The year, in which the paper has been published. + * + * @return the year + */ + int year(); + + /** + * The journal, in which the paper has been published. + * + * @return the title of the journal + */ + String journal() default ""; + + /** + * The number of the page, where the paper starts. + * + * @return the first page + */ + int pageFirst() default -1; + + /** + * The number of the page, where the paper ends. + * + * @return the last page + */ + int pageLast() default -1; + + /** + * The Digital Object Identifier of the work. + * + * @return the doi + */ + String doi() default ""; +} diff --git a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/DialogLayout.java b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/DialogLayout.java index 57484130..21e75232 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/DialogLayout.java +++ b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/DialogLayout.java @@ -8,8 +8,8 @@ * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -19,7 +19,6 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. *******************************************************************************/ - package org.opt4j.core.config.visualization; @@ -32,10 +31,10 @@ /** * The {@link DialogLayout} is used for label-field pair layout. * - * @see http://www.javafaq.nu/java-allbooks-8.html - * @see http://www.javafaq.nu/java-bookpage-15-5.html + * @see http://www.javafaq.nu/java-allbooks-8.html + * @see http://www.javafaq.nu/java-bookpage-15-5.html * * @author lukasiewycz * @@ -141,7 +140,6 @@ public void layoutContainer(Container parent) { int w = parent.getWidth() - insets.left - insets.right - divider; int x = insets.left; int y = insets.top; - for (int k = 1; k < parent.getComponentCount(); k += 2) { Component comp1 = parent.getComponent(k - 1); Component comp2 = parent.getComponent(k); @@ -163,7 +161,7 @@ public void layoutContainer(Container parent) { protected int getDivider(Container parent) { Insets insets = parent.getInsets(); - int half = (parent.getWidth() - insets.left - insets.right) / 2; + int half = (parent.getWidth() - insets.left - insets.right) / 4; int divider = 0; @@ -174,7 +172,6 @@ protected int getDivider(Container parent) { } divider += hGap; - return Math.max(divider, half); } diff --git a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/Format.java b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/Format.java index 002c11f0..601ea187 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/Format.java +++ b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/Format.java @@ -1,28 +1,26 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.core.config.visualization; +import static java.time.format.TextStyle.FULL; +import static java.util.Locale.ENGLISH; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.UNKNOWN; + import java.lang.reflect.Field; import javax.swing.ImageIcon; @@ -31,6 +29,7 @@ import org.opt4j.core.config.Property; import org.opt4j.core.config.PropertyModule; import org.opt4j.core.config.annotations.Category; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Icon; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Name; @@ -105,6 +104,11 @@ public String getTooltip(Class c) { if (info != null) { text += xmlBreak + info; } + + Citation citation = c.getAnnotation(Citation.class); + if (citation != null) + text += xmlBreak + xmlBreak + "[" + formatIEEE(citation) + "]"; + text += ""; return text; @@ -236,6 +240,10 @@ public String getTooltip(Property property) { if (i != null) { text += i.value(); } + + Citation c = field.getAnnotation(Citation.class); + if (c != null) + text += "  [" + formatIEEE(c) + "]"; text += xmlBreak; } } @@ -256,4 +264,65 @@ public String getTooltip(Property property) { public String formatTooltip(String text) { return "" + text.replaceAll("\n", xmlBreak) + ""; } + + public static String formatIEEE(Citation citation) { + StringBuilder builder = new StringBuilder(citation.authors()); + builder.append(": ").append(citation.title()).append(". "); + if (!citation.journal().isEmpty()) { + builder.append("In: ").append(citation.journal()).append(". "); + } + if (citation.volume() >= 0) { + builder.append("vol. ").append(citation.volume()).append(", "); + } + if (citation.number() >= 0) { + builder.append("no. ").append(citation.number()).append(", "); + } + if (citation.pageFirst() >= 0) { + if (citation.pageLast() > 0 && citation.pageFirst() != citation.pageLast()) { + builder.append("pp. ").append(citation.pageFirst()).append("–").append(citation.pageLast()) + .append(", "); + } else { + builder.append("p. ").append(citation.pageFirst()).append(", "); + } + } + if (citation.month() != UNKNOWN) { + builder.append(citation.month().toMonth().getDisplayName(FULL, ENGLISH)).append(" "); + } + builder.append(citation.year()).append("."); + + if (!citation.doi().isEmpty()) { + builder.append(" ").append(citation.doi()) + .append(""); + } + return builder.toString(); + } + + public static String formatJava(Citation citation) { + StringBuilder builder = new StringBuilder(); + if (!citation.authors().isEmpty()) + builder.append(citation.authors()).append(": "); + builder.append("\"").append(citation.title()).append("\". "); + if (!citation.journal().isEmpty()) + builder.append("In: ").append(citation.journal()).append(". "); + if (citation.volume() >= 0) + builder.append("vol. ").append(citation.volume()).append(", "); + if (citation.number() >= 0) + builder.append("no. ").append(citation.number()).append(", "); + if (citation.pageFirst() >= 0) { + if (citation.pageLast() > 0 && citation.pageFirst() != citation.pageLast()) { + builder.append("pp. ").append(citation.pageFirst()).append("–").append(citation.pageLast()) + .append(", "); + } else { + builder.append("p. ").append(citation.pageFirst()).append(", "); + } + } + if (citation.month() != UNKNOWN) { + builder.append(citation.month().toMonth().getDisplayName(FULL, ENGLISH)).append(" "); + } + builder.append(citation.year()).append("."); + if (!citation.doi().isEmpty()) { + builder.append(" https://doi.org/").append(citation.doi()); + } + return builder.toString(); + } } diff --git a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/PropertyPanel.java b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/PropertyPanel.java index 2b47247b..f4d95ebe 100644 --- a/opt4j-core/src/main/java/org/opt4j/core/config/visualization/PropertyPanel.java +++ b/opt4j-core/src/main/java/org/opt4j/core/config/visualization/PropertyPanel.java @@ -1,18 +1,23 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated - * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the - * Software. + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. *******************************************************************************/ package org.opt4j.core.config.visualization; @@ -20,14 +25,22 @@ import java.awt.BorderLayout; import java.awt.Component; import java.awt.Cursor; +import java.awt.Desktop; +import java.awt.Dimension; import java.awt.FlowLayout; +import java.awt.TextArea; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.io.IOException; import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; @@ -38,6 +51,7 @@ import javax.swing.JFileChooser; import javax.swing.JLabel; import javax.swing.JPanel; +import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.SwingConstants; import javax.swing.filechooser.FileFilter; @@ -46,11 +60,12 @@ import org.opt4j.core.config.Property; import org.opt4j.core.config.PropertyModule; import org.opt4j.core.config.Requirement; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.File; /** - * The {@link PropertyPanel} is a panel for the configuration of one module. Properties and values are arranged in a - * table. + * The {@link PropertyPanel} is a panel for the configuration of one module. + * Properties and values are arranged in a table. * * @author lukasiewycz * @@ -69,7 +84,8 @@ public class PropertyPanel extends JPanel { protected final Map components = new HashMap(); /** - * Constructs a {@link PropertyPanel} for one {@link PropertyModule} instance. + * Constructs a {@link PropertyPanel} for one {@link PropertyModule} + * instance. * * @param module * the instance of the {@link PropertyModule} @@ -88,11 +104,10 @@ public PropertyPanel(PropertyModule module, FileChooser fileChooser, Format form panel = new JPanel(new DialogLayout(20, 2)); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); - updatePropertyPanel(); - update(); - setLayout(new BorderLayout()); add(BorderLayout.NORTH, panel); + + update(); } protected Component createComponent(final Property property) { @@ -265,6 +280,78 @@ public void actionPerformed(ActionEvent e) { panel.add(component); } } + + if (module.getModule().getClass().isAnnotationPresent(Citation.class)) { + Citation citation = module.getModule().getClass().getAnnotation(Citation.class); + addReferenceRow(citation); + } + } + + /** + * Adds a row showing the {@link Citation}. On the left hand side, + * "reference" is printed while on the right hand side, the {@link Citation} + * is added in a static {@link TextArea}. + * + * @param citation + * the citation to add + */ + protected void addReferenceRow(Citation citation) { + JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); + JLabel label = new JLabel("reference"); + label.setFocusable(false); + labelPanel.add(label); + + panel.add(labelPanel); + + final JTextArea field = new JTextArea(); + field.setLineWrap(true); + field.setWrapStyleWord(true); + field.setFont(label.getFont()); + field.setBackground(label.getBackground()); + field.setEditable(false); + field.setText(Format.formatJava(citation)); + System.out.println("title: " + citation.title()); + System.out.println("formatJava: " + Format.formatJava(citation)); + + if (!citation.doi().isEmpty()) { + final String doi = citation.doi(); + field.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + field.addMouseListener(new MouseListener() { + + @Override + public void mouseReleased(MouseEvent e) { + } + + @Override + public void mousePressed(MouseEvent e) { + } + + @Override + public void mouseExited(MouseEvent e) { + } + + @Override + public void mouseEntered(MouseEvent e) { + } + + @Override + public void mouseClicked(MouseEvent e) { + try { + Desktop.getDesktop().browse(new URI("https://doi.org/" + doi)); + } catch (IOException e1) { + e1.printStackTrace(); + } catch (URISyntaxException e1) { + e1.printStackTrace(); + } + } + }); + } + + JPanel rightPanel = new JPanel(new BorderLayout()); + rightPanel.add(BorderLayout.NORTH, field); + rightPanel.setPreferredSize( + new Dimension((int) (panel.getPreferredSize().width * 0.70), panel.getPreferredSize().height)); + panel.add(rightPanel); } protected void update() { diff --git a/opt4j-core/src/test/java/org/opt4j/core/config/annotations/CitationTest.java b/opt4j-core/src/test/java/org/opt4j/core/config/annotations/CitationTest.java new file mode 100644 index 00000000..93e520eb --- /dev/null +++ b/opt4j-core/src/test/java/org/opt4j/core/config/annotations/CitationTest.java @@ -0,0 +1,36 @@ +package org.opt4j.core.config.annotations; + +import java.time.DateTimeException; +import java.time.Month; + +import org.junit.Assert; +import org.junit.Test; +import org.opt4j.core.config.annotations.Citation.PublicationMonth; + +public class CitationTest { + @Test + public void toMonth() { + Assert.assertEquals(Month.JANUARY, PublicationMonth.JANUARY.toMonth()); + Assert.assertEquals(Month.FEBRUARY, PublicationMonth.FEBRUARY.toMonth()); + Assert.assertEquals(Month.MARCH, PublicationMonth.MARCH.toMonth()); + Assert.assertEquals(Month.APRIL, PublicationMonth.APRIL.toMonth()); + Assert.assertEquals(Month.MAY, PublicationMonth.MAY.toMonth()); + Assert.assertEquals(Month.JUNE, PublicationMonth.JUNE.toMonth()); + Assert.assertEquals(Month.JULY, PublicationMonth.JULY.toMonth()); + Assert.assertEquals(Month.AUGUST, PublicationMonth.AUGUST.toMonth()); + Assert.assertEquals(Month.SEPTEMBER, PublicationMonth.SEPTEMBER.toMonth()); + Assert.assertEquals(Month.OCTOBER, PublicationMonth.OCTOBER.toMonth()); + Assert.assertEquals(Month.NOVEMBER, PublicationMonth.NOVEMBER.toMonth()); + Assert.assertEquals(Month.DECEMBER, PublicationMonth.DECEMBER.toMonth()); + } + + @Test(expected = DateTimeException.class) + public void toMonthUnkown() { + PublicationMonth.UNKNOWN.toMonth(); + } + + @Test + public void valueOf() { + Assert.assertEquals(PublicationMonth.JANUARY, PublicationMonth.valueOf("JANUARY")); + } +} diff --git a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Hypervolume.java b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Hypervolume.java index 93dc85fd..cb7d73bc 100644 --- a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Hypervolume.java +++ b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Hypervolume.java @@ -1,25 +1,19 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.optimizers.ea; @@ -40,13 +34,11 @@ import com.google.inject.Inject; /** - * The {@link Hypervolume}, see "Zitzler, E., and Thiele, L. (1998): - * Multiobjective Optimization Using Evolutionary Algorithms - A Comparative - * Case Study. Parallel Problem Solving from Nature (PPSN-V), 292-301." is a - * {@link FrontDensityIndicator} based on determination of the hypervolume - * contribution. The calculation is based on a normalization between 0 and 1 in - * each dimension and a transformation to a maximization problem. Additionally - * an offset value (default 1) is added to each dimension. + * The {@link Hypervolume}, see "Zitzler, E., and Thiele, L. (1998): Multiobjective Optimization Using Evolutionary + * Algorithms - A Comparative Case Study. Parallel Problem Solving from Nature (PPSN-V), 292-301." is a + * {@link FrontDensityIndicator} based on determination of the hypervolume contribution. The calculation is based on a + * normalization between 0 and 1 in each dimension and a transformation to a maximization problem. Additionally an + * offset value (default 1) is added to each dimension. * * * @see SMSModule @@ -64,8 +56,7 @@ public class Hypervolume implements FrontDensityIndicator { * Constructs a {@link Hypervolume}. * * @param offset - * the offset that is added to each dimension before the - * hypervolume is calculated + * the offset that is added to each dimension before the hypervolume is calculated */ @Inject public Hypervolume(@Constant(value = "offset", namespace = Hypervolume.class) double offset) { @@ -75,9 +66,7 @@ public Hypervolume(@Constant(value = "offset", namespace = Hypervolume.class) do /* * (non-Javadoc) * - * @see - * org.opt4j.optimizer.ea.FrontDensityIndicator#getDensityValues(java.util - * .Collection) + * @see org.opt4j.optimizer.ea.FrontDensityIndicator#getDensityValues(java.util .Collection) */ @Override public Map getDensityValues(Collection individuals) { @@ -85,11 +74,10 @@ public Map getDensityValues(Collection individua } /** - * Calculates the density values for a front of non-dominated individuals - * based on the contribution of the {@link Hypervolume}. + * Calculates the density values for a front of non-dominated individuals based on the contribution of the + * {@link Hypervolume}. * - * A special approach for two dimension exists as well as a general approach - * for n dimensions. + * A special approach for two dimension exists as well as a general approach for n dimensions. * * @param individuals * the individuals @@ -182,8 +170,7 @@ public int compare(double[] o1, double[] o2) { } /** - * Transforms the non-dominated {@link Individual}s to a front where each - * objective is to be minimized. + * Transforms the non-dominated {@link Individual}s to a front where each objective is to be minimized. * * @param individuals * the individuals @@ -238,8 +225,8 @@ protected List normalize(List front) { } /** - * Inverts (from a minimization to a maximization problem) a front of - * solutions and adds an offset value to each dimension. + * Inverts (from a minimization to a maximization problem) a front of solutions and adds an offset value to each + * dimension. * * @param front * the front of non-dominated solutions @@ -266,9 +253,8 @@ protected List invert(List front, double offset) { } /** - * Implements the {@link Hypervolume} calculations as proposed by Zitzler, - * E., and Thiele, L. (1998). All points have positive values in all - * dimensions and the hypervolume is calculated from 0. + * Implements the {@link Hypervolume} calculations as proposed by Zitzler, E., and Thiele, L. (1998). All points + * have positive values in all dimensions and the hypervolume is calculated from 0. * * @param front * the front of non-dominated solutions diff --git a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Nsga2Module.java b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Nsga2Module.java index 3a3f97eb..4e80f4da 100644 --- a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Nsga2Module.java +++ b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Nsga2Module.java @@ -1,30 +1,27 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.optimizers.ea; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.UNKNOWN; + import org.opt4j.core.common.archive.Crowding; import org.opt4j.core.common.archive.FrontDensityIndicator; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.start.Constant; @@ -37,6 +34,7 @@ * */ @Info("A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization") +@Citation(title = "A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization: NSGA-II", authors = "Kalyanmoy Deb, Samir Agrawal, Amrit Pratap, and Tanaka Meyarivan", journal = "Parallel MockProblem Solving from Nature", pageFirst = 849, pageLast = 858, year = 2000, doi = "10.1007/3-540-45356-3_83", month = UNKNOWN) public class Nsga2Module extends SelectorModule { @Info("The tournament value") diff --git a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/SMSModule.java b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/SMSModule.java index 33d97ed0..07cf677f 100644 --- a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/SMSModule.java +++ b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/SMSModule.java @@ -1,37 +1,32 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.optimizers.ea; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.UNKNOWN; + import org.opt4j.core.common.archive.FrontDensityIndicator; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.start.Constant; /** - * Module for the S-Metric Selection ({@link Selector}) based on the - * {@link Hypervolume} contribution, see "M. Emmerich, N. Beume, and B. Naujoks. - * An EMO Algorithm Using the Hypervolume Measure as Selection Criterion. EMO - * 2005.". + * Module for the S-Metric Selection ({@link Selector}) based on the {@link Hypervolume} contribution, see Emmerich et + * al. 2005. * * @see Hypervolume * @author lukasiewycz @@ -39,6 +34,7 @@ * */ @Info("SMS-EMOA: Multiobjective selection based on dominated hypervolume") +@Citation(authors = "Michael Emmerich, Nicola Beume, and Boris Naujoks", title = "An EMO Algorithm Using the Hypervolume Measure as Selection Criterion", journal = "Evolutionary Multi-Criterion Optimization (EMO)", pageFirst = 62, pageLast = 76, year = 2005, month = UNKNOWN) public class SMSModule extends SelectorModule { @Info("The offset value") diff --git a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Spea2Module.java b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Spea2Module.java index e0f13be8..8b183a9d 100644 --- a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Spea2Module.java +++ b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/ea/Spea2Module.java @@ -1,28 +1,25 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - package org.opt4j.optimizers.ea; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.UNKNOWN; + +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.start.Constant; @@ -33,6 +30,7 @@ * */ @Info("The Strength Pareto Evolutionary Algorithm (SPEA II).") +@Citation(title = "SPEA2: Improving the Strength Pareto Evolutionary Algorithm For Multiobjective Optimization", authors = "Eckart Zitzler, Marco Laumanns, and Lothar Thiele", journal = "Evolutionary Methods for Design, Optimisation, and Control", pageFirst = 19, pageLast = 26, year = 2002, month = UNKNOWN) public class Spea2Module extends SelectorModule { @Info("The tournament value (number of opponents for the mating selection).") diff --git a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/mopso/MOPSOModule.java b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/mopso/MOPSOModule.java index cef32bcd..946acc6e 100644 --- a/opt4j-optimizers/src/main/java/org/opt4j/optimizers/mopso/MOPSOModule.java +++ b/opt4j-optimizers/src/main/java/org/opt4j/optimizers/mopso/MOPSOModule.java @@ -1,28 +1,26 @@ /******************************************************************************* * Copyright (c) 2014 Opt4J * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to the following conditions: * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the + * Software. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *******************************************************************************/ - + package org.opt4j.optimizers.mopso; +import static org.opt4j.core.config.annotations.Citation.PublicationMonth.UNKNOWN; + import org.opt4j.core.IndividualFactory; +import org.opt4j.core.config.annotations.Citation; import org.opt4j.core.config.annotations.Info; import org.opt4j.core.config.annotations.Name; import org.opt4j.core.config.annotations.Order; @@ -34,9 +32,9 @@ * The {@link MOPSOModule} for the {@link MOPSO} optimizer. * * @author lukasiewycz - * */ @Info("Multi-objective particle swarm optimizer. Mostly based on the OMOPSO. Works only with real-valued problems.") +@Citation(title = "Improving PSO-based Multi-Objective Optimization using Crowding, Mutation and ϵ-Dominance", authors = "Margarita Reyes Sierra and Carlos A. Coello Coello", journal = "Proceedings of Evolutionary Multi-Criterion Optimization", pageFirst = 505, pageLast = 519, month = UNKNOWN, year = 2005, doi = "10.1007/978-3-540-31880-4_35") public class MOPSOModule extends OptimizerModule { @Info("The number of particles.")