diff --git a/trunk/paradiseo-moeo/AUTHORS b/trunk/paradiseo-moeo/AUTHORS new file mode 100644 index 000000000..6ec6becf5 --- /dev/null +++ b/trunk/paradiseo-moeo/AUTHORS @@ -0,0 +1,3 @@ +Sébastien Cahon +Arnaud Liefooghe +Thomas Legrand diff --git a/trunk/paradiseo-moeo/ChangeLog b/trunk/paradiseo-moeo/ChangeLog new file mode 100755 index 000000000..e69de29bb diff --git a/trunk/paradiseo-moeo/Makefile.am b/trunk/paradiseo-moeo/Makefile.am new file mode 100755 index 000000000..f82d6f279 --- /dev/null +++ b/trunk/paradiseo-moeo/Makefile.am @@ -0,0 +1,16 @@ +SUBDIRS = docs src tutorials + +clean_all: clean_aux clean_doc + -@make clean + -@(rm -rf aclocal.m4 autom4te.cache configure config.* CO* dep* INST* install-sh miss* mkins* Makefile Makefile.in;\ + cd docs; rm -rf Makefile Makefile.in *.doxytag; cd ../src ; rm -rf Makefile Makefile.in; cd ../tutorials; rm -rf Makefile Makefile.in;\ + cd lesson1; rm -rf .deps/ Makefile Makefile.in) + +clean_aux: + -@find . \( -name "*~" -o -name "*.old" -o -name "#*" -o -name "*.bak" \) -print -exec rm -rf \{\} \; + +doc: + -@(cd docs; make doc) + +clean_doc: + -@(cd docs; make clean-local) diff --git a/trunk/paradiseo-moeo/NEWS b/trunk/paradiseo-moeo/NEWS new file mode 100644 index 000000000..31fe551dc --- /dev/null +++ b/trunk/paradiseo-moeo/NEWS @@ -0,0 +1,7 @@ +* release 0.1 + +# Local Variables: +# coding: iso-8859-1 +# mode: text +# fill-column: 80 +# End: diff --git a/trunk/paradiseo-moeo/README b/trunk/paradiseo-moeo/README new file mode 100644 index 000000000..fa724d953 --- /dev/null +++ b/trunk/paradiseo-moeo/README @@ -0,0 +1,63 @@ + PARADISEO-MOEO README FILE +======================================================================= + check latest news at http://paradiseo.gforge.inria.fr/ +======================================================================= + +Welcome to ParadisEO-MOEO, the Multi-Objective Evolving Objects library. +The latest news about ParadisEO-MOEO can be found on the gforge repository at +http://paradiseo.gforge.inria.fr/ +In case of any problem, please e-mail us at +paradiseo-help@lists.gforge.inria.fr + + +================================================================== + BUILDING PARADISEO-MOEO +================================================================== +The basic installation procedure goes the following: + +Go to your build-directory and run + $(SRCDIR)/configure + make + make doc + +where $(SRCDIR) is the top-level source directory of PARADISEO-MOEO, +i.e. where the sources where unpacked. + +In case of problems, you can read the INSTALL file - but remember this +is a standard installation file from GNU and that it contains nothing +specific about PARADISEO-MOEO. + +To clean everything, the simply run + make clean_all + +=================================================================== + DIRECTORY STRUCTURE +=================================================================== +After unpacking the archive file, you should end up with the following +structure: + +.../ The MAIN PARADISEO-MO directory, created when unpacking. + | + +-- src SOURCE directory Contains most PARADISEO-MOEO .h files. + | + | + +-- docs DOCUMENTATION directory (generated by Doxygen). + | | + | +- html HTML files - start at index.html. + | | + | +- latex latex files - use to generate Postcript doc. + | | + | +- man Unix man format documentation. + | + | + +-- tutorials APPLICATIONS - one directory per separate application. + | + +- lesson1 a bi-objective flow-shop problem example with main algorithms. + | + +-benchmarks Instance files for testing. + +=================================================================== + NOTES +=================================================================== + +Mailing list : paradiseo-help@lists.gforge.inria.fr diff --git a/trunk/paradiseo-moeo/autogen.sh b/trunk/paradiseo-moeo/autogen.sh new file mode 100755 index 000000000..293b7972e --- /dev/null +++ b/trunk/paradiseo-moeo/autogen.sh @@ -0,0 +1,148 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +PKG_NAME="the package." + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && { + grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \ + (gettext --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`gettext' installed." + echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -name configure.in -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` + ( cd $dr + aclocalinclude="$ACLOCAL_FLAGS" + for k in $macrodirs; do + if test -d $k; then + aclocalinclude="$aclocalinclude -I $k" + ##else + ## echo "**Warning**: No such directory \`$k'. Ignored." + fi + done + if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then + if grep "sed.*POTFILES" configure.in >/dev/null; then + : do nothing -- we still have an old unmodified configure.in + else + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + echo "no" | gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + fi + if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running gettextize... Ignore non-fatal messages." + echo "no" | gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake --gnu $am_opt ..." + automake --add-missing --gnu $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile $PKG_NAME +else + echo Skipping configure process. +fi diff --git a/trunk/paradiseo-moeo/configure.in b/trunk/paradiseo-moeo/configure.in new file mode 100755 index 000000000..d9b053ddc --- /dev/null +++ b/trunk/paradiseo-moeo/configure.in @@ -0,0 +1,42 @@ +AC_INIT(configure.in) +AM_INIT_AUTOMAKE(moeo, 0.1) + +AC_ISC_POSIX +AC_PROG_CXX +AM_PROG_CC_STDC +AC_HEADER_STDC +AC_PROG_RANLIB + +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET + +AC_C_CONST +AC_C_INLINE +AC_TYPE_SIZE_T + +AC_SUBST(EO_DIR) + +dnl EO +AC_ARG_WITH(EOdir, + --with-EOdir : Giving the path of the EO tree., + EO_DIR="$withval" + if test ! -d $EO_DIR + then + echo "" + echo "# --with-EOdir Invalid directory $withval" + exit 1 + fi, + echo "" + echo "# You forgot to give the path of the EO tree !" + echo "# Please write something like ... './configure --with-EOdir=\$HOME/eo'" + exit 1 + ) + +AC_OUTPUT([ +Makefile +src/Makefile +docs/Makefile +tutorials/Makefile +tutorials/lesson1/Makefile +]) diff --git a/trunk/paradiseo-moeo/docs/Makefile.am b/trunk/paradiseo-moeo/docs/Makefile.am new file mode 100644 index 000000000..254b2661c --- /dev/null +++ b/trunk/paradiseo-moeo/docs/Makefile.am @@ -0,0 +1,5 @@ +doc: + -@doxygen moeo.doxyfile + +clean-local: + rm -rf html latex man diff --git a/trunk/paradiseo-moeo/docs/html/annotated.html b/trunk/paradiseo-moeo/docs/html/annotated.html new file mode 100644 index 000000000..e1ae7f813 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/annotated.html @@ -0,0 +1,59 @@ + + +ParadisEO-MOEO: Class List + + + + +
+
+
+
+

ParadisEO-MOEO Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + + + + + + + + + + + + + + + + + + + + + +
moeoArchive< EOT >An archive is a secondary population that stores non-dominated solutions
moeoArchiveFitnessSavingUpdater< EOT >This class allows to save the fitnesses of solutions contained in an archive into a file at each generation
moeoArchiveUpdater< EOT >This class allows to update the archive at each generation with newly found non-dominated solutions
moeoBinaryMetricSavingUpdater< EOT >This class allows to save the progression of a binary metric comparing the fitness values of the current population (or archive) with the fitness values of the population (or archive) of the generation (n-1) into a file
moeoBM< A1, A2, R >Base class for binary metrics
moeoCombinedMOLS< EOT >This class allows to embed a set of local searches that are sequentially applied, and so working and updating the same archive of non-dominated solutions
moeoContributionMetric< EOT >The contribution metric evaluates the proportion of non-dominated solutions given by a Pareto set relatively to another Pareto set
moeoDisctinctElitistReplacement< EOT, WorthT >Same than moeoElitistReplacement except that distinct individuals are privilegied
moeoElitistReplacement< EOT, WorthT >Keep all the best individuals (almost cut-and-pasted from eoNDPlusReplacement, (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002)
moeoEntropyMetric< EOT >The entropy gives an idea of the diversity of a Pareto set relatively to another Pareto set
moeoHybridMOLS< EOT >This class allows to apply a multi-objective local search to a number of selected individuals contained in the archive at every generation until a stopping criteria is verified
moeoMetricBase class for performance metrics (also called quality indicators)
moeoMOLS< EOT >Abstract class for local searches applied to multi-objective optimization
moeoReplacement< EOT, WorthT >Replacement strategy for multi-objective optimization
moeoSelectOneFromPopAndArch< EOT >Elitist selection process that consists in choosing individuals in the archive as well as in the current population
moeoSolutionUM< EOT, R, EOFitness >Base class for unary metrics dedicated to the performance evaluation of a single solution's Pareto fitness
moeoSolutionVsSolutionBM< EOT, R, EOFitness >Base class for binary metrics dedicated to the performance comparison between two solutions's Pareto fitnesses
moeoUM< A, R >Base class for unary metrics
moeoVectorUM< EOT, R, EOFitness >Base class for unary metrics dedicated to the performance evaluation of a Pareto set (a vector of Pareto fitnesses)
moeoVectorVsSolutionBM< EOT, R, EOFitness >Base class for binary metrics dedicated to the performance comparison between a Pareto set (a vector of Pareto fitnesses) and a single solution's Pareto fitness
moeoVectorVsVectorBM< EOT, R, EOFitness >Base class for binary metrics dedicated to the performance comparison between two Pareto sets (two vectors of Pareto fitnesses)
+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classes.html b/trunk/paradiseo-moeo/docs/html/classes.html new file mode 100644 index 000000000..46f3bae98 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classes.html @@ -0,0 +1,50 @@ + + +ParadisEO-MOEO: Alphabetical List + + + + +
+
+
+
+

ParadisEO-MOEO Class Index

A | B | C | D | E | H | M | R | S | U | V

+ +
  A  
+
moeoDisctinctElitistReplacement   
  S  
+
moeoArchive   
  E  
+
moeoSelectOneFromPopAndArch   
moeoArchiveFitnessSavingUpdater   moeoElitistReplacement   moeoSolutionUM   
moeoArchiveUpdater   moeoEntropyMetric   moeoSolutionVsSolutionBM   
  B  
+
  H  
+
  U  
+
moeoBinaryMetricSavingUpdater   moeoHybridMOLS   moeoUM   
moeoBM   
  M  
+
  V  
+
  C  
+
moeoMetric   moeoVectorUM   
moeoCombinedMOLS   moeoMOLS   moeoVectorVsSolutionBM   
moeoContributionMetric   
  R  
+
moeoVectorVsVectorBM   
  D  
+
moeoReplacement   

A | B | C | D | E | H | M | R | S | U | V

+


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchive-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchive-members.html new file mode 100644 index 000000000..d1ea2930f --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchive-members.html @@ -0,0 +1,42 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoArchive< EOT > Member List

This is the complete list of members for moeoArchive< EOT >, including all inherited members.

+ + + + + +
contains(const EOFitness &_fit) constmoeoArchive< EOT > [inline]
dominates(const EOFitness &_fit) constmoeoArchive< EOT > [inline]
EOFitness typedefmoeoArchive< EOT >
update(const EOT &_eo)moeoArchive< EOT > [inline]
update(const eoPop< EOT > &_pop)moeoArchive< EOT > [inline]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchive.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchive.html new file mode 100644 index 000000000..9ca690504 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchive.html @@ -0,0 +1,205 @@ + + +ParadisEO-MOEO: moeoArchive< EOT > Class Template Reference + + + + +
+
+
+
+

moeoArchive< EOT > Class Template Reference

An archive is a secondary population that stores non-dominated solutions. +More... +

+#include <moeoArchive.h> +

+List of all members. + + + + + + + + + + + + + + + + + + +

Public Types

+typedef EOT::Fitness EOFitness
 The fitness type of a solution.

Public Member Functions

bool dominates (const EOFitness &_fit) const
 Returns true if the current archive dominates _fit.
bool contains (const EOFitness &_fit) const
 Returns true if the current archive contains _fit.
void update (const EOT &_eo)
 Updates the archive with a given individual _eo.
void update (const eoPop< EOT > &_pop)
 Updates the archive with a given population _pop.
+


Detailed Description

+

template<class EOT>
+ class moeoArchive< EOT >

+ +An archive is a secondary population that stores non-dominated solutions. +

+ +

+Definition at line 21 of file moeoArchive.h.


Member Function Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + +
bool moeoArchive< EOT >::dominates (const EOFitness _fit  )  const [inline]
+
+
+ +

+Returns true if the current archive dominates _fit. +

+

Parameters:
+ + +
_fit the (Pareto) fitness to compare with the current archive
+
+ +

+Definition at line 39 of file moeoArchive.h. +

+Referenced by moeoArchive< EOT >::update(). +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + +
bool moeoArchive< EOT >::contains (const EOFitness _fit  )  const [inline]
+
+
+ +

+Returns true if the current archive contains _fit. +

+

Parameters:
+ + +
_fit the (Pareto) fitness to search within the current archive
+
+ +

+Definition at line 51 of file moeoArchive.h. +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + +
void moeoArchive< EOT >::update (const EOT &  _eo  )  [inline]
+
+
+ +

+Updates the archive with a given individual _eo. +

+

Parameters:
+ + +
_eo the given individual
+
+ +

+Definition at line 63 of file moeoArchive.h. +

+References moeoArchive< EOT >::dominates(). +

+Referenced by moeoArchive< EOT >::update(). +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + +
void moeoArchive< EOT >::update (const eoPop< EOT > &  _pop  )  [inline]
+
+
+ +

+Updates the archive with a given population _pop. +

+

Parameters:
+ + +
_pop the given population
+
+ +

+Definition at line 98 of file moeoArchive.h. +

+References moeoArchive< EOT >::update(). +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater-members.html new file mode 100644 index 000000000..7a7baaa02 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater-members.html @@ -0,0 +1,43 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoArchiveFitnessSavingUpdater< EOT > Member List

This is the complete list of members for moeoArchiveFitnessSavingUpdater< EOT >, including all inherited members.

+ + + + + + +
archmoeoArchiveFitnessSavingUpdater< EOT > [private]
countermoeoArchiveFitnessSavingUpdater< EOT > [private]
filenamemoeoArchiveFitnessSavingUpdater< EOT > [private]
idmoeoArchiveFitnessSavingUpdater< EOT > [private]
moeoArchiveFitnessSavingUpdater(moeoArchive< EOT > &_arch, const std::string &_filename="Res/Arch", int _id=-1)moeoArchiveFitnessSavingUpdater< EOT > [inline]
operator()()moeoArchiveFitnessSavingUpdater< EOT > [inline]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater.html new file mode 100644 index 000000000..c1074ee32 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveFitnessSavingUpdater.html @@ -0,0 +1,128 @@ + + +ParadisEO-MOEO: moeoArchiveFitnessSavingUpdater< EOT > Class Template Reference + + + + +
+
+
+
+

moeoArchiveFitnessSavingUpdater< EOT > Class Template Reference

This class allows to save the fitnesses of solutions contained in an archive into a file at each generation. +More... +

+#include <moeoArchiveFitnessSavingUpdater.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 moeoArchiveFitnessSavingUpdater (moeoArchive< EOT > &_arch, const std::string &_filename="Res/Arch", int _id=-1)
 Ctor.
+void operator() ()
 Saves the fitness of the archive's members into the file.

Private Attributes

+moeoArchive< EOT > & arch
 local archive
+std::string filename
 target filename
+int id
 own ID
+unsigned counter
 counter
+


Detailed Description

+

template<class EOT>
+ class moeoArchiveFitnessSavingUpdater< EOT >

+ +This class allows to save the fitnesses of solutions contained in an archive into a file at each generation. +

+ +

+Definition at line 27 of file moeoArchiveFitnessSavingUpdater.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + + + + + + + +
moeoArchiveFitnessSavingUpdater< EOT >::moeoArchiveFitnessSavingUpdater (moeoArchive< EOT > &  _arch,
const std::string &  _filename = "Res/Arch",
int  _id = -1 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + + +
_arch local archive
_filename target filename
_id own ID
+
+ +

+Definition at line 37 of file moeoArchiveFitnessSavingUpdater.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater-members.html new file mode 100644 index 000000000..fa02e65c6 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater-members.html @@ -0,0 +1,41 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoArchiveUpdater< EOT > Member List

This is the complete list of members for moeoArchiveUpdater< EOT >, including all inherited members.

+ + + + +
archmoeoArchiveUpdater< EOT > [private]
moeoArchiveUpdater(moeoArchive< EOT > &_arch, const eoPop< EOT > &_pop)moeoArchiveUpdater< EOT > [inline]
operator()()moeoArchiveUpdater< EOT > [inline]
popmoeoArchiveUpdater< EOT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater.html b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater.html new file mode 100644 index 000000000..9a5874d1b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoArchiveUpdater.html @@ -0,0 +1,113 @@ + + +ParadisEO-MOEO: moeoArchiveUpdater< EOT > Class Template Reference + + + + +
+
+
+
+

moeoArchiveUpdater< EOT > Class Template Reference

This class allows to update the archive at each generation with newly found non-dominated solutions. +More... +

+#include <moeoArchiveUpdater.h> +

+List of all members. + + + + + + + + + + + + + + + +

Public Member Functions

 moeoArchiveUpdater (moeoArchive< EOT > &_arch, const eoPop< EOT > &_pop)
 Ctor.
+void operator() ()
 Updates the archive with newly found non-dominated solutions contained in the main population.

Private Attributes

+moeoArchive< EOT > & arch
 the archive of non-dominated solutions
+const eoPop< EOT > & pop
 the main population
+


Detailed Description

+

template<class EOT>
+ class moeoArchiveUpdater< EOT >

+ +This class allows to update the archive at each generation with newly found non-dominated solutions. +

+ +

+Definition at line 23 of file moeoArchiveUpdater.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
moeoArchiveUpdater< EOT >::moeoArchiveUpdater (moeoArchive< EOT > &  _arch,
const eoPop< EOT > &  _pop 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + +
_arch an archive of non-dominated solutions
_pop the main population
+
+ +

+Definition at line 32 of file moeoArchiveUpdater.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoBM.html b/trunk/paradiseo-moeo/docs/html/classmoeoBM.html new file mode 100644 index 000000000..e22e36294 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoBM.html @@ -0,0 +1,65 @@ + + +ParadisEO-MOEO: moeoBM< A1, A2, R > Class Template Reference + + + + +
+
+
+
+

moeoBM< A1, A2, R > Class Template Reference

Base class for binary metrics. +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoBM< A1, A2, R >: +

+ +moeoMetric +moeoSolutionVsSolutionBM< EOT, R, EOFitness > +moeoVectorVsSolutionBM< EOT, R, EOFitness > +moeoVectorVsVectorBM< EOT, R, EOFitness > +moeoVectorVsVectorBM< EOT, double > +moeoContributionMetric< EOT > +moeoEntropyMetric< EOT > + + + +
+

Detailed Description

+

template<class A1, class A2, class R>
+ class moeoBM< A1, A2, R >

+ +Base class for binary metrics. +

+ +

+Definition at line 38 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoBM.png b/trunk/paradiseo-moeo/docs/html/classmoeoBM.png new file mode 100644 index 000000000..df485aced Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoBM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater-members.html new file mode 100644 index 000000000..0a61cdc35 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater-members.html @@ -0,0 +1,46 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoBinaryMetricSavingUpdater< EOT > Member List

This is the complete list of members for moeoBinaryMetricSavingUpdater< EOT >, including all inherited members.

+ + + + + + + + + +
countermoeoBinaryMetricSavingUpdater< EOT > [private]
EOFitness typedefmoeoBinaryMetricSavingUpdater< EOT >
filenamemoeoBinaryMetricSavingUpdater< EOT > [private]
firstGenmoeoBinaryMetricSavingUpdater< EOT > [private]
metricmoeoBinaryMetricSavingUpdater< EOT > [private]
moeoBinaryMetricSavingUpdater(moeoVectorVsVectorBM< EOT, double > &_metric, const eoPop< EOT > &_pop, std::string _filename)moeoBinaryMetricSavingUpdater< EOT > [inline]
oldPopmoeoBinaryMetricSavingUpdater< EOT > [private]
operator()()moeoBinaryMetricSavingUpdater< EOT > [inline]
popmoeoBinaryMetricSavingUpdater< EOT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater.html b/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater.html new file mode 100644 index 000000000..2a1c5cf80 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoBinaryMetricSavingUpdater.html @@ -0,0 +1,142 @@ + + +ParadisEO-MOEO: moeoBinaryMetricSavingUpdater< EOT > Class Template Reference + + + + +
+
+
+
+

moeoBinaryMetricSavingUpdater< EOT > Class Template Reference

This class allows to save the progression of a binary metric comparing the fitness values of the current population (or archive) with the fitness values of the population (or archive) of the generation (n-1) into a file. +More... +

+#include <moeoBinaryMetricSavingUpdater.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

+typedef EOT::Fitness EOFitness
 The fitness type of a solution.

Public Member Functions

 moeoBinaryMetricSavingUpdater (moeoVectorVsVectorBM< EOT, double > &_metric, const eoPop< EOT > &_pop, std::string _filename)
 Ctor.
+void operator() ()
 Saves the metric's value for the current generation.

Private Attributes

+moeoVectorVsVectorBM< EOT,
+ double > & 
metric
 binary metric comparing two Pareto sets
+const eoPop< EOT > & pop
 main population
+eoPop< EOT > oldPop
 (n-1) population
+std::string filename
 target filename
+bool firstGen
 is it the first generation ?
+unsigned counter
 counter
+


Detailed Description

+

template<class EOT>
+ class moeoBinaryMetricSavingUpdater< EOT >

+ +This class allows to save the progression of a binary metric comparing the fitness values of the current population (or archive) with the fitness values of the population (or archive) of the generation (n-1) into a file. +

+ +

+Definition at line 26 of file moeoBinaryMetricSavingUpdater.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + + + + + + + +
moeoBinaryMetricSavingUpdater< EOT >::moeoBinaryMetricSavingUpdater (moeoVectorVsVectorBM< EOT, double > &  _metric,
const eoPop< EOT > &  _pop,
std::string  _filename 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + + +
_metric the binary metric comparing two Pareto sets
_pop the main population
_filename the target filename
+
+ +

+Definition at line 41 of file moeoBinaryMetricSavingUpdater.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS-members.html new file mode 100644 index 000000000..ca83216a0 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS-members.html @@ -0,0 +1,42 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoCombinedMOLS< EOT > Member List

This is the complete list of members for moeoCombinedMOLS< EOT >, including all inherited members.

+ + + + + +
add(moeoMOLS< EOT > &_ls)moeoCombinedMOLS< EOT > [inline]
combinedMOLSmoeoCombinedMOLS< EOT > [private]
evalmoeoCombinedMOLS< EOT > [private]
moeoCombinedMOLS(eoEvalFunc< EOT > &_eval, moeoMOLS< EOT > &_first_ls)moeoCombinedMOLS< EOT > [inline]
operator()(const EOT &_eo, moeoArchive< EOT > &_arch)moeoCombinedMOLS< EOT > [inline]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.html b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.html new file mode 100644 index 000000000..ed34b6acd --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.html @@ -0,0 +1,199 @@ + + +ParadisEO-MOEO: moeoCombinedMOLS< EOT > Class Template Reference + + + + +
+
+
+
+

moeoCombinedMOLS< EOT > Class Template Reference

This class allows to embed a set of local searches that are sequentially applied, and so working and updating the same archive of non-dominated solutions. +More... +

+#include <moeoCombinedMOLS.h> +

+

Inheritance diagram for moeoCombinedMOLS< EOT >: +

+ +moeoMOLS< EOT > + +List of all members. + + + + + + + + + + + + + + + + + + +

Public Member Functions

 moeoCombinedMOLS (eoEvalFunc< EOT > &_eval, moeoMOLS< EOT > &_first_ls)
 Ctor.
void add (moeoMOLS< EOT > &_ls)
 Adds a new local search to combine.
void operator() (const EOT &_eo, moeoArchive< EOT > &_arch)
 Gives a new solution in order to explore the neigborhood.

Private Attributes

+eoEvalFunc< EOT > & eval
 the full evaluator of a solution
+std::vector< moeoMOLS< EOT > * > combinedMOLS
 the vector that contains the combined MOLS
+

Detailed Description

+

template<class EOT>
+ class moeoCombinedMOLS< EOT >

+ +This class allows to embed a set of local searches that are sequentially applied, and so working and updating the same archive of non-dominated solutions. +

+ +

+Definition at line 24 of file moeoCombinedMOLS.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
moeoCombinedMOLS< EOT >::moeoCombinedMOLS (eoEvalFunc< EOT > &  _eval,
moeoMOLS< EOT > &  _first_ls 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + +
_eval the full evaluator of a solution
_first_ls the first multi-objective local search to add
+
+ +

+Definition at line 33 of file moeoCombinedMOLS.h. +

+References moeoCombinedMOLS< EOT >::combinedMOLS. +

+

+


Member Function Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + +
void moeoCombinedMOLS< EOT >::add (moeoMOLS< EOT > &  _ls  )  [inline]
+
+
+ +

+Adds a new local search to combine. +

+

Parameters:
+ + +
_ls the multi-objective local search to add
+
+ +

+Definition at line 43 of file moeoCombinedMOLS.h. +

+References moeoCombinedMOLS< EOT >::combinedMOLS. +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
void moeoCombinedMOLS< EOT >::operator() (const EOT &  _eo,
moeoArchive< EOT > &  _arch 
) [inline]
+
+
+ +

+Gives a new solution in order to explore the neigborhood. +

+The new non-dominated solutions are added to the archive

Parameters:
+ + + +
_eo the solution
_arch the archive of non-dominated solutions
+
+ +

+Definition at line 54 of file moeoCombinedMOLS.h. +

+References moeoCombinedMOLS< EOT >::combinedMOLS, and moeoCombinedMOLS< EOT >::eval. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.png b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.png new file mode 100644 index 000000000..5ebc17cd3 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoCombinedMOLS.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric-members.html new file mode 100644 index 000000000..45a10518a --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric-members.html @@ -0,0 +1,42 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoContributionMetric< EOT > Member List

This is the complete list of members for moeoContributionMetric< EOT >, including all inherited members.

+ + + + + +
card_C(const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)moeoContributionMetric< EOT > [inline, private]
card_N(const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)moeoContributionMetric< EOT > [inline, private]
card_W(const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)moeoContributionMetric< EOT > [inline, private]
EOFitness typedefmoeoContributionMetric< EOT >
operator()(const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)moeoContributionMetric< EOT > [inline]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.html b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.html new file mode 100644 index 000000000..86d00239e --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.html @@ -0,0 +1,255 @@ + + +ParadisEO-MOEO: moeoContributionMetric< EOT > Class Template Reference + + + + +
+
+
+
+

moeoContributionMetric< EOT > Class Template Reference

The contribution metric evaluates the proportion of non-dominated solutions given by a Pareto set relatively to another Pareto set. +More... +

+#include <moeoContributionMetric.h> +

+

Inheritance diagram for moeoContributionMetric< EOT >: +

+ +moeoVectorVsVectorBM< EOT, double > +moeoBM< A1, A2, R > +moeoMetric + +List of all members. + + + + + + + + + + + + + + + + + + + +

Public Types

+typedef EOT::Fitness EOFitness
 The fitness type of a solution.

Public Member Functions

double operator() (const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)
 Returns the contribution of the Pareto set '_set1' relatively to the Pareto set '_set2'.

Private Member Functions

unsigned card_C (const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)
 Returns the number of solutions both in '_set1' and '_set2'.
unsigned card_W (const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)
 Returns the number of solutions in '_set1' dominating at least one solution of '_set2'.
unsigned card_N (const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)
 Returns the number of solutions in '_set1' having no relation of dominance with those from '_set2'.
+

Detailed Description

+

template<class EOT>
+ class moeoContributionMetric< EOT >

+ +The contribution metric evaluates the proportion of non-dominated solutions given by a Pareto set relatively to another Pareto set. +

+(Meunier, Talbi, Reininger: 'A multiobjective genetic algorithm for radio network optimization', in Proc. of the 2000 Congress on Evolutionary Computation, IEEE Press, pp. 317-324) +

+ +

+Definition at line 23 of file moeoContributionMetric.h.


Member Function Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
double moeoContributionMetric< EOT >::operator() (const std::vector< EOFitness > &  _set1,
const std::vector< EOFitness > &  _set2 
) [inline]
+
+
+ +

+Returns the contribution of the Pareto set '_set1' relatively to the Pareto set '_set2'. +

+

Parameters:
+ + + +
_set1 the first Pareto set
_set2 the second Pareto set
+
+ +

+Definition at line 38 of file moeoContributionMetric.h. +

+References moeoContributionMetric< EOT >::card_C(), moeoContributionMetric< EOT >::card_N(), and moeoContributionMetric< EOT >::card_W(). +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
unsigned moeoContributionMetric< EOT >::card_C (const std::vector< EOFitness > &  _set1,
const std::vector< EOFitness > &  _set2 
) [inline, private]
+
+
+ +

+Returns the number of solutions both in '_set1' and '_set2'. +

+

Parameters:
+ + + +
_set1 the first Pareto set
_set2 the second Pareto set
+
+ +

+Definition at line 57 of file moeoContributionMetric.h. +

+Referenced by moeoContributionMetric< EOT >::operator()(). +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
unsigned moeoContributionMetric< EOT >::card_W (const std::vector< EOFitness > &  _set1,
const std::vector< EOFitness > &  _set2 
) [inline, private]
+
+
+ +

+Returns the number of solutions in '_set1' dominating at least one solution of '_set2'. +

+

Parameters:
+ + + +
_set1 the first Pareto set
_set2 the second Pareto set
+
+ +

+Definition at line 76 of file moeoContributionMetric.h. +

+Referenced by moeoContributionMetric< EOT >::operator()(). +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
unsigned moeoContributionMetric< EOT >::card_N (const std::vector< EOFitness > &  _set1,
const std::vector< EOFitness > &  _set2 
) [inline, private]
+
+
+ +

+Returns the number of solutions in '_set1' having no relation of dominance with those from '_set2'. +

+

Parameters:
+ + + +
_set1 the first Pareto set
_set2 the second Pareto set
+
+ +

+Definition at line 95 of file moeoContributionMetric.h. +

+Referenced by moeoContributionMetric< EOT >::operator()(). +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.png b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.png new file mode 100644 index 000000000..b997e8333 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoContributionMetric.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement-members.html new file mode 100644 index 000000000..89e74461b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement-members.html @@ -0,0 +1,41 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoDisctinctElitistReplacement< EOT, WorthT > Member List

This is the complete list of members for moeoDisctinctElitistReplacement< EOT, WorthT >, including all inherited members.

+ + + + +
createNewPop(eoPop< EOT > &_pop, unsigned _size)moeoDisctinctElitistReplacement< EOT, WorthT > [inline, private]
moeoDisctinctElitistReplacement(eoPerf2Worth< EOT, WorthT > &_perf2worth)moeoDisctinctElitistReplacement< EOT, WorthT > [inline]
operator()(eoPop< EOT > &_parents, eoPop< EOT > &_offspring)moeoDisctinctElitistReplacement< EOT, WorthT > [inline]
perf2worthmoeoDisctinctElitistReplacement< EOT, WorthT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.html b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.html new file mode 100644 index 000000000..464551158 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.html @@ -0,0 +1,196 @@ + + +ParadisEO-MOEO: moeoDisctinctElitistReplacement< EOT, WorthT > Class Template Reference + + + + +
+
+
+
+

moeoDisctinctElitistReplacement< EOT, WorthT > Class Template Reference

Same than moeoElitistReplacement except that distinct individuals are privilegied. +More... +

+#include <moeoReplacement.h> +

+

Inheritance diagram for moeoDisctinctElitistReplacement< EOT, WorthT >: +

+ +moeoReplacement< EOT, WorthT > + +List of all members. + + + + + + + + + + + + + + + + +

Public Member Functions

 moeoDisctinctElitistReplacement (eoPerf2Worth< EOT, WorthT > &_perf2worth)
 constructor
void operator() (eoPop< EOT > &_parents, eoPop< EOT > &_offspring)
 replacement - result in _parents

Private Member Functions

void createNewPop (eoPop< EOT > &_pop, unsigned _size)
 creation of the new population of size _size

Private Attributes

+eoPerf2Worth< EOT, WorthT > & perf2worth
 the functor object to transform raw fitnesses into fitness for selection
+

Detailed Description

+

template<class EOT, class WorthT = double>
+ class moeoDisctinctElitistReplacement< EOT, WorthT >

+ +Same than moeoElitistReplacement except that distinct individuals are privilegied. +

+ +

+Definition at line 78 of file moeoReplacement.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT, class WorthT = double>
+ + + + + + + + + +
moeoDisctinctElitistReplacement< EOT, WorthT >::moeoDisctinctElitistReplacement (eoPerf2Worth< EOT, WorthT > &  _perf2worth  )  [inline]
+
+
+ +

+constructor +

+

Parameters:
+ + +
_perf2worth the functor class to transform raw fitnesses into fitness for selection
+
+ +

+Definition at line 87 of file moeoReplacement.h. +

+

+


Member Function Documentation

+ +
+
+
+template<class EOT, class WorthT = double>
+ + + + + + + + + + + + + + + + + + +
void moeoDisctinctElitistReplacement< EOT, WorthT >::operator() (eoPop< EOT > &  _parents,
eoPop< EOT > &  _offspring 
) [inline]
+
+
+ +

+replacement - result in _parents +

+

Parameters:
+ + + +
_parents parents population
_offspring offspring population
+
+ +

+Definition at line 99 of file moeoReplacement.h. +

+References moeoDisctinctElitistReplacement< EOT, WorthT >::createNewPop(). +

+

+ +

+
+
+template<class EOT, class WorthT = double>
+ + + + + + + + + + + + + + + + + + +
void moeoDisctinctElitistReplacement< EOT, WorthT >::createNewPop (eoPop< EOT > &  _pop,
unsigned  _size 
) [inline, private]
+
+
+ +

+creation of the new population of size _size +

+

Parameters:
+ + + +
_pop the initial population (will be modified)
_size the size of the population to create
+
+ +

+Definition at line 123 of file moeoReplacement.h. +

+References moeoDisctinctElitistReplacement< EOT, WorthT >::perf2worth. +

+Referenced by moeoDisctinctElitistReplacement< EOT, WorthT >::operator()(). +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.png b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.png new file mode 100644 index 000000000..ea7436ecb Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoDisctinctElitistReplacement.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement-members.html new file mode 100644 index 000000000..4fd2af97f --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement-members.html @@ -0,0 +1,40 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoElitistReplacement< EOT, WorthT > Member List

This is the complete list of members for moeoElitistReplacement< EOT, WorthT >, including all inherited members.

+ + + +
moeoElitistReplacement(eoPerf2Worth< EOT, WorthT > &_perf2worth)moeoElitistReplacement< EOT, WorthT > [inline]
operator()(eoPop< EOT > &_parents, eoPop< EOT > &_offspring)moeoElitistReplacement< EOT, WorthT > [inline]
perf2worthmoeoElitistReplacement< EOT, WorthT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.html b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.html new file mode 100644 index 000000000..9bba334bc --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.html @@ -0,0 +1,147 @@ + + +ParadisEO-MOEO: moeoElitistReplacement< EOT, WorthT > Class Template Reference + + + + +
+
+
+
+

moeoElitistReplacement< EOT, WorthT > Class Template Reference

Keep all the best individuals (almost cut-and-pasted from eoNDPlusReplacement, (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002). +More... +

+#include <moeoReplacement.h> +

+

Inheritance diagram for moeoElitistReplacement< EOT, WorthT >: +

+ +moeoReplacement< EOT, WorthT > + +List of all members. + + + + + + + + + + + + +

Public Member Functions

 moeoElitistReplacement (eoPerf2Worth< EOT, WorthT > &_perf2worth)
 constructor
void operator() (eoPop< EOT > &_parents, eoPop< EOT > &_offspring)
 replacement - result in _parents

Private Attributes

+eoPerf2Worth< EOT, WorthT > & perf2worth
 the functor object to transform raw fitnesses into fitness for selection
+

Detailed Description

+

template<class EOT, class WorthT = double>
+ class moeoElitistReplacement< EOT, WorthT >

+ +Keep all the best individuals (almost cut-and-pasted from eoNDPlusReplacement, (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002). +

+ +

+Definition at line 35 of file moeoReplacement.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT, class WorthT = double>
+ + + + + + + + + +
moeoElitistReplacement< EOT, WorthT >::moeoElitistReplacement (eoPerf2Worth< EOT, WorthT > &  _perf2worth  )  [inline]
+
+
+ +

+constructor +

+

Parameters:
+ + +
_perf2worth the functor class to transform raw fitnesses into fitness for selection
+
+ +

+Definition at line 43 of file moeoReplacement.h. +

+

+


Member Function Documentation

+ +
+
+
+template<class EOT, class WorthT = double>
+ + + + + + + + + + + + + + + + + + +
void moeoElitistReplacement< EOT, WorthT >::operator() (eoPop< EOT > &  _parents,
eoPop< EOT > &  _offspring 
) [inline]
+
+
+ +

+replacement - result in _parents +

+

Parameters:
+ + + +
_parents parents population
_offspring offspring population
+
+ +

+Definition at line 54 of file moeoReplacement.h. +

+References moeoElitistReplacement< EOT, WorthT >::perf2worth. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.png b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.png new file mode 100644 index 000000000..3d0dd855c Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoElitistReplacement.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric-members.html new file mode 100644 index 000000000..7c9ac682f --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric-members.html @@ -0,0 +1,47 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoEntropyMetric< EOT > Member List

This is the complete list of members for moeoEntropyMetric< EOT >, including all inherited members.

+ + + + + + + + + + +
computeUnion(const std::vector< EOFitness > &_f1, const std::vector< EOFitness > &_f2, std::vector< EOFitness > &_f)moeoEntropyMetric< EOT > [inline, private]
EOFitness typedefmoeoEntropyMetric< EOT >
euclidianDistance(const EOFitness &_set1, const EOFitness &_to, unsigned _deg=2)moeoEntropyMetric< EOT > [inline, private]
howManyInNicheOf(const std::vector< EOFitness > &_f, const EOFitness &_s, unsigned _size)moeoEntropyMetric< EOT > [inline, private]
normalize(std::vector< EOFitness > &_f)moeoEntropyMetric< EOT > [inline, private]
operator()(const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)moeoEntropyMetric< EOT > [inline]
prenormalize(const std::vector< EOFitness > &_f)moeoEntropyMetric< EOT > [inline, private]
removeDominated(std::vector< EOFitness > &_f)moeoEntropyMetric< EOT > [inline, private]
vect_max_valmoeoEntropyMetric< EOT > [private]
vect_min_valmoeoEntropyMetric< EOT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.html b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.html new file mode 100644 index 000000000..ea6f72f0b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.html @@ -0,0 +1,142 @@ + + +ParadisEO-MOEO: moeoEntropyMetric< EOT > Class Template Reference + + + + +
+
+
+
+

moeoEntropyMetric< EOT > Class Template Reference

The entropy gives an idea of the diversity of a Pareto set relatively to another Pareto set. +More... +

+#include <moeoEntropyMetric.h> +

+

Inheritance diagram for moeoEntropyMetric< EOT >: +

+ +moeoVectorVsVectorBM< EOT, double > +moeoBM< A1, A2, R > +moeoMetric + +List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Types

+typedef EOT::Fitness EOFitness
 The fitness type of a solution.

Public Member Functions

double operator() (const std::vector< EOFitness > &_set1, const std::vector< EOFitness > &_set2)
 Returns the entropy of the Pareto set '_set1' relatively to the Pareto set '_set2'.

Private Member Functions

+void removeDominated (std::vector< EOFitness > &_f)
+void prenormalize (const std::vector< EOFitness > &_f)
+void normalize (std::vector< EOFitness > &_f)
+void computeUnion (const std::vector< EOFitness > &_f1, const std::vector< EOFitness > &_f2, std::vector< EOFitness > &_f)
+unsigned howManyInNicheOf (const std::vector< EOFitness > &_f, const EOFitness &_s, unsigned _size)
+double euclidianDistance (const EOFitness &_set1, const EOFitness &_to, unsigned _deg=2)

Private Attributes

+std::vector< double > vect_min_val
+std::vector< double > vect_max_val
+

Detailed Description

+

template<class EOT>
+ class moeoEntropyMetric< EOT >

+ +The entropy gives an idea of the diversity of a Pareto set relatively to another Pareto set. +

+(Basseur, Seynhaeve, Talbi: 'Design of Multi-objective Evolutionary Algorithms: Application to the Flow-shop Scheduling Problem', in Proc. of the 2002 Congress on Evolutionary Computation, IEEE Press, pp. 1155-1156) +

+ +

+Definition at line 23 of file moeoEntropyMetric.h.


Member Function Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + +
double moeoEntropyMetric< EOT >::operator() (const std::vector< EOFitness > &  _set1,
const std::vector< EOFitness > &  _set2 
) [inline]
+
+
+ +

+Returns the entropy of the Pareto set '_set1' relatively to the Pareto set '_set2'. +

+

Parameters:
+ + + +
_set1 the first Pareto set
_set2 the second Pareto set
+
+ +

+Definition at line 38 of file moeoEntropyMetric.h. +

+References moeoEntropyMetric< EOT >::computeUnion(), moeoEntropyMetric< EOT >::howManyInNicheOf(), moeoEntropyMetric< EOT >::normalize(), moeoEntropyMetric< EOT >::prenormalize(), and moeoEntropyMetric< EOT >::removeDominated(). +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.png b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.png new file mode 100644 index 000000000..edf5b923a Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoEntropyMetric.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS-members.html new file mode 100644 index 000000000..ded92972b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS-members.html @@ -0,0 +1,43 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoHybridMOLS< EOT > Member List

This is the complete list of members for moeoHybridMOLS< EOT >, including all inherited members.

+ + + + + + +
archmoeoHybridMOLS< EOT > [private]
eoHybridMOLS(eoContinue< EOT > &_term, eoSelect< EOT > &_select, moeoMOLS< EOT > &_mols, moeoArchive< EOT > &_arch)moeoHybridMOLS< EOT > [inline]
molsmoeoHybridMOLS< EOT > [private]
operator()()moeoHybridMOLS< EOT > [inline]
selectmoeoHybridMOLS< EOT > [private]
termmoeoHybridMOLS< EOT > [private]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS.html b/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS.html new file mode 100644 index 000000000..7b6b860ba --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoHybridMOLS.html @@ -0,0 +1,135 @@ + + +ParadisEO-MOEO: moeoHybridMOLS< EOT > Class Template Reference + + + + +
+
+
+
+

moeoHybridMOLS< EOT > Class Template Reference

This class allows to apply a multi-objective local search to a number of selected individuals contained in the archive at every generation until a stopping criteria is verified. +More... +

+#include <moeoHybridMOLS.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 eoHybridMOLS (eoContinue< EOT > &_term, eoSelect< EOT > &_select, moeoMOLS< EOT > &_mols, moeoArchive< EOT > &_arch)
 Ctor.
+void operator() ()
 Applies the multi-objective local search to selected individuals contained in the archive if the stopping criteria is not verified.

Private Attributes

+eoContinue< EOT > & term
 stopping criteria
+eoSelect< EOT > & select
 selector
+moeoMOLS< EOT > & mols
 multi-objective local search
+moeoArchive< EOT > & arch
 archive
+


Detailed Description

+

template<class EOT>
+ class moeoHybridMOLS< EOT >

+ +This class allows to apply a multi-objective local search to a number of selected individuals contained in the archive at every generation until a stopping criteria is verified. +

+ +

+Definition at line 27 of file moeoHybridMOLS.h.


Member Function Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
moeoHybridMOLS< EOT >::eoHybridMOLS (eoContinue< EOT > &  _term,
eoSelect< EOT > &  _select,
moeoMOLS< EOT > &  _mols,
moeoArchive< EOT > &  _arch 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + + + +
_term stopping criteria
_select selector
_mols a multi-objective local search
_arch the archive
+
+ +

+Definition at line 38 of file moeoHybridMOLS.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.html b/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.html new file mode 100644 index 000000000..c334cd782 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.html @@ -0,0 +1,61 @@ + + +ParadisEO-MOEO: moeoMOLS< EOT > Class Template Reference + + + + +
+
+
+
+

moeoMOLS< EOT > Class Template Reference

Abstract class for local searches applied to multi-objective optimization. +More... +

+#include <moeoMOLS.h> +

+

Inheritance diagram for moeoMOLS< EOT >: +

+ +moeoCombinedMOLS< EOT > + + + +
+

Detailed Description

+

template<class EOT>
+ class moeoMOLS< EOT >

+ +Abstract class for local searches applied to multi-objective optimization. +

+Starting from only one solution, it produces a set of new non-dominated solutions. +

+ +

+Definition at line 23 of file moeoMOLS.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.png b/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.png new file mode 100644 index 000000000..d5c9ae681 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoMOLS.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoMetric.html b/trunk/paradiseo-moeo/docs/html/classmoeoMetric.html new file mode 100644 index 000000000..d1cbc0a4b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoMetric.html @@ -0,0 +1,63 @@ + + +ParadisEO-MOEO: moeoMetric Class Reference + + + + +
+
+
+
+

moeoMetric Class Reference

Base class for performance metrics (also called quality indicators). +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoMetric: +

+ +moeoBM< A1, A2, R > +moeoBM< const const EOFitness &, EOFitness &, R > +moeoBM< const const std::vector< EOFitness > &, EOFitness &, R > +moeoBM< const const std::vector< EOFitness > &, std::vector< EOFitness > &, R > +moeoBM< const const std::vector< typename EOT::Fitness > &, std::vector< typename EOT::Fitness > &, double > +moeoUM< A, R > +moeoUM< const EOFitness &, R > +moeoUM< const std::vector< EOFitness > &, R > + + + +
+

Detailed Description

+Base class for performance metrics (also called quality indicators). +

+ +

+Definition at line 21 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoMetric.png b/trunk/paradiseo-moeo/docs/html/classmoeoMetric.png new file mode 100644 index 000000000..372641f94 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoMetric.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.html b/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.html new file mode 100644 index 000000000..f445347a9 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoReplacement< EOT, WorthT > Class Template Reference + + + + +
+
+
+
+

moeoReplacement< EOT, WorthT > Class Template Reference

Replacement strategy for multi-objective optimization. +More... +

+#include <moeoReplacement.h> +

+

Inheritance diagram for moeoReplacement< EOT, WorthT >: +

+ +moeoDisctinctElitistReplacement< EOT, WorthT > +moeoElitistReplacement< EOT, WorthT > + + + +
+

Detailed Description

+

template<class EOT, class WorthT>
+ class moeoReplacement< EOT, WorthT >

+ +Replacement strategy for multi-objective optimization. +

+ +

+Definition at line 24 of file moeoReplacement.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.png b/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.png new file mode 100644 index 000000000..713145545 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoReplacement.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch-members.html b/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch-members.html new file mode 100644 index 000000000..71ba70eca --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch-members.html @@ -0,0 +1,46 @@ + + +ParadisEO-MOEO: Member List + + + + +
+
+
+
+

moeoSelectOneFromPopAndArch< EOT > Member List

This is the complete list of members for moeoSelectOneFromPopAndArch< EOT >, including all inherited members.

+ + + + + + + + + +
archmoeoSelectOneFromPopAndArch< EOT > [private]
archSelectOnemoeoSelectOneFromPopAndArch< EOT > [private]
moeoSelectOneFromPopAndArch(eoSelectOne< EOT > &_popSelectOne, eoSelectOne< EOT > _archSelectOne, moeoArchive< EOT > &_arch, double _ratioFromPop=0.5)moeoSelectOneFromPopAndArch< EOT > [inline]
moeoSelectOneFromPopAndArch(eoSelectOne< EOT > &_popSelectOne, moeoArchive< EOT > &_arch, double _ratioFromPop=0.5)moeoSelectOneFromPopAndArch< EOT > [inline]
operator()(const eoPop< EOT > &pop)moeoSelectOneFromPopAndArch< EOT > [inline, virtual]
popSelectOnemoeoSelectOneFromPopAndArch< EOT > [private]
randomSelectmoeoSelectOneFromPopAndArch< EOT > [private]
ratioFromPopmoeoSelectOneFromPopAndArch< EOT > [private]
setup(const eoPop< EOT > &_pop)moeoSelectOneFromPopAndArch< EOT > [inline, virtual]


Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch.html b/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch.html new file mode 100644 index 000000000..c1ce3ee6e --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoSelectOneFromPopAndArch.html @@ -0,0 +1,194 @@ + + +ParadisEO-MOEO: moeoSelectOneFromPopAndArch< EOT > Class Template Reference + + + + +
+
+
+
+

moeoSelectOneFromPopAndArch< EOT > Class Template Reference

Elitist selection process that consists in choosing individuals in the archive as well as in the current population. +More... +

+#include <moeoSelectOneFromPopAndArch.h> +

+List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 moeoSelectOneFromPopAndArch (eoSelectOne< EOT > &_popSelectOne, eoSelectOne< EOT > _archSelectOne, moeoArchive< EOT > &_arch, double _ratioFromPop=0.5)
 Ctor.
 moeoSelectOneFromPopAndArch (eoSelectOne< EOT > &_popSelectOne, moeoArchive< EOT > &_arch, double _ratioFromPop=0.5)
 Ctor - the archive's selection operator is a random selector.
+virtual const EOT & operator() (const eoPop< EOT > &pop)
 The selection process.
+virtual void setup (const eoPop< EOT > &_pop)
 Setups some population stats.

Private Attributes

+eoSelectOne< EOT > & popSelectOne
 The population's selection operator.
+eoSelectOne< EOT > & archSelectOne
 The archive's selection operator.
+moeoArchive< EOT > & arch
 the archive
+double ratioFromPop
 the ratio of selected individuals from the population
+eoRandomSelect< EOT > randomSelect
 the random selection operator
+


Detailed Description

+

template<class EOT>
+ class moeoSelectOneFromPopAndArch< EOT >

+ +Elitist selection process that consists in choosing individuals in the archive as well as in the current population. +

+ +

+Definition at line 25 of file moeoSelectOneFromPopAndArch.h.


Constructor & Destructor Documentation

+ +
+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
moeoSelectOneFromPopAndArch< EOT >::moeoSelectOneFromPopAndArch (eoSelectOne< EOT > &  _popSelectOne,
eoSelectOne< EOT >  _archSelectOne,
moeoArchive< EOT > &  _arch,
double  _ratioFromPop = 0.5 
) [inline]
+
+
+ +

+Ctor. +

+

Parameters:
+ + + + + +
_popSelectOne the population's selection operator
_archSelectOne the archive's selection operator
_arch the archive
_ratioFromPop the ratio of selected individuals from the population
+
+ +

+Definition at line 37 of file moeoSelectOneFromPopAndArch.h. +

+

+ +

+
+
+template<class EOT>
+ + + + + + + + + + + + + + + + + + + + + + + + +
moeoSelectOneFromPopAndArch< EOT >::moeoSelectOneFromPopAndArch (eoSelectOne< EOT > &  _popSelectOne,
moeoArchive< EOT > &  _arch,
double  _ratioFromPop = 0.5 
) [inline]
+
+
+ +

+Ctor - the archive's selection operator is a random selector. +

+

Parameters:
+ + + + +
_popSelectOne the population's selection operator
_arch the archive
_ratioFromPop the ratio of selected individuals from the population
+
+ +

+Definition at line 49 of file moeoSelectOneFromPopAndArch.h. +

+

+


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.html b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.html new file mode 100644 index 000000000..a7c8797c0 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoSolutionUM< EOT, R, EOFitness > Class Template Reference + + + + +
+
+
+
+

moeoSolutionUM< EOT, R, EOFitness > Class Template Reference

Base class for unary metrics dedicated to the performance evaluation of a single solution's Pareto fitness. +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoSolutionUM< EOT, R, EOFitness >: +

+ +moeoUM< const EOFitness &, R > +moeoMetric + + + +
+

Detailed Description

+

template<class EOT, class R, class EOFitness = typename EOT::Fitness>
+ class moeoSolutionUM< EOT, R, EOFitness >

+ +Base class for unary metrics dedicated to the performance evaluation of a single solution's Pareto fitness. +

+ +

+Definition at line 47 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.png b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.png new file mode 100644 index 000000000..0a8276969 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionUM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.html b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.html new file mode 100644 index 000000000..0d8d708d1 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoSolutionVsSolutionBM< EOT, R, EOFitness > Class Template Reference + + + + +
+
+
+
+

moeoSolutionVsSolutionBM< EOT, R, EOFitness > Class Template Reference

Base class for binary metrics dedicated to the performance comparison between two solutions's Pareto fitnesses. +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoSolutionVsSolutionBM< EOT, R, EOFitness >: +

+ +moeoBM< A1, A2, R > +moeoMetric + + + +
+

Detailed Description

+

template<class EOT, class R, class EOFitness = typename EOT::Fitness>
+ class moeoSolutionVsSolutionBM< EOT, R, EOFitness >

+ +Base class for binary metrics dedicated to the performance comparison between two solutions's Pareto fitnesses. +

+ +

+Definition at line 70 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.png b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.png new file mode 100644 index 000000000..6ba76eee3 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoSolutionVsSolutionBM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoUM.html b/trunk/paradiseo-moeo/docs/html/classmoeoUM.html new file mode 100644 index 000000000..6596c5ebe --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoUM.html @@ -0,0 +1,59 @@ + + +ParadisEO-MOEO: moeoUM< A, R > Class Template Reference + + + + +
+
+
+
+

moeoUM< A, R > Class Template Reference

Base class for unary metrics. +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoUM< A, R >: +

+ +moeoMetric + + + +
+

Detailed Description

+

template<class A, class R>
+ class moeoUM< A, R >

+ +Base class for unary metrics. +

+ +

+Definition at line 29 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoUM.png b/trunk/paradiseo-moeo/docs/html/classmoeoUM.png new file mode 100644 index 000000000..df4319015 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoUM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.html b/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.html new file mode 100644 index 000000000..b65db99e4 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoVectorUM< EOT, R, EOFitness > Class Template Reference + + + + +
+
+
+
+

moeoVectorUM< EOT, R, EOFitness > Class Template Reference

Base class for unary metrics dedicated to the performance evaluation of a Pareto set (a vector of Pareto fitnesses). +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoVectorUM< EOT, R, EOFitness >: +

+ +moeoUM< const std::vector< EOFitness > &, R > +moeoMetric + + + +
+

Detailed Description

+

template<class EOT, class R, class EOFitness = typename EOT::Fitness>
+ class moeoVectorUM< EOT, R, EOFitness >

+ +Base class for unary metrics dedicated to the performance evaluation of a Pareto set (a vector of Pareto fitnesses). +

+ +

+Definition at line 58 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.png b/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.png new file mode 100644 index 000000000..25c458116 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoVectorUM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.html b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.html new file mode 100644 index 000000000..7dc79f02e --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoVectorVsSolutionBM< EOT, R, EOFitness > Class Template Reference + + + + +
+
+
+
+

moeoVectorVsSolutionBM< EOT, R, EOFitness > Class Template Reference

Base class for binary metrics dedicated to the performance comparison between a Pareto set (a vector of Pareto fitnesses) and a single solution's Pareto fitness. +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoVectorVsSolutionBM< EOT, R, EOFitness >: +

+ +moeoBM< A1, A2, R > +moeoMetric + + + +
+

Detailed Description

+

template<class EOT, class R, class EOFitness = typename EOT::Fitness>
+ class moeoVectorVsSolutionBM< EOT, R, EOFitness >

+ +Base class for binary metrics dedicated to the performance comparison between a Pareto set (a vector of Pareto fitnesses) and a single solution's Pareto fitness. +

+ +

+Definition at line 82 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.png b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.png new file mode 100644 index 000000000..9b7fe2ae9 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsSolutionBM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.html b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.html new file mode 100644 index 000000000..ec527dd20 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeoVectorVsVectorBM< EOT, R, EOFitness > Class Template Reference + + + + +
+
+
+
+

moeoVectorVsVectorBM< EOT, R, EOFitness > Class Template Reference

Base class for binary metrics dedicated to the performance comparison between two Pareto sets (two vectors of Pareto fitnesses). +More... +

+#include <moeoMetric.h> +

+

Inheritance diagram for moeoVectorVsVectorBM< EOT, R, EOFitness >: +

+ +moeoBM< A1, A2, R > +moeoMetric + + + +
+

Detailed Description

+

template<class EOT, class R, class EOFitness = typename EOT::Fitness>
+ class moeoVectorVsVectorBM< EOT, R, EOFitness >

+ +Base class for binary metrics dedicated to the performance comparison between two Pareto sets (two vectors of Pareto fitnesses). +

+ +

+Definition at line 95 of file moeoMetric.h.


The documentation for this class was generated from the following file: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.png b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.png new file mode 100644 index 000000000..bb555bf0f Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/classmoeoVectorVsVectorBM.png differ diff --git a/trunk/paradiseo-moeo/docs/html/doxygen.css b/trunk/paradiseo-moeo/docs/html/doxygen.css new file mode 100644 index 000000000..c7db1a8a0 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/doxygen.css @@ -0,0 +1,358 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} +H1 { + text-align: center; + font-size: 160%; +} +H2 { + font-size: 120%; +} +H3 { + font-size: 100%; +} +CAPTION { font-weight: bold } +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.nav { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } +A.el { text-decoration: none; font-weight: bold } +A.elRef { font-weight: bold } +A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} +A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} +A.codeRef:link { font-weight: normal; color: #0000FF} +A.codeRef:visited { font-weight: normal; color: #0000FF} +A:hover { text-decoration: none; background-color: #f2f2ff } +DL.el { margin-left: -1cm } +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { text-align: center; } +IMG.formulaDsp { } +IMG.formulaInl { vertical-align: middle; } +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { background: #e8eef2; + font-weight: bold; +} +HR { height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { font-size: 9pt; font-weight: bold; } +.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } +.directory > h3 { margin-top: 0; } +.directory p { margin: 0px; white-space: nowrap; } +.directory div { display: none; margin: 0px; } +.directory img { vertical-align: -30%; } diff --git a/trunk/paradiseo-moeo/docs/html/doxygen.png b/trunk/paradiseo-moeo/docs/html/doxygen.png new file mode 100644 index 000000000..f0a274bba Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/doxygen.png differ diff --git a/trunk/paradiseo-moeo/docs/html/files.html b/trunk/paradiseo-moeo/docs/html/files.html new file mode 100644 index 000000000..bb65efff4 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/files.html @@ -0,0 +1,45 @@ + + +ParadisEO-MOEO: File Index + + + + +
+
+

ParadisEO-MOEO File List

Here is a list of all documented files with brief descriptions: + + + + + + + + + + + + + + +
index.h [code]
moeo.h [code]
moeoArchive.h [code]
moeoArchiveFitnessSavingUpdater.h [code]
moeoArchiveUpdater.h [code]
moeoBinaryMetricSavingUpdater.h [code]
moeoCombinedMOLS.h [code]
moeoContributionMetric.h [code]
moeoEntropyMetric.h [code]
moeoHybridMOLS.h [code]
moeoMetric.h [code]
moeoMOLS.h [code]
moeoReplacement.h [code]
moeoSelectOneFromPopAndArch.h [code]
+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/ftv2blank.png b/trunk/paradiseo-moeo/docs/html/ftv2blank.png new file mode 100644 index 000000000..493c3c0b6 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2blank.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2doc.png b/trunk/paradiseo-moeo/docs/html/ftv2doc.png new file mode 100644 index 000000000..f72999f92 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2doc.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2folderclosed.png b/trunk/paradiseo-moeo/docs/html/ftv2folderclosed.png new file mode 100644 index 000000000..d6d063440 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2folderclosed.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2folderopen.png b/trunk/paradiseo-moeo/docs/html/ftv2folderopen.png new file mode 100644 index 000000000..bbe2c913c Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2folderopen.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2lastnode.png b/trunk/paradiseo-moeo/docs/html/ftv2lastnode.png new file mode 100644 index 000000000..e7b9ba90c Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2lastnode.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2link.png b/trunk/paradiseo-moeo/docs/html/ftv2link.png new file mode 100644 index 000000000..14f3fed00 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2link.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2mlastnode.png b/trunk/paradiseo-moeo/docs/html/ftv2mlastnode.png new file mode 100644 index 000000000..09ceb6adb Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2mlastnode.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2mnode.png b/trunk/paradiseo-moeo/docs/html/ftv2mnode.png new file mode 100644 index 000000000..3254c0511 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2mnode.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2node.png b/trunk/paradiseo-moeo/docs/html/ftv2node.png new file mode 100644 index 000000000..c9f06a57f Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2node.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2plastnode.png b/trunk/paradiseo-moeo/docs/html/ftv2plastnode.png new file mode 100644 index 000000000..0b07e0091 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2plastnode.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2pnode.png b/trunk/paradiseo-moeo/docs/html/ftv2pnode.png new file mode 100644 index 000000000..2001b797b Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2pnode.png differ diff --git a/trunk/paradiseo-moeo/docs/html/ftv2vertline.png b/trunk/paradiseo-moeo/docs/html/ftv2vertline.png new file mode 100644 index 000000000..b330f3a33 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/ftv2vertline.png differ diff --git a/trunk/paradiseo-moeo/docs/html/functions.html b/trunk/paradiseo-moeo/docs/html/functions.html new file mode 100644 index 000000000..6d95e9072 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/functions.html @@ -0,0 +1,209 @@ + + +ParadisEO-MOEO: Class Members + + + + +
+
+
+
+
+ +
+
+ +
+ +

+Here is a list of all documented class members with links to the class documentation for each member: +

+

- a -

+

- c -

+

- d -

+

- e -

+

- f -

+

- h -

+

- i -

+

- m -

+

- n -

+

- o -

+

- p -

+

- r -

+

- s -

+

- t -

+

- u -

+

- v -

+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/functions_func.html b/trunk/paradiseo-moeo/docs/html/functions_func.html new file mode 100644 index 000000000..85f743834 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/functions_func.html @@ -0,0 +1,145 @@ + + +ParadisEO-MOEO: Class Members - Functions + + + + +
+
+
+
+
+ +
+
+ +
+ +

+  +

+

- a -

+

- c -

+

- d -

+

- e -

+

- h -

+

- m -

+

- n -

+

- o -

+

- p -

+

- r -

+

- s -

+

- u -

+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/functions_type.html b/trunk/paradiseo-moeo/docs/html/functions_type.html new file mode 100644 index 000000000..af94fe307 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/functions_type.html @@ -0,0 +1,53 @@ + + +ParadisEO-MOEO: Class Members - Typedefs + + + + +
+
+
+
+
+ +
+  +

+

+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/functions_vars.html b/trunk/paradiseo-moeo/docs/html/functions_vars.html new file mode 100644 index 000000000..df90f4103 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/functions_vars.html @@ -0,0 +1,95 @@ + + +ParadisEO-MOEO: Class Members - Variables + + + + +
+
+
+
+
+ +
+  +

+

+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/hierarchy.html b/trunk/paradiseo-moeo/docs/html/hierarchy.html new file mode 100644 index 000000000..8285ae01e --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/hierarchy.html @@ -0,0 +1,80 @@ + + +ParadisEO-MOEO: Hierarchical Index + + + + +
+
+
+
+

ParadisEO-MOEO Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/index.html b/trunk/paradiseo-moeo/docs/html/index.html new file mode 100644 index 000000000..7e73d848d --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/index.html @@ -0,0 +1,8 @@ + + +ParadisEO-MOEO + + + + + diff --git a/trunk/paradiseo-moeo/docs/html/index_8h-source.html b/trunk/paradiseo-moeo/docs/html/index_8h-source.html new file mode 100644 index 000000000..08aca4f72 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/index_8h-source.html @@ -0,0 +1,36 @@ + + +ParadisEO-MOEO: index.h Source File + + + + +
+
+

index.h

00001 
+00048 // Local Variables:
+00049 // coding: iso-8859-1
+00050 // mode: C++
+00051 // c-file-style: "Stroustrup"
+00052 // fill-column: 80
+00053 // End:
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/installdox b/trunk/paradiseo-moeo/docs/html/installdox new file mode 100755 index 000000000..9b89fe025 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/installdox @@ -0,0 +1,117 @@ +#!/usr/bin/perl + +%subst = ( ); +$quiet = 0; + +if (open(F,"search.cfg")) +{ + $_= ; s/[ \t\n]*$//g ; $subst{"_doc"} = $_; + $_= ; s/[ \t\n]*$//g ; $subst{"_cgi"} = $_; +} + +while ( @ARGV ) { + $_ = shift @ARGV; + if ( s/^-// ) { + if ( /^l(.*)/ ) { + $v = ($1 eq "") ? shift @ARGV : $1; + ($v =~ /\/$/) || ($v .= "/"); + $_ = $v; + if ( /(.+)\@(.+)/ ) { + if ( exists $subst{$1} ) { + $subst{$1} = $2; + } else { + print STDERR "Unknown tag file $1 given with option -l\n"; + &usage(); + } + } else { + print STDERR "Argument $_ is invalid for option -l\n"; + &usage(); + } + } + elsif ( /^q/ ) { + $quiet = 1; + } + elsif ( /^\?|^h/ ) { + &usage(); + } + else { + print STDERR "Illegal option -$_\n"; + &usage(); + } + } + else { + push (@files, $_ ); + } +} + +foreach $sub (keys %subst) +{ + if ( $subst{$sub} eq "" ) + { + print STDERR "No substitute given for tag file `$sub'\n"; + &usage(); + } + elsif ( ! $quiet && $sub ne "_doc" && $sub ne "_cgi" ) + { + print "Substituting $subst{$sub} for each occurence of tag file $sub\n"; + } +} + +if ( ! @files ) { + if (opendir(D,".")) { + foreach $file ( readdir(D) ) { + $match = ".html"; + next if ( $file =~ /^\.\.?$/ ); + ($file =~ /$match/) && (push @files, $file); + ($file =~ "tree.js") && (push @files, $file); + } + closedir(D); + } +} + +if ( ! @files ) { + print STDERR "Warning: No input files given and none found!\n"; +} + +foreach $f (@files) +{ + if ( ! $quiet ) { + print "Editing: $f...\n"; + } + $oldf = $f; + $f .= ".bak"; + unless (rename $oldf,$f) { + print STDERR "Error: cannot rename file $oldf\n"; + exit 1; + } + if (open(F,"<$f")) { + unless (open(G,">$oldf")) { + print STDERR "Error: opening file $oldf for writing\n"; + exit 1; + } + if ($oldf ne "tree.js") { + while () { + s/doxygen\=\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\" (href|src)=\"\2/doxygen\=\"$1:$subst{$1}\" \3=\"$subst{$1}/g; + print G "$_"; + } + } + else { + while () { + s/\"([^ \"\:\t\>\<]*)\:([^ \"\t\>\<]*)\", \"\2/\"$1:$subst{$1}\" ,\"$subst{$1}/g; + print G "$_"; + } + } + } + else { + print STDERR "Warning file $f does not exist\n"; + } + unlink $f; +} + +sub usage { + print STDERR "Usage: installdox [options] [html-file [html-file ...]]\n"; + print STDERR "Options:\n"; + print STDERR " -l tagfile\@linkName tag file + URL or directory \n"; + print STDERR " -q Quiet mode\n\n"; + exit 1; +} diff --git a/trunk/paradiseo-moeo/docs/html/main.html b/trunk/paradiseo-moeo/docs/html/main.html new file mode 100644 index 000000000..79ba3893f --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/main.html @@ -0,0 +1,39 @@ + + +ParadisEO-MOEO: Welcome to ParadisEO-MOEO + + + + +
+
+

Welcome to ParadisEO-MOEO

+

+

0.1

+Introduction

+ParadisEO-MOEO is a white-box object-oriented generic framework dedicated to the flexible design of evolutionary multi-objective algorithms. This paradigm-free software embeds some features and techniques for Pareto-based resolution and aims to provide a set of classes allowing to ease and speed up the development of computationally efficient programs. It is based on a clear conceptual distinction between the solution methods and the multi-objective problems they are intended to solve. This separation confers a maximum design and code reuse. ParadisEO-MOEO provides a broad range of archive-related features (such as elitism or performance metrics) and the most common Pareto-based fitness assignment strategies (MOGA, NSGA, SPEA, IBEA and more). Furthermore, parallel and distributed models as well as hybridization mechanisms can be applied to an algorithm designed within ParadisEO-MOEO using the whole version of ParadisEO.

+Tutorial

+A tutorial about a bi-objective flow-shop scheduling problem will be available soon.

+Installation

+The installation procedure of the package is detailed in the README file in the top-directory of the source-tree.

+Overall Design

+For an introduction to the design of ParadisEO-MOEO, you can look at the ParadisEO website.
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoArchiveFitnessSavingUpdater_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoArchiveFitnessSavingUpdater_8h-source.html new file mode 100644 index 000000000..6e69fe019 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoArchiveFitnessSavingUpdater_8h-source.html @@ -0,0 +1,86 @@ + + +ParadisEO-MOEO: moeoArchiveFitnessSavingUpdater.h Source File + + + + +
+
+

moeoArchiveFitnessSavingUpdater.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoArchiveFitnessSavingUpdater.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOARCHIVEFITNESSSAVINGUPDATER_H_
+00014 #define MOEOARCHIVEFITNESSSAVINGUPDATER_H_
+00015 
+00016 #include <fstream>
+00017 #include <string>
+00018 #include <eoPop.h>
+00019 #include <utils/eoUpdater.h>
+00020 #include <moeoArchive.h>
+00021 
+00022 #define MAX_BUFFER_SIZE 1000
+00023 
+00027 template < class EOT > class moeoArchiveFitnessSavingUpdater:public eoUpdater
+00028 {
+00029 public:
+00030 
+00037 moeoArchiveFitnessSavingUpdater (moeoArchive < EOT > &_arch, const std::string & _filename = "Res/Arch", int _id = -1):arch (_arch), filename (_filename), id (_id),
+00038     counter
+00039     (0)
+00040   {
+00041   }
+00042 
+00046   void operator () ()
+00047   {
+00048     char buff[MAX_BUFFER_SIZE];
+00049     if (id == -1)
+00050       sprintf (buff, "%s.%u", filename.c_str (), counter++);
+00051     else
+00052       sprintf (buff, "%s.%u.%u", filename.c_str (), id, counter++);
+00053     std::ofstream f (buff);
+00054     for (unsigned i = 0; i < arch.size (); i++)
+00055       f << arch[i].fitness () << std::endl;
+00056     f.close ();
+00057   }
+00058 
+00059 
+00060 private:
+00061 
+00063   moeoArchive < EOT > &arch;
+00065   std::string filename;
+00067   int id;
+00069   unsigned counter;
+00070 
+00071 };
+00072 
+00073 #endif /*MOEOARCHIVEFITNESSSAVINGUPDATER_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoArchiveUpdater_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoArchiveUpdater_8h-source.html new file mode 100644 index 000000000..cb7b608f6 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoArchiveUpdater_8h-source.html @@ -0,0 +1,72 @@ + + +ParadisEO-MOEO: moeoArchiveUpdater.h Source File + + + + +
+
+

moeoArchiveUpdater.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoArchiveUpdater.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOARCHIVEUPDATER_H_
+00014 #define MOEOARCHIVEUPDATER_H_
+00015 
+00016 #include <eoPop.h>
+00017 #include <utils/eoUpdater.h>
+00018 #include <moeoArchive.h>
+00019 
+00023 template < class EOT > class moeoArchiveUpdater:public eoUpdater
+00024 {
+00025 public:
+00026 
+00032   moeoArchiveUpdater (moeoArchive < EOT > &_arch,
+00033                       const eoPop < EOT > &_pop):arch (_arch), pop (_pop)
+00034   {
+00035   }
+00036 
+00037 
+00041   void operator () ()
+00042   {
+00043     arch.update (pop);
+00044   }
+00045 
+00046 
+00047 private:
+00048 
+00050   moeoArchive < EOT > &arch;
+00052   const eoPop < EOT > &pop;
+00053 
+00054 };
+00055 
+00056 #endif /*MOEOARCHIVEUPDATER_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoArchive_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoArchive_8h-source.html new file mode 100644 index 000000000..4ffbb4f45 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoArchive_8h-source.html @@ -0,0 +1,113 @@ + + +ParadisEO-MOEO: moeoArchive.h Source File + + + + +
+
+

moeoArchive.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoArchive.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOARCHIVE_H_
+00014 #define MOEOARCHIVE_H_
+00015 
+00016 #include <eoPop.h>
+00017 
+00021 template < class EOT > class moeoArchive:public eoPop < EOT >
+00022 {
+00023 public:
+00024 
+00025   using std::vector < EOT >::size;
+00026   using std::vector < EOT >::operator[];
+00027   using std::vector < EOT >::back;
+00028   using std::vector < EOT >::pop_back;
+00029 
+00033   typedef typename EOT::Fitness EOFitness;
+00034 
+00039   bool dominates (const EOFitness & _fit) const
+00040   {
+00041     for (unsigned i = 0; i < size; i++)
+00042       if (operator[](i).fitness ().dominates (_fit))
+00043         return true;
+00044     return false;
+00045   }
+00046 
+00051   bool contains (const EOFitness & _fit) const
+00052   {
+00053     for (unsigned i = 0; i < size; i++)
+00054       if (operator[](i).fitness () == _fit)
+00055         return true;
+00056     return false;
+00057   }
+00058 
+00063   void update (const EOT & _eo)
+00064   {
+00065     // Removing the dominated solutions from the archive
+00066     for (unsigned j = 0; j < size ();)
+00067       {
+00068         if (_eo.fitness ().dominates (operator[](j).fitness ()))
+00069           {
+00070             operator[](j) = back ();
+00071             pop_back ();
+00072           }
+00073         else if (_eo.fitness () == operator[](j).fitness ())
+00074           {
+00075             operator[](j) = back ();
+00076             pop_back ();
+00077           }
+00078         else
+00079           j++;
+00080       }
+00081 
+00082     // Dominated ?
+00083     bool dom = false;
+00084     for (unsigned j = 0; j < size (); j++)
+00085       if (operator [](j).fitness ().dominates (_eo.fitness ()))
+00086         {
+00087           dom = true;
+00088           break;
+00089         }
+00090     if (!dom)
+00091       push_back (_eo);
+00092   }
+00093 
+00098   void update (const eoPop < EOT > &_pop)
+00099   {
+00100     for (unsigned i = 0; i < _pop.size (); i++)
+00101       update (_pop[i]);
+00102   }
+00103 
+00104 };
+00105 
+00106 #endif /*MOEOARCHIVE_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoBinaryMetricSavingUpdater_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoBinaryMetricSavingUpdater_8h-source.html new file mode 100644 index 000000000..cfd08830f --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoBinaryMetricSavingUpdater_8h-source.html @@ -0,0 +1,101 @@ + + +ParadisEO-MOEO: moeoBinaryMetricSavingUpdater.h Source File + + + + +
+
+

moeoBinaryMetricSavingUpdater.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoBinaryMetricSavingUpdater.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOBINARYMETRICSAVINGUPDATER_H_
+00014 #define MOEOBINARYMETRICSAVINGUPDATER_H_
+00015 
+00016 #include <fstream>
+00017 #include <string>
+00018 #include <eoPop.h>
+00019 #include <utils/eoUpdater.h>
+00020 #include <metric/moeoMetric.h>
+00021 
+00026 template < class EOT > class moeoBinaryMetricSavingUpdater:public eoUpdater
+00027 {
+00028 public:
+00029 
+00033   typedef typename EOT::Fitness EOFitness;
+00034 
+00041   moeoBinaryMetricSavingUpdater (moeoVectorVsVectorBM < EOT, double >&_metric,
+00042                                  const eoPop < EOT > &_pop,
+00043                                  std::string _filename):metric (_metric),
+00044     pop (_pop), filename (_filename), counter (1)
+00045   {
+00046   }
+00047 
+00051   void operator () ()
+00052   {
+00053     if (pop.size ())
+00054       {
+00055         if (firstGen)
+00056           {
+00057             firstGen = false;
+00058           }
+00059         else
+00060           {
+00061             // creation of the two Pareto sets                              
+00062             std::vector < EOFitness > from;
+00063             std::vector < EOFitness > to;
+00064             for (unsigned i = 0; i < pop.size (); i++)
+00065               from.push_back (pop[i].fitness ());
+00066             for (unsigned i = 0; i < oldPop.size (); i++)
+00067               to.push_back (oldPop[i].fitness ());
+00068             // writing the result into the file
+00069             std::ofstream f (filename.c_str (), std::ios::app);
+00070             f << counter++ << ' ' << metric (from, to) << std::endl;
+00071             f.close ();
+00072           }
+00073         oldPop = pop;
+00074       }
+00075   }
+00076 
+00077 private:
+00078 
+00080   moeoVectorVsVectorBM < EOT, double >&metric;
+00082   const eoPop < EOT > &pop;
+00084   eoPop < EOT > oldPop;
+00086   std::string filename;
+00088   bool firstGen;
+00090   unsigned counter;
+00091 
+00092 };
+00093 
+00094 #endif /*MOEOBINARYMETRICSAVINGUPDATER_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoCombinedMOLS_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoCombinedMOLS_8h-source.html new file mode 100644 index 000000000..8b5ab9c37 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoCombinedMOLS_8h-source.html @@ -0,0 +1,79 @@ + + +ParadisEO-MOEO: moeoCombinedMOLS.h Source File + + + + +
+
+

moeoCombinedMOLS.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoCombinedMOLS.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOCOMBINEDMOLS_H_
+00014 #define MOEOCOMBINEDMOLS_H_
+00015 
+00016 #include <eoEvalFunc.h>
+00017 #include <moeoArchive.h>
+00018 #include <moeoMOLS.h>
+00019 
+00024 template < class EOT > class moeoCombinedMOLS:public moeoMOLS < EOT >
+00025 {
+00026 public:
+00027 
+00033 moeoCombinedMOLS (eoEvalFunc < EOT > &_eval, moeoMOLS < EOT > &_first_ls):eval
+00034     (_eval)
+00035   {
+00036     combinedMOLS.push_back (&_first_ls);
+00037   }
+00038 
+00043   void add (moeoMOLS < EOT > &_ls)
+00044   {
+00045     combinedMOLS.push_back (&_ls);
+00046   }
+00047 
+00054   void operator  () (const EOT & _eo, moeoArchive < EOT > &_arch)
+00055   {
+00056     eval (const_cast < EOT & >(_eo));
+00057     for (unsigned i = 0; i < combinedMOLS.size (); i++)
+00058       combinedMOLS[i]->operator ()(_eo, _arch);
+00059   }
+00060 
+00061 
+00062 private:
+00063 
+00065   eoEvalFunc < EOT > &eval;
+00067   std::vector < moeoMOLS < EOT > *>combinedMOLS;
+00068 
+00069 };
+00070 
+00071 #endif /*MOEOCOMBINEDMOLS_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoContributionMetric_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoContributionMetric_8h-source.html new file mode 100644 index 000000000..548b4bf42 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoContributionMetric_8h-source.html @@ -0,0 +1,117 @@ + + +ParadisEO-MOEO: moeoContributionMetric.h Source File + + + + +
+
+

moeoContributionMetric.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoContributionMetric.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOCONTRIBUTIONMETRIC_H_
+00014 #define MOEOCONTRIBUTIONMETRIC_H_
+00015 
+00016 #include <metric/moeoMetric.h>
+00017 
+00023 template < class EOT > class moeoContributionMetric:public moeoVectorVsVectorBM < EOT,
+00024   double >
+00025 {
+00026 public:
+00027 
+00031   typedef typename EOT::Fitness EOFitness;
+00032 
+00038   double operator () (const std::vector < EOFitness > &_set1,
+00039                       const std::vector < EOFitness > &_set2)
+00040   {
+00041     unsigned c = card_C (_set1, _set2);
+00042     unsigned w1 = card_W (_set1, _set2);
+00043     unsigned n1 = card_N (_set1, _set2);
+00044     unsigned w2 = card_W (_set2, _set1);
+00045     unsigned n2 = card_N (_set2, _set1);
+00046       return (double) (c / 2.0 + w1 + n1) / (c + w1 + n1 + w2 + n2);
+00047   }
+00048 
+00049 
+00050 private:
+00051 
+00057   unsigned card_C (const std::vector < EOFitness > &_set1,
+00058                    const std::vector < EOFitness > &_set2)
+00059   {
+00060     unsigned c = 0;
+00061     for (unsigned i = 0; i < _set1.size (); i++)
+00062       for (unsigned j = 0; j < _set2.size (); j++)
+00063         if (_set1[i] == _set2[j])
+00064           {
+00065             c++;
+00066             break;
+00067           }
+00068     return c;
+00069   }
+00070 
+00076   unsigned card_W (const std::vector < EOFitness > &_set1,
+00077                    const std::vector < EOFitness > &_set2)
+00078   {
+00079     unsigned w = 0;
+00080     for (unsigned i = 0; i < _set1.size (); i++)
+00081       for (unsigned j = 0; j < _set2.size (); j++)
+00082         if (_set1[i].dominates (_set2[j]))
+00083           {
+00084             w++;
+00085             break;
+00086           }
+00087     return w;
+00088   }
+00089 
+00095   unsigned card_N (const std::vector < EOFitness > &_set1,
+00096                    const std::vector < EOFitness > &_set2)
+00097   {
+00098     unsigned n = 0;
+00099     for (unsigned i = 0; i < _set1.size (); i++)
+00100       {
+00101         bool domin_rel = false;
+00102         for (unsigned j = 0; j < _set2.size (); j++)
+00103           if (_set1[i].dominates (_set2[j]) || _set2[j].dominates (_set1[i]))
+00104             {
+00105               domin_rel = true;
+00106               break;
+00107             }
+00108         if (!domin_rel)
+00109           n++;
+00110       }
+00111     return n;
+00112   }
+00113 
+00114 };
+00115 
+00116 #endif /*MOEOCONTRIBUTIONMETRIC_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoEntropyMetric_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoEntropyMetric_8h-source.html new file mode 100644 index 000000000..6ba2ef629 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoEntropyMetric_8h-source.html @@ -0,0 +1,195 @@ + + +ParadisEO-MOEO: moeoEntropyMetric.h Source File + + + + +
+
+

moeoEntropyMetric.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoEntropyMetric.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOENTROPYMETRIC_H_
+00014 #define MOEOENTROPYMETRIC_H_
+00015 
+00016 #include <metric/moeoMetric.h>
+00017 
+00023 template < class EOT > class moeoEntropyMetric:public moeoVectorVsVectorBM < EOT,
+00024   double >
+00025 {
+00026 public:
+00027 
+00031   typedef typename EOT::Fitness EOFitness;
+00032 
+00038   double operator () (const std::vector < EOFitness > &_set1,
+00039                       const std::vector < EOFitness > &_set2)
+00040   {
+00041     // normalization
+00042     std::vector < EOFitness > set1 = _set1;
+00043     std::vector < EOFitness > set2 = _set2;
+00044     removeDominated (set1);
+00045     removeDominated (set2);
+00046     prenormalize (set1);
+00047     normalize (set1);
+00048     normalize (set2);
+00049 
+00050     // making of PO*
+00051     std::vector < EOFitness > star;     // rotf :-)
+00052     computeUnion (set1, set2, star);
+00053     removeDominated (star);
+00054 
+00055     // making of PO1 U PO*
+00056     std::vector < EOFitness > union_set1_star;  // rotf again ...
+00057     computeUnion (set1, star, union_set1_star);
+00058 
+00059     unsigned C = union_set1_star.size ();
+00060     float omega = 0;
+00061     float entropy = 0;
+00062 
+00063     for (unsigned i = 0; i < C; i++)
+00064       {
+00065         unsigned N_i =
+00066           howManyInNicheOf (union_set1_star, union_set1_star[i],
+00067                             star.size ());
+00068         unsigned n_i =
+00069           howManyInNicheOf (set1, union_set1_star[i], star.size ());
+00070         if (n_i > 0)
+00071           {
+00072             omega += 1.0 / N_i;
+00073             entropy +=
+00074               (float) n_i / (N_i * C) * log (((float) n_i / C) / log (2.0));
+00075           }
+00076       }
+00077     entropy /= -log (omega);
+00078     entropy *= log (2.0);
+00079     return entropy;
+00080   }
+00081 
+00082 
+00083 private:
+00084 
+00085   std::vector < double >vect_min_val;
+00086   std::vector < double >vect_max_val;
+00087 
+00088   void removeDominated (std::vector < EOFitness > &_f)
+00089   {
+00090     for (unsigned i = 0; i < _f.size (); i++)
+00091       {
+00092         bool dom = false;
+00093         for (unsigned j = 0; j < _f.size (); j++)
+00094           if (i != j && _f[j].dominates (_f[i]))
+00095             {
+00096               dom = true;
+00097               break;
+00098             }
+00099         if (dom)
+00100           {
+00101             _f[i] = _f.back ();
+00102             _f.pop_back ();
+00103             i--;
+00104           }
+00105       }
+00106   }
+00107 
+00108   void prenormalize (const std::vector < EOFitness > &_f)
+00109   {
+00110     vect_min_val.clear ();
+00111     vect_max_val.clear ();
+00112 
+00113     for (unsigned char i = 0; i < EOFitness::fitness_traits::nObjectives ();
+00114          i++)
+00115       {
+00116         float min_val = _f.front ()[i], max_val = min_val;
+00117         for (unsigned j = 1; j < _f.size (); j++)
+00118           {
+00119             if (_f[j][i] < min_val)
+00120               min_val = _f[j][i];
+00121             if (_f[j][i] > max_val)
+00122               max_val = _f[j][i];
+00123           }
+00124         vect_min_val.push_back (min_val);
+00125         vect_max_val.push_back (max_val);
+00126       }
+00127   }
+00128 
+00129   void normalize (std::vector < EOFitness > &_f)
+00130   {
+00131     for (unsigned i = 0; i < EOFitness::fitness_traits::nObjectives (); i++)
+00132       for (unsigned j = 0; j < _f.size (); j++)
+00133         _f[j][i] =
+00134           (_f[j][i] - vect_min_val[i]) / (vect_max_val[i] - vect_min_val[i]);
+00135   }
+00136 
+00137   void computeUnion (const std::vector < EOFitness > &_f1,
+00138                      const std::vector < EOFitness > &_f2,
+00139                      std::vector < EOFitness > &_f)
+00140   {
+00141     _f = _f1;
+00142     for (unsigned i = 0; i < _f2.size (); i++)
+00143       {
+00144         bool b = false;
+00145         for (unsigned j = 0; j < _f1.size (); j++)
+00146           if (_f1[j] == _f2[i])
+00147             {
+00148               b = true;
+00149               break;
+00150             }
+00151         if (!b)
+00152           _f.push_back (_f2[i]);
+00153       }
+00154   }
+00155 
+00156   unsigned howManyInNicheOf (const std::vector < EOFitness > &_f,
+00157                              const EOFitness & _s, unsigned _size)
+00158   {
+00159     unsigned n = 0;
+00160     for (unsigned i = 0; i < _f.size (); i++)
+00161       {
+00162         if (euclidianDistance (_f[i], _s) < (_s.size () / (double) _size))
+00163           n++;
+00164       }
+00165     return n;
+00166   }
+00167 
+00168   double euclidianDistance (const EOFitness & _set1, const EOFitness & _to,
+00169                             unsigned _deg = 2)
+00170   {
+00171     double dist = 0;
+00172     for (unsigned i = 0; i < _set1.size (); i++)
+00173       dist += pow (fabs (_set1[i] - _to[i]), (int) _deg);
+00174     return pow (dist, 1.0 / _deg);
+00175   }
+00176 
+00177 };
+00178 
+00179 #endif /*MOEOENTROPYMETRIC_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoHybridMOLS_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoHybridMOLS_8h-source.html new file mode 100644 index 000000000..13c4ec57c --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoHybridMOLS_8h-source.html @@ -0,0 +1,85 @@ + + +ParadisEO-MOEO: moeoHybridMOLS.h Source File + + + + +
+
+

moeoHybridMOLS.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoHybridMOLS.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOHYBRIDMOLS_H_
+00014 #define MOEOHYBRIDMOLS_H_
+00015 
+00016 #include <eoContinue.h>
+00017 #include <eoPop.h>
+00018 #include <eoUpdater.h>
+00019 #include <eoSelect.h>
+00020 #include <moeoArchive.h>
+00021 #include <moeoMOLS.h>
+00022 
+00027 template < class EOT > class moeoHybridMOLS:public eoUpdater
+00028 {
+00029 public:
+00030 
+00038 eoHybridMOLS (eoContinue < EOT > &_term, eoSelect < EOT > &_select, moeoMOLS < EOT > &_mols, moeoArchive < EOT > &_arch):term (_term), select (_select), mols (_mols),
+00039     arch
+00040     (_arch)
+00041   {
+00042   }
+00043 
+00047   void operator  () ()
+00048   {
+00049     if (!cont (arch))
+00050       {
+00051         // selection of solutions
+00052         eoPop < EOT > selectedSolutions;
+00053         select (arch, selectedSolutions);
+00054         // apply the local search to every selected solution
+00055         for (unsigned i = 0; i < selectedSolutions.size (); i++)
+00056           mols (selectedSolutions[i], arch);
+00057       }
+00058   }
+00059 
+00060 
+00061 private:
+00062 
+00064   eoContinue < EOT > &term;
+00066   eoSelect < EOT > &select;
+00068   moeoMOLS < EOT > &mols;
+00070   moeoArchive < EOT > &arch;
+00071 
+00072 };
+00073 
+00074 #endif /*MOEOHYBRIDMOLS_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoMOLS_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoMOLS_8h-source.html new file mode 100644 index 000000000..59c624f47 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoMOLS_8h-source.html @@ -0,0 +1,53 @@ + + +ParadisEO-MOEO: moeoMOLS.h Source File + + + + +
+
+

moeoMOLS.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoMOLS.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOMOLS_H_
+00014 #define MOEOMOLS_H_
+00015 
+00016 #include <eoFunctor.h>
+00017 #include <moeoArchive.h>
+00018 
+00023 template < class EOT > class moeoMOLS:public eoBF < const EOT &, moeoArchive < EOT > &,
+00024   void >
+00025 {
+00026 };
+00027 
+00028 #endif /*MOEOMOLS_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoMetric_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoMetric_8h-source.html new file mode 100644 index 000000000..44515a48b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoMetric_8h-source.html @@ -0,0 +1,111 @@ + + +ParadisEO-MOEO: moeoMetric.h Source File + + + + +
+
+

moeoMetric.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoMetric.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOMETRIC_H_
+00014 #define MOEOMETRIC_H_
+00015 
+00016 #include <eoFunctor.h>
+00017 
+00021 class moeoMetric:public eoFunctorBase
+00022 {
+00023 };
+00024 
+00025 
+00029 template < class A, class R > class moeoUM:public eoUF < A, R >,
+00030   public moeoMetric
+00031 {
+00032 };
+00033 
+00034 
+00038 template < class A1, class A2, class R > class moeoBM:public eoBF < A1, A2, R >,
+00039   public moeoMetric
+00040 {
+00041 };
+00042 
+00043 
+00047 template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoSolutionUM:public moeoUM <
+00048   const
+00049   EOFitness &,
+00050   R >
+00051 {
+00052 };
+00053 
+00054 
+00058 template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorUM:public moeoUM <
+00059   const
+00060   std::vector <
+00061 EOFitness > &,
+00062   R >
+00063 {
+00064 };
+00065 
+00066 
+00070 template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoSolutionVsSolutionBM:public moeoBM <
+00071   const
+00072   EOFitness &, const
+00073   EOFitness &,
+00074   R >
+00075 {
+00076 };
+00077 
+00078 
+00082 template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorVsSolutionBM:public moeoBM <
+00083   const
+00084   std::vector <
+00085 EOFitness > &, const
+00086   EOFitness &,
+00087   R >
+00088 {
+00089 };
+00090 
+00091 
+00095 template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorVsVectorBM:public moeoBM <
+00096   const
+00097   std::vector <
+00098 EOFitness > &, const
+00099   std::vector <
+00100 EOFitness > &,
+00101   R >
+00102 {
+00103 };
+00104 
+00105 
+00106 #endif /*MOEOMETRIC_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoReplacement_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoReplacement_8h-source.html new file mode 100644 index 000000000..a08ed4aca --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoReplacement_8h-source.html @@ -0,0 +1,163 @@ + + +ParadisEO-MOEO: moeoReplacement.h Source File + + + + +
+
+

moeoReplacement.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoReplacement.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOREPLACEMENT_H_
+00014 #define MOEOREPLACEMENT_H_
+00015 
+00016 #include <eoPerf2Worth.h>
+00017 #include <eoPop.h>
+00018 #include <eoReplacement.h>
+00019 
+00020 
+00024 template < class EOT, class WorthT > class moeoReplacement:public eoReplacement <
+00025   EOT >
+00026 {
+00027 };
+00028 
+00029 
+00034 template < class EOT, class WorthT =
+00035   double >class moeoElitistReplacement:public moeoReplacement < EOT, WorthT >
+00036 {
+00037 public:
+00038 
+00043   moeoElitistReplacement (eoPerf2Worth < EOT,
+00044                           WorthT > &_perf2worth):perf2worth (_perf2worth)
+00045   {
+00046   }
+00047 
+00048 
+00054   void operator () (eoPop < EOT > &_parents, eoPop < EOT > &_offspring)
+00055   {
+00056     unsigned size = _parents.size ();
+00057     _parents.reserve (_parents.size () + _offspring.size ());
+00058     copy (_offspring.begin (), _offspring.end (), back_inserter (_parents));
+00059 
+00060     // calculate worths
+00061     perf2worth (_parents);
+00062     perf2worth.sort_pop (_parents);
+00063     perf2worth.resize (_parents, size);
+00064 
+00065     _offspring.clear ();
+00066   }
+00067 
+00068 private:
+00070   eoPerf2Worth < EOT, WorthT > &perf2worth;
+00071 };
+00072 
+00073 
+00077 template < class EOT, class WorthT =
+00078   double >class moeoDisctinctElitistReplacement:public moeoReplacement < EOT,
+00079   WorthT >
+00080 {
+00081 public:
+00082 
+00087   moeoDisctinctElitistReplacement (eoPerf2Worth < EOT,
+00088                                    WorthT >
+00089                                    &_perf2worth):perf2worth (_perf2worth)
+00090   {
+00091   }
+00092 
+00093 
+00099   void operator () (eoPop < EOT > &_parents, eoPop < EOT > &_offspring)
+00100   {
+00101     unsigned size = _parents.size ();
+00102     _parents.reserve (_parents.size () + _offspring.size ());
+00103     copy (_offspring.begin (), _offspring.end (), back_inserter (_parents));
+00104 
+00105     // creation of the new population (of size 'size')
+00106     createNewPop (_parents, size);
+00107 
+00108     _offspring.clear ();
+00109   }
+00110 
+00111 
+00112 private:
+00113 
+00115   eoPerf2Worth < EOT, WorthT > &perf2worth;
+00116 
+00117 
+00123   void createNewPop (eoPop < EOT > &_pop, unsigned _size)
+00124   {
+00125     // the number of occurences for each individual
+00126     std::map < EOT, unsigned >nb_occurences;
+00127     for (unsigned i = 0; i < _pop.size (); i++)
+00128       nb_occurences[_pop[i]] = 0;
+00129     // the new population
+00130     eoPop < EOT > new_pop;
+00131     new_pop.reserve (_pop.size ());
+00132     for (unsigned i = 0; i < _pop.size (); i++)
+00133       {
+00134         if (nb_occurences[_pop[i]] == 0)
+00135           new_pop.push_back (_pop[i]);
+00136         nb_occurences[_pop[i]]++;
+00137       }
+00138 
+00139     // calculate worths (on the new population)
+00140     perf2worth (new_pop);
+00141     perf2worth.sort_pop (new_pop);
+00142 
+00143     // if case there's not enough individuals in the population...
+00144     unsigned new_pop_size_init = new_pop.size ();
+00145     unsigned k = 0;
+00146     while (new_pop.size () < _size)
+00147       {
+00148         if (k < new_pop_size_init)
+00149           {
+00150             if (nb_occurences[new_pop[k]] > 1)
+00151               {
+00152                 new_pop.push_back (new_pop[k]);
+00153                 nb_occurences[new_pop[k]]--;
+00154               }
+00155             k++;
+00156           }
+00157         else
+00158           k = 0;
+00159       }
+00160 
+00161     // resize and swap the populations
+00162     perf2worth.resize (new_pop, _size);
+00163     _pop.resize (_size);
+00164     _pop.swap (new_pop);
+00165   }
+00166 
+00167 };
+00168 
+00169 #endif /*MOEOREPLACEMENT_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeoSelectOneFromPopAndArch_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeoSelectOneFromPopAndArch_8h-source.html new file mode 100644 index 000000000..32ec70e17 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeoSelectOneFromPopAndArch_8h-source.html @@ -0,0 +1,95 @@ + + +ParadisEO-MOEO: moeoSelectOneFromPopAndArch.h Source File + + + + +
+
+

moeoSelectOneFromPopAndArch.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeoSelectOneFormPopAndArch.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEOSELECTONEFROMPOPANDARCH_H_
+00014 #define MOEOSELECTONEFROMPOPANDARCH_H_
+00015 
+00016 #include <eoPop.h>
+00017 #include <eoRandomSelect.h>
+00018 #include <eoSelectOne.h>
+00019 #include <utils/eoRNG.h>
+00020 #include <moeoArchive.h>
+00021 
+00025 template < class EOT > class moeoSelectOneFromPopAndArch:public eoSelectOne <
+00026   EOT >
+00027 {
+00028 public:
+00029 
+00037 moeoSelectOneFromPopAndArch (eoSelectOne < EOT > &_popSelectOne, eoSelectOne < EOT > _archSelectOne, moeoArchive < EOT > &_arch, double _ratioFromPop = 0.5):popSelectOne (_popSelectOne), archSelectOne (_archSelectOne), arch (_arch),
+00038     ratioFromPop
+00039     (_ratioFromPop)
+00040   {
+00041   }
+00042 
+00049 moeoSelectOneFromPopAndArch (eoSelectOne < EOT > &_popSelectOne, moeoArchive < EOT > &_arch, double _ratioFromPop = 0.5):popSelectOne (_popSelectOne), archSelectOne (randomSelect), arch (_arch),
+00050     ratioFromPop
+00051     (_ratioFromPop)
+00052   {
+00053   }
+00054 
+00058   virtual const EOT & operator  () (const eoPop < EOT > &pop)
+00059   {
+00060     if (arch.size () > 0)
+00061       if (rng.flip (ratioFromPop))
+00062         return popSelectOne (pop);
+00063       else
+00064         return archSelectOne (arch);
+00065     else
+00066       return popSelectOne (pop);
+00067   }
+00068 
+00072   virtual void setup (const eoPop < EOT > &_pop)
+00073   {
+00074     popSelectOne.setup (_pop);
+00075   }
+00076 
+00077 
+00078 private:
+00079 
+00081   eoSelectOne < EOT > &popSelectOne;
+00083   eoSelectOne < EOT > &archSelectOne;
+00085   moeoArchive < EOT > &arch;
+00087   double ratioFromPop;
+00089   eoRandomSelect < EOT > randomSelect;
+00090 
+00091 };
+00092 
+00093 #endif /*MOEOSELECTONEFROMPOPANDARCH_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/moeo_8h-source.html b/trunk/paradiseo-moeo/docs/html/moeo_8h-source.html new file mode 100644 index 000000000..ad8fe5b4c --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/moeo_8h-source.html @@ -0,0 +1,60 @@ + + +ParadisEO-MOEO: moeo.h Source File + + + + +
+
+

moeo.h

00001 // -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
+00002 
+00003 //-----------------------------------------------------------------------------
+00004 // moeo.h
+00005 // (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006
+00006 /*
+00007     This library...
+00008 
+00009     Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
+00010  */
+00011 //-----------------------------------------------------------------------------
+00012 
+00013 #ifndef MOEO_H_
+00014 #define MOEO_H_
+00015 
+00016 #include <eo>
+00017 
+00018 #include <moeoArchiveFitnessSavingUpdater.h>
+00019 #include <moeoArchiveUpdater.h>
+00020 #include <moeoArchive.h>
+00021 #include <moeoCombinedMOLS.h>
+00022 #include <moeoHybridMOLS.h>
+00023 #include <moeoMOLS.h>
+00024 #include <moeoReplacement.h>
+00025 #include <moeoSelectOneFromPopAndArch.h>
+00026 #include <metric/moeoBinaryMetricSavingUpdater.h>
+00027 #include <metric/moeoContributionMetric.h>
+00028 #include <metric/moeoEntropyMetric.h>
+00029 #include <metric/moeoMetric.h>
+00030 
+00031 #endif /*MOEO_H_ */
+

Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/pages.html b/trunk/paradiseo-moeo/docs/html/pages.html new file mode 100644 index 000000000..7b9f41ff6 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/pages.html @@ -0,0 +1,33 @@ + + +ParadisEO-MOEO: Page Index + + + + +
+
+

ParadisEO-MOEO Related Pages

Here is a list of all related documentation pages: +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/search.idx b/trunk/paradiseo-moeo/docs/html/search.idx new file mode 100644 index 000000000..eed83525e Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/search.idx differ diff --git a/trunk/paradiseo-moeo/docs/html/search.php b/trunk/paradiseo-moeo/docs/html/search.php new file mode 100644 index 000000000..2e30b9d1e --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/search.php @@ -0,0 +1,382 @@ + + +Search + + + + +
+
    +
  • Main Page
  • +
  • Classes
  • +
  • Files
  • +
  • Related Pages
  • +
  • +
    + + + + +1 document matching your query."; + } + else // $num>1 + { + return "Found $num documents matching your query. Showing best matches first."; + } +} + +function report_matches() +{ + return "Matches: "; +} +function end_form($value) +{ + echo " \n \n
    \n
    \n
  • \n
\n
\n"; +} + +function readInt($file) +{ + $b1 = ord(fgetc($file)); $b2 = ord(fgetc($file)); + $b3 = ord(fgetc($file)); $b4 = ord(fgetc($file)); + return ($b1<<24)|($b2<<16)|($b3<<8)|$b4; +} + +function readString($file) +{ + $result=""; + while (ord($c=fgetc($file))) $result.=$c; + return $result; +} + +function readHeader($file) +{ + $header =fgetc($file); $header.=fgetc($file); + $header.=fgetc($file); $header.=fgetc($file); + return $header; +} + +function computeIndex($word) +{ + // Fast string hashing + //$lword = strtolower($word); + //$l = strlen($lword); + //for ($i=0;$i<$l;$i++) + //{ + // $c = ord($lword{$i}); + // $v = (($v & 0xfc00) ^ ($v << 6) ^ $c) & 0xffff; + //} + //return $v; + + // Simple hashing that allows for substring search + if (strlen($word)<2) return -1; + // high char of the index + $hi = ord($word{0}); + if ($hi==0) return -1; + // low char of the index + $lo = ord($word{1}); + if ($lo==0) return -1; + // return index + return $hi*256+$lo; +} + +function search($file,$word,&$statsList) +{ + $index = computeIndex($word); + if ($index!=-1) // found a valid index + { + fseek($file,$index*4+4); // 4 bytes per entry, skip header + $index = readInt($file); + if ($index) // found words matching the hash key + { + $start=sizeof($statsList); + $count=$start; + fseek($file,$index); + $w = readString($file); + while ($w) + { + $statIdx = readInt($file); + if ($word==substr($w,0,strlen($word))) + { // found word that matches (as substring) + $statsList[$count++]=array( + "word"=>$word, + "match"=>$w, + "index"=>$statIdx, + "full"=>strlen($w)==strlen($word), + "docs"=>array() + ); + } + $w = readString($file); + } + $totalHi=0; + $totalFreqHi=0; + $totalFreqLo=0; + for ($count=$start;$count $idx, + "freq" => $freq>>1, + "rank" => 0.0, + "hi" => $freq&1 + ); + if ($freq&1) // word occurs in high priority doc + { + $totalHi++; + $totalFreqHi+=$freq*$multiplier; + } + else // word occurs in low priority doc + { + $totalFreqLo+=$freq*$multiplier; + } + } + // read name and url info for the doc + for ($i=0;$i<$numDocs;$i++) + { + fseek($file,$docInfo[$i]["idx"]); + $docInfo[$i]["name"]=readString($file); + $docInfo[$i]["url"]=readString($file); + } + $statInfo["docs"]=$docInfo; + } + $totalFreq=($totalHi+1)*$totalFreqLo + $totalFreqHi; + for ($count=$start;$count$key, + "name"=>$di["name"], + "rank"=>$rank + ); + } + $docs[$key]["words"][] = array( + "word"=>$wordInfo["word"], + "match"=>$wordInfo["match"], + "freq"=>$di["freq"] + ); + } + } + return $docs; +} + +function filter_results($docs,&$requiredWords,&$forbiddenWords) +{ + $filteredDocs=array(); + while (list ($key, $val) = each ($docs)) + { + $words = &$docs[$key]["words"]; + $copy=1; // copy entry by default + if (sizeof($requiredWords)>0) + { + foreach ($requiredWords as $reqWord) + { + $found=0; + foreach ($words as $wordInfo) + { + $found = $wordInfo["word"]==$reqWord; + if ($found) break; + } + if (!$found) + { + $copy=0; // document contains none of the required words + break; + } + } + } + if (sizeof($forbiddenWords)>0) + { + foreach ($words as $wordInfo) + { + if (in_array($wordInfo["word"],$forbiddenWords)) + { + $copy=0; // document contains a forbidden word + break; + } + } + } + if ($copy) $filteredDocs[$key]=$docs[$key]; + } + return $filteredDocs; +} + +function compare_rank($a,$b) +{ + if ($a["rank"] == $b["rank"]) + { + return 0; + } + return ($a["rank"]>$b["rank"]) ? -1 : 1; +} + +function sort_results($docs,&$sorted) +{ + $sorted = $docs; + usort($sorted,"compare_rank"); + return $sorted; +} + +function report_results(&$docs) +{ + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + $numDocs = sizeof($docs); + if ($numDocs==0) + { + echo " \n"; + echo " \n"; + echo " \n"; + } + else + { + echo " \n"; + echo " \n"; + echo " \n"; + $num=1; + foreach ($docs as $doc) + { + echo " \n"; + echo " "; + echo "\n"; + echo " \n"; + echo " \n"; + echo " \n"; + $num++; + } + } + echo "

".search_results()."

".matches_text(0)."
".matches_text($numDocs); + echo "\n"; + echo "
$num.".$doc["name"]."
".report_matches()." "; + foreach ($doc["words"] as $wordInfo) + { + $word = $wordInfo["word"]; + $matchRight = substr($wordInfo["match"],strlen($word)); + echo "$word$matchRight(".$wordInfo["freq"].") "; + } + echo "
\n"; +} + +function main() +{ + if(strcmp('4.1.0', phpversion()) > 0) + { + die("Error: PHP version 4.1.0 or above required!"); + } + if (!($file=fopen("search.idx","rb"))) + { + die("Error: Search index file could NOT be opened!"); + } + if (readHeader($file)!="DOXS") + { + die("Error: Header of index file is invalid!"); + } + $query=""; + if (array_key_exists("query", $_GET)) + { + $query=$_GET["query"]; + } + end_form($query); + echo " \n
\n"; + $results = array(); + $requiredWords = array(); + $forbiddenWords = array(); + $foundWords = array(); + $word=strtok($query," "); + while ($word) // for each word in the search query + { + if (($word{0}=='+')) { $word=substr($word,1); $requiredWords[]=$word; } + if (($word{0}=='-')) { $word=substr($word,1); $forbiddenWords[]=$word; } + if (!in_array($word,$foundWords)) + { + $foundWords[]=$word; + search($file,strtolower($word),$results); + } + $word=strtok(" "); + } + $docs = array(); + combine_results($results,$docs); + // filter out documents with forbidden word or that do not contain + // required words + $filteredDocs = filter_results($docs,$requiredWords,$forbiddenWords); + // sort the results based on rank + $sorted = array(); + sort_results($filteredDocs,$sorted); + // report results to the user + report_results($sorted); + echo "
\n"; + fclose($file); +} + +main(); + + +?> +
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/html/tab_b.gif b/trunk/paradiseo-moeo/docs/html/tab_b.gif new file mode 100644 index 000000000..0d623483f Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/tab_b.gif differ diff --git a/trunk/paradiseo-moeo/docs/html/tab_l.gif b/trunk/paradiseo-moeo/docs/html/tab_l.gif new file mode 100644 index 000000000..9b1e6337c Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/tab_l.gif differ diff --git a/trunk/paradiseo-moeo/docs/html/tab_r.gif b/trunk/paradiseo-moeo/docs/html/tab_r.gif new file mode 100644 index 000000000..ce9dd9f53 Binary files /dev/null and b/trunk/paradiseo-moeo/docs/html/tab_r.gif differ diff --git a/trunk/paradiseo-moeo/docs/html/tabs.css b/trunk/paradiseo-moeo/docs/html/tabs.css new file mode 100644 index 000000000..a61552a67 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/tabs.css @@ -0,0 +1,102 @@ +/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ + +DIV.tabs +{ + float : left; + width : 100%; + background : url("tab_b.gif") repeat-x bottom; + margin-bottom : 4px; +} + +DIV.tabs UL +{ + margin : 0px; + padding-left : 10px; + list-style : none; +} + +DIV.tabs LI, DIV.tabs FORM +{ + display : inline; + margin : 0px; + padding : 0px; +} + +DIV.tabs FORM +{ + float : right; +} + +DIV.tabs A +{ + float : left; + background : url("tab_r.gif") no-repeat right top; + border-bottom : 1px solid #84B0C7; + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + +DIV.tabs A:hover +{ + background-position: 100% -150px; +} + +DIV.tabs A:link, DIV.tabs A:visited, +DIV.tabs A:active, DIV.tabs A:hover +{ + color: #1A419D; +} + +DIV.tabs SPAN +{ + float : left; + display : block; + background : url("tab_l.gif") no-repeat left top; + padding : 5px 9px; + white-space : nowrap; +} + +DIV.tabs INPUT +{ + float : right; + display : inline; + font-size : 1em; +} + +DIV.tabs TD +{ + font-size : x-small; + font-weight : bold; + text-decoration : none; +} + + + +/* Commented Backslash Hack hides rule from IE5-Mac \*/ +DIV.tabs SPAN {float : none;} +/* End IE5-Mac hack */ + +DIV.tabs A:hover SPAN +{ + background-position: 0% -150px; +} + +DIV.tabs LI#current A +{ + background-position: 100% -150px; + border-width : 0px; +} + +DIV.tabs LI#current SPAN +{ + background-position: 0% -150px; + padding-bottom : 6px; +} + +DIV.nav +{ + background : none; + border : none; + border-bottom : 1px solid #84B0C7; +} diff --git a/trunk/paradiseo-moeo/docs/html/tree.html b/trunk/paradiseo-moeo/docs/html/tree.html new file mode 100644 index 000000000..86191b50b --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/tree.html @@ -0,0 +1,161 @@ + + + + + + + TreeView + + + + +
+

ParadisEO-MOEO

+
+

o*Welcome to ParadisEO-MOEO

+

o+Class List

+ +

o+Class Hierarchy

+ +

o*Class Members

+

o+File List

+
+

|o*index.h

+

|o*moeo.h

+

|o*moeoArchive.h

+

|o*moeoArchiveFitnessSavingUpdater.h

+

|o*moeoArchiveUpdater.h

+

|o*moeoBinaryMetricSavingUpdater.h

+

|o*moeoCombinedMOLS.h

+

|o*moeoContributionMetric.h

+

|o*moeoEntropyMetric.h

+

|o*moeoHybridMOLS.h

+

|o*moeoMetric.h

+

|o*moeoMOLS.h

+

|o*moeoReplacement.h

+

|\*moeoSelectOneFromPopAndArch.h

+
+

\+Related Pages

+ +
+
+ + diff --git a/trunk/paradiseo-moeo/docs/html/webpages.html b/trunk/paradiseo-moeo/docs/html/webpages.html new file mode 100644 index 000000000..51e8866d5 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/html/webpages.html @@ -0,0 +1,31 @@ + + +ParadisEO-MOEO: Related webpages + + + + +
+
+

Related webpages

+
Generated on Tue Dec 12 11:16:35 2006 for ParadisEO-MOEO by  + +doxygen 1.5.1
+ + diff --git a/trunk/paradiseo-moeo/docs/index.h b/trunk/paradiseo-moeo/docs/index.h new file mode 100644 index 000000000..a8ab0ea63 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/index.h @@ -0,0 +1,53 @@ +/** @mainpage Welcome to ParadisEO-MOEO + +@section intro Introduction + +ParadisEO-MOEO is a white-box object-oriented generic framework dedicated to the flexible design of evolutionary multi-objective algorithms. +This paradigm-free software embeds some features and techniques for Pareto-based resolution and +aims to provide a set of classes allowing to ease and speed up the development of computationally efficient programs. +It is based on a clear conceptual distinction between the solution methods and the multi-objective problems they are intended to solve. +This separation confers a maximum design and code reuse. +ParadisEO-MOEO provides a broad range of archive-related features (such as elitism or performance metrics) +and the most common Pareto-based fitness assignment strategies (MOGA, NSGA, SPEA, IBEA and more). +Furthermore, parallel and distributed models as well as hybridization mechanisms can be applied to an algorithm designed within ParadisEO-MOEO +using the whole version of ParadisEO. + + + +@section tutorial Tutorial + +A tutorial about a bi-objective flow-shop scheduling problem will be available soon. + + + +@section install Installation + +The installation procedure of the package is detailed in the README file in the top-directory of the source-tree. + + + +@section design Overall Design + +For an introduction to the design of ParadisEO-MOEO, +you can look at the ParadisEO website. +*/ + + + +/** @page webpages Related webpages + +- ParadisEO homepage +- INRIA GForge project page +- README +- NEWS +*/ + + + +// Local Variables: +// coding: iso-8859-1 +// mode: C++ +// c-file-style: "Stroustrup" +// fill-column: 80 +// End: diff --git a/trunk/paradiseo-moeo/docs/moeo.doxyfile b/trunk/paradiseo-moeo/docs/moeo.doxyfile new file mode 100644 index 000000000..fb44ccb41 --- /dev/null +++ b/trunk/paradiseo-moeo/docs/moeo.doxyfile @@ -0,0 +1,237 @@ +# Doxyfile 1.5.1 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = ParadisEO-MOEO +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = NO +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = NO +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = YES +HIDE_UNDOC_CLASSES = YES +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = NO +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = YES +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = . ../src +FILE_PATTERNS = *.cpp \ + *.h \ + NEWS README +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 3 +IGNORE_PREFIX = moeo +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = moeo.doxytag +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = YES diff --git a/trunk/paradiseo-moeo/src/Makefile.am b/trunk/paradiseo-moeo/src/Makefile.am new file mode 100755 index 000000000..ae1e51b3c --- /dev/null +++ b/trunk/paradiseo-moeo/src/Makefile.am @@ -0,0 +1 @@ +# Nothing to compile ! diff --git a/trunk/paradiseo-moeo/src/metric/moeoBinaryMetricSavingUpdater.h b/trunk/paradiseo-moeo/src/metric/moeoBinaryMetricSavingUpdater.h new file mode 100644 index 000000000..01aadfaa5 --- /dev/null +++ b/trunk/paradiseo-moeo/src/metric/moeoBinaryMetricSavingUpdater.h @@ -0,0 +1,94 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoBinaryMetricSavingUpdater.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOBINARYMETRICSAVINGUPDATER_H_ +#define MOEOBINARYMETRICSAVINGUPDATER_H_ + +#include +#include +#include +#include +#include + +/** + * This class allows to save the progression of a binary metric comparing the fitness values of the current population (or archive) + * with the fitness values of the population (or archive) of the generation (n-1) into a file + */ +template < class EOT > class moeoBinaryMetricSavingUpdater:public eoUpdater +{ +public: + + /** + * The fitness type of a solution + */ + typedef typename EOT::Fitness EOFitness; + + /** + * Ctor + * @param _metric the binary metric comparing two Pareto sets + * @param _pop the main population + * @param _filename the target filename + */ + moeoBinaryMetricSavingUpdater (moeoVectorVsVectorBM < EOT, double >&_metric, + const eoPop < EOT > &_pop, + std::string _filename):metric (_metric), + pop (_pop), filename (_filename), counter (1) + { + } + + /** + * Saves the metric's value for the current generation + */ + void operator () () + { + if (pop.size ()) + { + if (firstGen) + { + firstGen = false; + } + else + { + // creation of the two Pareto sets + std::vector < EOFitness > from; + std::vector < EOFitness > to; + for (unsigned i = 0; i < pop.size (); i++) + from.push_back (pop[i].fitness ()); + for (unsigned i = 0; i < oldPop.size (); i++) + to.push_back (oldPop[i].fitness ()); + // writing the result into the file + std::ofstream f (filename.c_str (), std::ios::app); + f << counter++ << ' ' << metric (from, to) << std::endl; + f.close (); + } + oldPop = pop; + } + } + +private: + + /** binary metric comparing two Pareto sets */ + moeoVectorVsVectorBM < EOT, double >&metric; + /** main population */ + const eoPop < EOT > &pop; + /** (n-1) population */ + eoPop < EOT > oldPop; + /** target filename */ + std::string filename; + /** is it the first generation ? */ + bool firstGen; + /** counter */ + unsigned counter; + +}; + +#endif /*MOEOBINARYMETRICSAVINGUPDATER_H_ */ diff --git a/trunk/paradiseo-moeo/src/metric/moeoContributionMetric.h b/trunk/paradiseo-moeo/src/metric/moeoContributionMetric.h new file mode 100644 index 000000000..7da5702df --- /dev/null +++ b/trunk/paradiseo-moeo/src/metric/moeoContributionMetric.h @@ -0,0 +1,116 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoContributionMetric.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOCONTRIBUTIONMETRIC_H_ +#define MOEOCONTRIBUTIONMETRIC_H_ + +#include + +/** + * The contribution metric evaluates the proportion of non-dominated solutions given by a Pareto set relatively to another Pareto set + * + * (Meunier, Talbi, Reininger: 'A multiobjective genetic algorithm for radio network optimization', in Proc. of the 2000 Congress on Evolutionary Computation, IEEE Press, pp. 317-324) + */ +template < class EOT > class moeoContributionMetric:public moeoVectorVsVectorBM < EOT, + double > +{ +public: + + /** + * The fitness type of a solution + */ + typedef typename EOT::Fitness EOFitness; + + /** + * Returns the contribution of the Pareto set '_set1' relatively to the Pareto set '_set2' + * @param _set1 the first Pareto set + * @param _set2 the second Pareto set + */ + double operator () (const std::vector < EOFitness > &_set1, + const std::vector < EOFitness > &_set2) + { + unsigned c = card_C (_set1, _set2); + unsigned w1 = card_W (_set1, _set2); + unsigned n1 = card_N (_set1, _set2); + unsigned w2 = card_W (_set2, _set1); + unsigned n2 = card_N (_set2, _set1); + return (double) (c / 2.0 + w1 + n1) / (c + w1 + n1 + w2 + n2); + } + + +private: + + /** + * Returns the number of solutions both in '_set1' and '_set2' + * @param _set1 the first Pareto set + * @param _set2 the second Pareto set + */ + unsigned card_C (const std::vector < EOFitness > &_set1, + const std::vector < EOFitness > &_set2) + { + unsigned c = 0; + for (unsigned i = 0; i < _set1.size (); i++) + for (unsigned j = 0; j < _set2.size (); j++) + if (_set1[i] == _set2[j]) + { + c++; + break; + } + return c; + } + + /** + * Returns the number of solutions in '_set1' dominating at least one solution of '_set2' + * @param _set1 the first Pareto set + * @param _set2 the second Pareto set + */ + unsigned card_W (const std::vector < EOFitness > &_set1, + const std::vector < EOFitness > &_set2) + { + unsigned w = 0; + for (unsigned i = 0; i < _set1.size (); i++) + for (unsigned j = 0; j < _set2.size (); j++) + if (_set1[i].dominates (_set2[j])) + { + w++; + break; + } + return w; + } + + /** + * Returns the number of solutions in '_set1' having no relation of dominance with those from '_set2' + * @param _set1 the first Pareto set + * @param _set2 the second Pareto set + */ + unsigned card_N (const std::vector < EOFitness > &_set1, + const std::vector < EOFitness > &_set2) + { + unsigned n = 0; + for (unsigned i = 0; i < _set1.size (); i++) + { + bool domin_rel = false; + for (unsigned j = 0; j < _set2.size (); j++) + if (_set1[i].dominates (_set2[j]) || _set2[j].dominates (_set1[i])) + { + domin_rel = true; + break; + } + if (!domin_rel) + n++; + } + return n; + } + +}; + +#endif /*MOEOCONTRIBUTIONMETRIC_H_ */ diff --git a/trunk/paradiseo-moeo/src/metric/moeoEntropyMetric.h b/trunk/paradiseo-moeo/src/metric/moeoEntropyMetric.h new file mode 100644 index 000000000..e760e35f6 --- /dev/null +++ b/trunk/paradiseo-moeo/src/metric/moeoEntropyMetric.h @@ -0,0 +1,179 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoEntropyMetric.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOENTROPYMETRIC_H_ +#define MOEOENTROPYMETRIC_H_ + +#include + +/** + * The entropy gives an idea of the diversity of a Pareto set relatively to another Pareto set + * + * (Basseur, Seynhaeve, Talbi: 'Design of Multi-objective Evolutionary Algorithms: Application to the Flow-shop Scheduling Problem', in Proc. of the 2002 Congress on Evolutionary Computation, IEEE Press, pp. 1155-1156) + */ +template < class EOT > class moeoEntropyMetric:public moeoVectorVsVectorBM < EOT, + double > +{ +public: + + /** + * The fitness type of a solution + */ + typedef typename EOT::Fitness EOFitness; + + /** + * Returns the entropy of the Pareto set '_set1' relatively to the Pareto set '_set2' + * @param _set1 the first Pareto set + * @param _set2 the second Pareto set + */ + double operator () (const std::vector < EOFitness > &_set1, + const std::vector < EOFitness > &_set2) + { + // normalization + std::vector < EOFitness > set1 = _set1; + std::vector < EOFitness > set2 = _set2; + removeDominated (set1); + removeDominated (set2); + prenormalize (set1); + normalize (set1); + normalize (set2); + + // making of PO* + std::vector < EOFitness > star; // rotf :-) + computeUnion (set1, set2, star); + removeDominated (star); + + // making of PO1 U PO* + std::vector < EOFitness > union_set1_star; // rotf again ... + computeUnion (set1, star, union_set1_star); + + unsigned C = union_set1_star.size (); + float omega = 0; + float entropy = 0; + + for (unsigned i = 0; i < C; i++) + { + unsigned N_i = + howManyInNicheOf (union_set1_star, union_set1_star[i], + star.size ()); + unsigned n_i = + howManyInNicheOf (set1, union_set1_star[i], star.size ()); + if (n_i > 0) + { + omega += 1.0 / N_i; + entropy += + (float) n_i / (N_i * C) * log (((float) n_i / C) / log (2.0)); + } + } + entropy /= -log (omega); + entropy *= log (2.0); + return entropy; + } + + +private: + + std::vector < double >vect_min_val; + std::vector < double >vect_max_val; + + void removeDominated (std::vector < EOFitness > &_f) + { + for (unsigned i = 0; i < _f.size (); i++) + { + bool dom = false; + for (unsigned j = 0; j < _f.size (); j++) + if (i != j && _f[j].dominates (_f[i])) + { + dom = true; + break; + } + if (dom) + { + _f[i] = _f.back (); + _f.pop_back (); + i--; + } + } + } + + void prenormalize (const std::vector < EOFitness > &_f) + { + vect_min_val.clear (); + vect_max_val.clear (); + + for (unsigned char i = 0; i < EOFitness::fitness_traits::nObjectives (); + i++) + { + float min_val = _f.front ()[i], max_val = min_val; + for (unsigned j = 1; j < _f.size (); j++) + { + if (_f[j][i] < min_val) + min_val = _f[j][i]; + if (_f[j][i] > max_val) + max_val = _f[j][i]; + } + vect_min_val.push_back (min_val); + vect_max_val.push_back (max_val); + } + } + + void normalize (std::vector < EOFitness > &_f) + { + for (unsigned i = 0; i < EOFitness::fitness_traits::nObjectives (); i++) + for (unsigned j = 0; j < _f.size (); j++) + _f[j][i] = + (_f[j][i] - vect_min_val[i]) / (vect_max_val[i] - vect_min_val[i]); + } + + void computeUnion (const std::vector < EOFitness > &_f1, + const std::vector < EOFitness > &_f2, + std::vector < EOFitness > &_f) + { + _f = _f1; + for (unsigned i = 0; i < _f2.size (); i++) + { + bool b = false; + for (unsigned j = 0; j < _f1.size (); j++) + if (_f1[j] == _f2[i]) + { + b = true; + break; + } + if (!b) + _f.push_back (_f2[i]); + } + } + + unsigned howManyInNicheOf (const std::vector < EOFitness > &_f, + const EOFitness & _s, unsigned _size) + { + unsigned n = 0; + for (unsigned i = 0; i < _f.size (); i++) + { + if (euclidianDistance (_f[i], _s) < (_s.size () / (double) _size)) + n++; + } + return n; + } + + double euclidianDistance (const EOFitness & _set1, const EOFitness & _to, + unsigned _deg = 2) + { + double dist = 0; + for (unsigned i = 0; i < _set1.size (); i++) + dist += pow (fabs (_set1[i] - _to[i]), (int) _deg); + return pow (dist, 1.0 / _deg); + } + +}; + +#endif /*MOEOENTROPYMETRIC_H_ */ diff --git a/trunk/paradiseo-moeo/src/metric/moeoMetric.h b/trunk/paradiseo-moeo/src/metric/moeoMetric.h new file mode 100644 index 000000000..8e29440dd --- /dev/null +++ b/trunk/paradiseo-moeo/src/metric/moeoMetric.h @@ -0,0 +1,106 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoMetric.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOMETRIC_H_ +#define MOEOMETRIC_H_ + +#include + +/** + * Base class for performance metrics (also called quality indicators) + */ +class moeoMetric:public eoFunctorBase +{ +}; + + +/** + * Base class for unary metrics + */ +template < class A, class R > class moeoUM:public eoUF < A, R >, + public moeoMetric +{ +}; + + +/** + * Base class for binary metrics + */ +template < class A1, class A2, class R > class moeoBM:public eoBF < A1, A2, R >, + public moeoMetric +{ +}; + + +/** + * Base class for unary metrics dedicated to the performance evaluation of a single solution's Pareto fitness + */ +template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoSolutionUM:public moeoUM < + const + EOFitness &, + R > +{ +}; + + +/** + * Base class for unary metrics dedicated to the performance evaluation of a Pareto set (a vector of Pareto fitnesses) + */ +template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorUM:public moeoUM < + const + std::vector < +EOFitness > &, + R > +{ +}; + + +/** + * Base class for binary metrics dedicated to the performance comparison between two solutions's Pareto fitnesses + */ +template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoSolutionVsSolutionBM:public moeoBM < + const + EOFitness &, const + EOFitness &, + R > +{ +}; + + +/** + * Base class for binary metrics dedicated to the performance comparison between a Pareto set (a vector of Pareto fitnesses) and a single solution's Pareto fitness + */ +template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorVsSolutionBM:public moeoBM < + const + std::vector < +EOFitness > &, const + EOFitness &, + R > +{ +}; + + +/** + * Base class for binary metrics dedicated to the performance comparison between two Pareto sets (two vectors of Pareto fitnesses) + */ +template < class EOT, class R, class EOFitness = typename EOT::Fitness > class moeoVectorVsVectorBM:public moeoBM < + const + std::vector < +EOFitness > &, const + std::vector < +EOFitness > &, + R > +{ +}; + + +#endif /*MOEOMETRIC_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeo b/trunk/paradiseo-moeo/src/moeo new file mode 100644 index 000000000..3bf19e773 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeo @@ -0,0 +1,18 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeo +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEO_ +#define MOEO_ + +#include + +#endif /*MOEO_H_*/ diff --git a/trunk/paradiseo-moeo/src/moeo.h b/trunk/paradiseo-moeo/src/moeo.h new file mode 100644 index 000000000..8478ee48e --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeo.h @@ -0,0 +1,31 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeo.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEO_H_ +#define MOEO_H_ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /*MOEO_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoArchive.h b/trunk/paradiseo-moeo/src/moeoArchive.h new file mode 100644 index 000000000..9547dd06e --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoArchive.h @@ -0,0 +1,106 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoArchive.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOARCHIVE_H_ +#define MOEOARCHIVE_H_ + +#include + +/** + * An archive is a secondary population that stores non-dominated solutions + */ +template < class EOT > class moeoArchive:public eoPop < EOT > +{ +public: + + using std::vector < EOT >::size; + using std::vector < EOT >::operator[]; + using std::vector < EOT >::back; + using std::vector < EOT >::pop_back; + + /** + * The fitness type of a solution + */ + typedef typename EOT::Fitness EOFitness; + + /** + * Returns true if the current archive dominates _fit + * @param _fit the (Pareto) fitness to compare with the current archive + */ + bool dominates (const EOFitness & _fit) const + { + for (unsigned i = 0; i < size; i++) + if (operator[](i).fitness ().dominates (_fit)) + return true; + return false; + } + + /** + * Returns true if the current archive contains _fit + * @param _fit the (Pareto) fitness to search within the current archive + */ + bool contains (const EOFitness & _fit) const + { + for (unsigned i = 0; i < size; i++) + if (operator[](i).fitness () == _fit) + return true; + return false; + } + + /** + * Updates the archive with a given individual _eo + * @param _eo the given individual + */ + void update (const EOT & _eo) + { + // Removing the dominated solutions from the archive + for (unsigned j = 0; j < size ();) + { + if (_eo.fitness ().dominates (operator[](j).fitness ())) + { + operator[](j) = back (); + pop_back (); + } + else if (_eo.fitness () == operator[](j).fitness ()) + { + operator[](j) = back (); + pop_back (); + } + else + j++; + } + + // Dominated ? + bool dom = false; + for (unsigned j = 0; j < size (); j++) + if (operator [](j).fitness ().dominates (_eo.fitness ())) + { + dom = true; + break; + } + if (!dom) + push_back (_eo); + } + + /** + * Updates the archive with a given population _pop + * @param _pop the given population + */ + void update (const eoPop < EOT > &_pop) + { + for (unsigned i = 0; i < _pop.size (); i++) + update (_pop[i]); + } + +}; + +#endif /*MOEOARCHIVE_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoArchiveFitnessSavingUpdater.h b/trunk/paradiseo-moeo/src/moeoArchiveFitnessSavingUpdater.h new file mode 100644 index 000000000..b1e839331 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoArchiveFitnessSavingUpdater.h @@ -0,0 +1,73 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoArchiveFitnessSavingUpdater.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOARCHIVEFITNESSSAVINGUPDATER_H_ +#define MOEOARCHIVEFITNESSSAVINGUPDATER_H_ + +#include +#include +#include +#include +#include + +#define MAX_BUFFER_SIZE 1000 + +/** + * This class allows to save the fitnesses of solutions contained in an archive into a file at each generation. + */ +template < class EOT > class moeoArchiveFitnessSavingUpdater:public eoUpdater +{ +public: + + /** + * Ctor + * @param _arch local archive + * @param _filename target filename + * @param _id own ID + */ +moeoArchiveFitnessSavingUpdater (moeoArchive < EOT > &_arch, const std::string & _filename = "Res/Arch", int _id = -1):arch (_arch), filename (_filename), id (_id), + counter + (0) + { + } + + /** + * Saves the fitness of the archive's members into the file + */ + void operator () () + { + char buff[MAX_BUFFER_SIZE]; + if (id == -1) + sprintf (buff, "%s.%u", filename.c_str (), counter++); + else + sprintf (buff, "%s.%u.%u", filename.c_str (), id, counter++); + std::ofstream f (buff); + for (unsigned i = 0; i < arch.size (); i++) + f << arch[i].fitness () << std::endl; + f.close (); + } + + +private: + + /** local archive */ + moeoArchive < EOT > &arch; + /** target filename */ + std::string filename; + /** own ID */ + int id; + /** counter */ + unsigned counter; + +}; + +#endif /*MOEOARCHIVEFITNESSSAVINGUPDATER_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoArchiveUpdater.h b/trunk/paradiseo-moeo/src/moeoArchiveUpdater.h new file mode 100644 index 000000000..581742849 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoArchiveUpdater.h @@ -0,0 +1,56 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoArchiveUpdater.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOARCHIVEUPDATER_H_ +#define MOEOARCHIVEUPDATER_H_ + +#include +#include +#include + +/** + * This class allows to update the archive at each generation with newly found non-dominated solutions + */ +template < class EOT > class moeoArchiveUpdater:public eoUpdater +{ +public: + + /** + * Ctor + * @param _arch an archive of non-dominated solutions + * @param _pop the main population + */ + moeoArchiveUpdater (moeoArchive < EOT > &_arch, + const eoPop < EOT > &_pop):arch (_arch), pop (_pop) + { + } + + + /** + * Updates the archive with newly found non-dominated solutions contained in the main population + */ + void operator () () + { + arch.update (pop); + } + + +private: + + /** the archive of non-dominated solutions */ + moeoArchive < EOT > &arch; + /** the main population */ + const eoPop < EOT > &pop; + +}; + +#endif /*MOEOARCHIVEUPDATER_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoCombinedMOLS.h b/trunk/paradiseo-moeo/src/moeoCombinedMOLS.h new file mode 100644 index 000000000..30c9dc206 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoCombinedMOLS.h @@ -0,0 +1,71 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoCombinedMOLS.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOCOMBINEDMOLS_H_ +#define MOEOCOMBINEDMOLS_H_ + +#include +#include +#include + +/** + * This class allows to embed a set of local searches that are sequentially applied, + * and so working and updating the same archive of non-dominated solutions + */ +template < class EOT > class moeoCombinedMOLS:public moeoMOLS < EOT > +{ +public: + + /** + * Ctor + * @param _eval the full evaluator of a solution + * @param _first_ls the first multi-objective local search to add + */ +moeoCombinedMOLS (eoEvalFunc < EOT > &_eval, moeoMOLS < EOT > &_first_ls):eval + (_eval) + { + combinedMOLS.push_back (&_first_ls); + } + + /** + * Adds a new local search to combine + * @param _ls the multi-objective local search to add + */ + void add (moeoMOLS < EOT > &_ls) + { + combinedMOLS.push_back (&_ls); + } + + /** + * Gives a new solution in order to explore the neigborhood. + * The new non-dominated solutions are added to the archive + * @param _eo the solution + * @param _arch the archive of non-dominated solutions + */ + void operator () (const EOT & _eo, moeoArchive < EOT > &_arch) + { + eval (const_cast < EOT & >(_eo)); + for (unsigned i = 0; i < combinedMOLS.size (); i++) + combinedMOLS[i]->operator ()(_eo, _arch); + } + + +private: + + /** the full evaluator of a solution */ + eoEvalFunc < EOT > &eval; + /** the vector that contains the combined MOLS */ + std::vector < moeoMOLS < EOT > *>combinedMOLS; + +}; + +#endif /*MOEOCOMBINEDMOLS_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoHybridMOLS.h b/trunk/paradiseo-moeo/src/moeoHybridMOLS.h new file mode 100644 index 000000000..7ab4fc2ed --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoHybridMOLS.h @@ -0,0 +1,74 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoHybridMOLS.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOHYBRIDMOLS_H_ +#define MOEOHYBRIDMOLS_H_ + +#include +#include +#include +#include +#include +#include + +/** + * This class allows to apply a multi-objective local search to a number of selected individuals contained in the archive + * at every generation until a stopping criteria is verified. + */ +template < class EOT > class moeoHybridMOLS:public eoUpdater +{ +public: + + /** + * Ctor + * @param _term stopping criteria + * @param _select selector + * @param _mols a multi-objective local search + * @param _arch the archive + */ +eoHybridMOLS (eoContinue < EOT > &_term, eoSelect < EOT > &_select, moeoMOLS < EOT > &_mols, moeoArchive < EOT > &_arch):term (_term), select (_select), mols (_mols), + arch + (_arch) + { + } + + /** + * Applies the multi-objective local search to selected individuals contained in the archive if the stopping criteria is not verified + */ + void operator () () + { + if (!cont (arch)) + { + // selection of solutions + eoPop < EOT > selectedSolutions; + select (arch, selectedSolutions); + // apply the local search to every selected solution + for (unsigned i = 0; i < selectedSolutions.size (); i++) + mols (selectedSolutions[i], arch); + } + } + + +private: + + /** stopping criteria*/ + eoContinue < EOT > &term; + /** selector */ + eoSelect < EOT > &select; + /** multi-objective local search */ + moeoMOLS < EOT > &mols; + /** archive */ + moeoArchive < EOT > &arch; + +}; + +#endif /*MOEOHYBRIDMOLS_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoMOLS.h b/trunk/paradiseo-moeo/src/moeoMOLS.h new file mode 100644 index 000000000..b2ecd3353 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoMOLS.h @@ -0,0 +1,28 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoMOLS.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOMOLS_H_ +#define MOEOMOLS_H_ + +#include +#include + +/** + * Abstract class for local searches applied to multi-objective optimization. + * Starting from only one solution, it produces a set of new non-dominated solutions. + */ +template < class EOT > class moeoMOLS:public eoBF < const EOT &, moeoArchive < EOT > &, + void > +{ +}; + +#endif /*MOEOMOLS_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoReplacement.h b/trunk/paradiseo-moeo/src/moeoReplacement.h new file mode 100644 index 000000000..a1148e119 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoReplacement.h @@ -0,0 +1,169 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoReplacement.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOREPLACEMENT_H_ +#define MOEOREPLACEMENT_H_ + +#include +#include +#include + + +/** + * Replacement strategy for multi-objective optimization + */ +template < class EOT, class WorthT > class moeoReplacement:public eoReplacement < + EOT > +{ +}; + + +/** + * Keep all the best individuals + * (almost cut-and-pasted from eoNDPlusReplacement, (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2002) + */ +template < class EOT, class WorthT = + double >class moeoElitistReplacement:public moeoReplacement < EOT, WorthT > +{ +public: + + /** + * constructor + * @param _perf2worth the functor class to transform raw fitnesses into fitness for selection + */ + moeoElitistReplacement (eoPerf2Worth < EOT, + WorthT > &_perf2worth):perf2worth (_perf2worth) + { + } + + + /** + * replacement - result in _parents + * @param _parents parents population + * @param _offspring offspring population + */ + void operator () (eoPop < EOT > &_parents, eoPop < EOT > &_offspring) + { + unsigned size = _parents.size (); + _parents.reserve (_parents.size () + _offspring.size ()); + copy (_offspring.begin (), _offspring.end (), back_inserter (_parents)); + + // calculate worths + perf2worth (_parents); + perf2worth.sort_pop (_parents); + perf2worth.resize (_parents, size); + + _offspring.clear (); + } + +private: + /** the functor object to transform raw fitnesses into fitness for selection */ + eoPerf2Worth < EOT, WorthT > &perf2worth; +}; + + +/** + * Same than moeoElitistReplacement except that distinct individuals are privilegied + */ +template < class EOT, class WorthT = + double >class moeoDisctinctElitistReplacement:public moeoReplacement < EOT, + WorthT > +{ +public: + + /** + * constructor + * @param _perf2worth the functor class to transform raw fitnesses into fitness for selection + */ + moeoDisctinctElitistReplacement (eoPerf2Worth < EOT, + WorthT > + &_perf2worth):perf2worth (_perf2worth) + { + } + + + /** + * replacement - result in _parents + * @param _parents parents population + * @param _offspring offspring population + */ + void operator () (eoPop < EOT > &_parents, eoPop < EOT > &_offspring) + { + unsigned size = _parents.size (); + _parents.reserve (_parents.size () + _offspring.size ()); + copy (_offspring.begin (), _offspring.end (), back_inserter (_parents)); + + // creation of the new population (of size 'size') + createNewPop (_parents, size); + + _offspring.clear (); + } + + +private: + + /** the functor object to transform raw fitnesses into fitness for selection */ + eoPerf2Worth < EOT, WorthT > &perf2worth; + + + /** + * creation of the new population of size _size + * @param _pop the initial population (will be modified) + * @param _size the size of the population to create + */ + void createNewPop (eoPop < EOT > &_pop, unsigned _size) + { + // the number of occurences for each individual + std::map < EOT, unsigned >nb_occurences; + for (unsigned i = 0; i < _pop.size (); i++) + nb_occurences[_pop[i]] = 0; + // the new population + eoPop < EOT > new_pop; + new_pop.reserve (_pop.size ()); + for (unsigned i = 0; i < _pop.size (); i++) + { + if (nb_occurences[_pop[i]] == 0) + new_pop.push_back (_pop[i]); + nb_occurences[_pop[i]]++; + } + + // calculate worths (on the new population) + perf2worth (new_pop); + perf2worth.sort_pop (new_pop); + + // if case there's not enough individuals in the population... + unsigned new_pop_size_init = new_pop.size (); + unsigned k = 0; + while (new_pop.size () < _size) + { + if (k < new_pop_size_init) + { + if (nb_occurences[new_pop[k]] > 1) + { + new_pop.push_back (new_pop[k]); + nb_occurences[new_pop[k]]--; + } + k++; + } + else + k = 0; + } + + // resize and swap the populations + perf2worth.resize (new_pop, _size); + _pop.resize (_size); + _pop.swap (new_pop); + } + +}; + +#endif /*MOEOREPLACEMENT_H_ */ diff --git a/trunk/paradiseo-moeo/src/moeoSelectOneFromPopAndArch.h b/trunk/paradiseo-moeo/src/moeoSelectOneFromPopAndArch.h new file mode 100644 index 000000000..aea605b51 --- /dev/null +++ b/trunk/paradiseo-moeo/src/moeoSelectOneFromPopAndArch.h @@ -0,0 +1,93 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// moeoSelectOneFormPopAndArch.h +// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2006 +/* + This library... + + Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr + */ +//----------------------------------------------------------------------------- + +#ifndef MOEOSELECTONEFROMPOPANDARCH_H_ +#define MOEOSELECTONEFROMPOPANDARCH_H_ + +#include +#include +#include +#include +#include + +/** + * Elitist selection process that consists in choosing individuals in the archive as well as in the current population. + */ +template < class EOT > class moeoSelectOneFromPopAndArch:public eoSelectOne < + EOT > +{ +public: + + /** + * Ctor + * @param _popSelectOne the population's selection operator + * @param _archSelectOne the archive's selection operator + * @param _arch the archive + * @param _ratioFromPop the ratio of selected individuals from the population + */ +moeoSelectOneFromPopAndArch (eoSelectOne < EOT > &_popSelectOne, eoSelectOne < EOT > _archSelectOne, moeoArchive < EOT > &_arch, double _ratioFromPop = 0.5):popSelectOne (_popSelectOne), archSelectOne (_archSelectOne), arch (_arch), + ratioFromPop + (_ratioFromPop) + { + } + + /** + * Ctor - the archive's selection operator is a random selector + * @param _popSelectOne the population's selection operator + * @param _arch the archive + * @param _ratioFromPop the ratio of selected individuals from the population + */ +moeoSelectOneFromPopAndArch (eoSelectOne < EOT > &_popSelectOne, moeoArchive < EOT > &_arch, double _ratioFromPop = 0.5):popSelectOne (_popSelectOne), archSelectOne (randomSelect), arch (_arch), + ratioFromPop + (_ratioFromPop) + { + } + + /** + * The selection process + */ + virtual const EOT & operator () (const eoPop < EOT > &pop) + { + if (arch.size () > 0) + if (rng.flip (ratioFromPop)) + return popSelectOne (pop); + else + return archSelectOne (arch); + else + return popSelectOne (pop); + } + + /** + * Setups some population stats + */ + virtual void setup (const eoPop < EOT > &_pop) + { + popSelectOne.setup (_pop); + } + + +private: + + /** The population's selection operator */ + eoSelectOne < EOT > &popSelectOne; + /** The archive's selection operator */ + eoSelectOne < EOT > &archSelectOne; + /** the archive */ + moeoArchive < EOT > &arch; + /** the ratio of selected individuals from the population*/ + double ratioFromPop; + /** the random selection operator */ + eoRandomSelect < EOT > randomSelect; + +}; + +#endif /*MOEOSELECTONEFROMPOPANDARCH_H_ */ diff --git a/trunk/paradiseo-moeo/src/old/eoBinaryQualityIndicator.h b/trunk/paradiseo-moeo/src/old/eoBinaryQualityIndicator.h new file mode 100644 index 000000000..38df7f007 --- /dev/null +++ b/trunk/paradiseo-moeo/src/old/eoBinaryQualityIndicator.h @@ -0,0 +1,420 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoBinaryQualityIndicator.h" + +// (c) OPAC Team, LIFL, June 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _eoBinaryQualityIndicator_h +#define _eoBinaryQualityIndicator_h + +// for std::exceptions +#include +// for eoBF +#include + + +/** + * Functor + * Binary quality indicator + * Binary performance measure to use in the replacement selection process of IBEA (Indicator-Based Evolutionary Algorithm) + * Of course, EOFitness needs to be an eoParetoFitness object + */ +template < class EOFitness > class eoBinaryQualityIndicator:public eoBF < const EOFitness &, const EOFitness &, + double > +{ + +public: + + /** + * constructor + */ + eoBinaryQualityIndicator ():eoBF < const EOFitness &, const EOFitness &, + double >() + { + bounds.reserve (traits::nObjectives ()); + bounds.resize (traits::nObjectives ()); + } + + + /** + * set the bounds for objective _iObj + * @param unsigned _iObj the index of the objective + * @param double _min the minimum value + * @param double _max the maximum value + */ + void setBounds (const unsigned _iObj, const double _min, const double _max) + { + bounds[_iObj] = Range (_min, _max); + } + + +protected: + + /** + * Private class to represent the bounds + */ + class Range + { + public: + Range () + { + min = 0; + max = 0; + r = 0; + } + Range (const double _min, const double _max) + { + min = _min; + max = _max; + r = max - min; + if (r < 0) + throw std::logic_error ("Negative range in eoBinaryQualityIndicator"); + } + double minimum () + { + return min; + } + double maximum () + { + return max; + } + double range () + { + return r; + } + private: + double min, max, r; + }; + + + /** range (min and max double value) for each objective */ + std::vector < Range > bounds; + + +private: + + /** fitness traits */ + typedef typename EOFitness::fitness_traits traits; + +}; + + + + + +/** + * Functor + * Additive binary epsilon indicator for eoParetoFitness + */ +template < class EOFitness > class eoAdditiveBinaryEpsilonIndicator:public eoBinaryQualityIndicator < + EOFitness + > +{ + +public: + + /** + * constructor + */ +eoAdditiveBinaryEpsilonIndicator ():eoBinaryQualityIndicator < EOFitness > + () + { + } + + + /** + * computation of the maximum epsilon value by which individual _eo1 must be + * decreased in all objectives such that individual _eo2 is weakly dominated + * (do not forget to set the bounds before the call of this function) + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + */ + double operator () (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2) + { + double epsilon, tmp; + // computation of the epsilon value for the first objective + epsilon = epsilonValue (_fitness_eo1, _fitness_eo2, 0); + // computation of the epsilon value for other objectives + for (unsigned i = 1; i < traits::nObjectives (); i++) + { + tmp = epsilonValue (_fitness_eo1, _fitness_eo2, i); + epsilon = std::max (epsilon, tmp); + } + // the maximum epsilon value + return epsilon; + } + + +private: + + /** fitness traits */ + typedef typename EOFitness::fitness_traits traits; + /** bounds */ + using eoAdditiveBinaryEpsilonIndicator < EOFitness >::bounds; + + + /** + * computation of the epsilon value by which individual _eo1 must be + * decreased in the objective _iObj such that individual _eo2 is weakly dominated + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + * @param unsigned _iObj the index of the objective + */ + double epsilonValue (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2, const unsigned _iObj) + { + double result; + if (bounds[_iObj].range () == 0) + { + // min==max => every individuals has the same value for this objective + result = 0; + } + else + { + // computation of the epsilon value for the objective _iObj (in case of a minimization) + result = + (_fitness_eo1[_iObj] - + bounds[_iObj].minimum ()) / bounds[_iObj].range (); + result -= + (_fitness_eo2[_iObj] - + bounds[_iObj].minimum ()) / bounds[_iObj].range (); + // if we are maximizing, invert the value + if (traits::maximizing (_iObj)) + result = -result; + } + // the espilon value + return result; + } + +}; + + + + + +/** + * Functor + * Binary hypervolume indicator for eoParetoFitness + */ +template < class EOFitness > class eoBinaryHypervolumeIndicator:public eoBinaryQualityIndicator < + EOFitness > +{ + +public: + + /** + * constructor + * @param double _rho reference point for the hypervolume calculation (rho must not be smaller than 1) + */ +eoBinaryHypervolumeIndicator (double _rho):eoBinaryQualityIndicator < EOFitness > + () + { + rho = _rho; + // consistency check + if (rho < 1) + { + cout << + "Warning, reference point rho for the hypervolume calculation must not be smaller than 1" + << endl; + cout << "Adjusted to 1" << endl; + rho = 1; + } + } + + + /** + * indicator value of the hypervolume of the portion of the objective space + * that is dominated by individual _eo1 but not by individual _eo2 + * (don't forget to set the bounds before the call of this function) + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + */ + double operator () (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2) + { + double result; + if (_fitness_eo1.dominates (_fitness_eo2)) + result = + -hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + traits::nObjectives ()); + else + result = + hypervolumeIndicatorValue (_fitness_eo2, _fitness_eo1, + traits::nObjectives ()); + return result; + } + + +private: + + /** fitness traits */ + typedef typename EOFitness::fitness_traits traits; + /** bounds */ + using eoBinaryHypervolumeIndicator < EOFitness >::bounds; + + /** reference point for the hypervolume calculation */ + double rho; + + + /** + * computation of the hypervolume of the portion of the objective space + * that is dominated by individual _eo1 but not by individual _eo2 + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + * @param unsigned _iObj number of objectives (used for iteration) + * @param bool _flag = false (only used for iteration) + */ + double hypervolumeIndicatorValue (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2, + const unsigned _iObj, const bool _flag = + false) + { + double result; + if (bounds[_iObj - 1].range () == 0) + { + // min==max => every individuals as the same value for this objective + result = 0; + } + else + { + if (traits::maximizing (_iObj - 1)) // maximizing + result = + hypervolumeIndicatorValueMax (_fitness_eo1, _fitness_eo2, _iObj, + _flag); + else // minimizing + result = + hypervolumeIndicatorValueMin (_fitness_eo1, _fitness_eo2, _iObj, + _flag); + } + return result; + } + + + /** + * computation of the hypervolume of the portion of the objective space + * that is dominated by individual _eo1 but not by individual _eo2 + * in case of a minimization on the objective _iObj + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + * @param unsigned _iObj index of the objective + * @param bool _flag (only used for iteration) + */ + double hypervolumeIndicatorValueMin (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2, + const unsigned _iObj, const bool _flag) + { + double result; + double r = rho * bounds[_iObj - 1].range (); + double max = bounds[_iObj - 1].minimum () + r; + // fitness of individuals _eo1 and _eo2 for the objective _iObj (if flag==true, _eo2 is not taken into account) + double fitness_eo1 = _fitness_eo1[_iObj - 1]; + double fitness_eo2; + if (_flag) + fitness_eo2 = max; + else + fitness_eo2 = _fitness_eo2[_iObj - 1]; + // computation of the volume + if (_iObj == 1) + { + if (fitness_eo1 < fitness_eo2) + result = (fitness_eo2 - fitness_eo1) / r; + else + result = 0; + } + else + { + if (fitness_eo1 < fitness_eo2) + { + result = + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1) * (max - fitness_eo2) / r; + result += + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1, + true) * (fitness_eo2 - + fitness_eo1) / r; + } + else + result = + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1) * (max - fitness_eo2) / r; + } + // the volume + return result; + } + + + /** + * computation of the hypervolume of the portion of the objective space + * that is dominated by individual _eo1 but not by individual _eo2 + * in case of a maximization on the objective _iObj + * @param EOFitness & _fitness_eo1 the fitness of the first individual + * @param EOFitness & _fitness_eo2 the fitness of the second individual + * @param unsigned _iObj index of the objective + * @param bool _flag (only used for iteration) + */ + double hypervolumeIndicatorValueMax (const EOFitness & _fitness_eo1, + const EOFitness & _fitness_eo2, + const unsigned _iObj, const bool _flag) + { + double result; + double r = rho * bounds[_iObj - 1].range (); + double min = bounds[_iObj - 1].maximum () - r; + // fitness of individuals _eo1 and _eo2 for the objective _iObj (if flag==true, _eo2 is not taken into account) + double fitness_eo1 = _fitness_eo1[_iObj - 1]; + double fitness_eo2; + if (_flag) + fitness_eo2 = min; + else + fitness_eo2 = _fitness_eo2[_iObj - 1]; + // computation of the volume + if (_iObj == 1) + { + if (fitness_eo1 > fitness_eo2) + result = (fitness_eo1 - fitness_eo2) / r; + else + result = 0; + } + else + { + if (fitness_eo1 > fitness_eo2) + { + result = + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1) * (fitness_eo2 - min) / r; + result += + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1, + true) * (fitness_eo1 - + fitness_eo2) / r; + } + else + result = + hypervolumeIndicatorValue (_fitness_eo1, _fitness_eo2, + _iObj - 1) * (fitness_eo2 - min) / r; + } + // the volume + return result; + } + +}; + +#endif diff --git a/trunk/paradiseo-moeo/src/old/eoIBEA.h b/trunk/paradiseo-moeo/src/old/eoIBEA.h new file mode 100644 index 000000000..a3fa43372 --- /dev/null +++ b/trunk/paradiseo-moeo/src/old/eoIBEA.h @@ -0,0 +1,490 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "eoIBEA.h" + +// (c) OPAC Team, LIFL, June 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _eoIBEASorting_h +#define _eoIBEASorting_h + +#include +#include +#include +#include +#include "eoBinaryQualityIndicator.h" + + +/** + * Functor + * The sorting phase of IBEA (Indicator-Based Evolutionary Algorithm) + */ +template < class EOT, class Fitness > class eoIBEA:public eoPerf2WorthCached < EOT, + double > +{ + + public: + /** values */ + using eoIBEA < EOT, Fitness >::value; + + eoIBEA (eoBinaryQualityIndicator < Fitness > *_I) + { + I = _I; + } + + + /** + * mapping + * @param const eoPop& _pop the population + */ + void calculate_worths (const eoPop < EOT > &_pop) + { + /* resizing the worths beforehand */ + value ().resize (_pop.size ()); + + /* computation and setting of the bounds for each objective */ + setBounds (_pop); + + /* computation of the fitness for each individual */ + fitnesses (_pop); + + // higher is better, so invert the value + double max = *std::max_element (value ().begin (), value ().end ()); + for (unsigned i = 0; i < value ().size (); i++) + value ()[i] = max - value ()[i]; + } + + +protected: + + /** binary quality indicator to use in the selection process */ + eoBinaryQualityIndicator < Fitness > *I; + + virtual void setBounds (const eoPop < EOT > &_pop) = 0; + virtual void fitnesses (const eoPop < EOT > &_pop) = 0; + +}; + + + + + +/** + * Functor + * The sorting phase of IBEA (Indicator-Based Evolutionary Algorithm) without uncertainty + * Adapted from the Zitzler and Künzli paper "Indicator-Based Selection in Multiobjective Search" (2004) + * Of course, Fitness needs to be an eoParetoFitness object + */ +template < class EOT, class Fitness = typename EOT::Fitness > class eoIBEASorting:public eoIBEA < EOT, + Fitness + > +{ + +public: + + /** + * constructor + * @param eoBinaryQualityIndicator* _I the binary quality indicator to use in the selection process + * @param double _kappa scaling factor kappa + */ + eoIBEASorting (eoBinaryQualityIndicator < Fitness > *_I, + const double _kappa): + eoIBEA < + EOT, + Fitness > (_I) + { + kappa = _kappa; + } + + +private: + /** quality indicator */ + using eoIBEASorting < EOT, Fitness >::I; + /** values */ + using + eoIBEA < + EOT, + Fitness >::value; + /** scaling factor kappa */ + double + kappa; + + + /** + * computation and setting of the bounds for each objective + * @param const eoPop& _pop the population + */ + void + setBounds (const eoPop < EOT > &_pop) + { + typedef typename + EOT::Fitness::fitness_traits + traits; + double + min, + max; + for (unsigned i = 0; i < traits::nObjectives (); i++) + { + min = _pop[0].fitness ()[i]; + max = _pop[0].fitness ()[i]; + for (unsigned j = 1; j < _pop.size (); j++) + { + min = std::min (min, _pop[j].fitness ()[i]); + max = std::max (max, _pop[j].fitness ()[i]); + } + // setting of the bounds for the objective i + I->setBounds (i, min, max); + } + } + + + /** + * computation and setting of the fitness for each individual of the population + * @param const eoPop& _pop the population + */ + void + fitnesses (const eoPop < EOT > &_pop) + { + // reprsentation of the fitness components + std::vector < std::vector < double > > + fitComponents (_pop.size (), _pop.size ()); + // the maximum absolute indicator value + double + maxAbsoluteIndicatorValue = 0; + + // computation of the indicator values and of the maximum absolute indicator value + for (unsigned i = 0; i < _pop.size (); i++) + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + { + fitComponents[i][j] = + (*I) (_pop[i].fitness (), _pop[j].fitness ()); + maxAbsoluteIndicatorValue = + std::max (maxAbsoluteIndicatorValue, + fabs (fitComponents[i][j])); + } + + // computation of the fitness components for each pair of individuals + // if maxAbsoluteIndicatorValue==0, every individuals have the same fitness values for all objectives (already = 0) + if (maxAbsoluteIndicatorValue != 0) + for (unsigned i = 0; i < _pop.size (); i++) + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + fitComponents[i][j] = + exp (-fitComponents[i][j] / + (maxAbsoluteIndicatorValue * kappa)); + + // computation of the fitness for each individual + for (unsigned i = 0; i < _pop.size (); i++) + { + value ()[i] = 0; + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + value ()[i] += fitComponents[j][i]; + } + } + +}; + + + + + +/** + * Functor + * The sorting phase of IBEA (Indicator-Based Evolutionary Algorithm) under uncertainty + * Adapted from the Basseur and Zitzler paper "Handling Uncertainty in Indicator-Based Multiobjective Optimization" (2006) + * Of course, the fitness of an individual needs to be an eoStochasticParetoFitness object + */ +template < class EOT, class FitnessEval = typename EOT::Fitness::FitnessEval > class eoIBEAStochSorting:public eoIBEA < EOT, + FitnessEval + > +{ + +public: + + /** + * constructor + * @param eoBinaryQualityIndicator* _I the binary quality indicator to use in the selection process + */ +eoIBEAStochSorting (eoBinaryQualityIndicator < FitnessEval > *_I):eoIBEA < EOT, + FitnessEval > + (_I) + { + } + + +private: + /** quality indicator */ + using eoIBEAStochSorting < EOT, FitnessEval >::I; + /** values */ + using + eoIBEAStochSorting < + EOT, + FitnessEval >::value; + + + /** + * approximated zero value + */ + static double + zero () + { + return 1e-7; + } + + + /** + * computation and setting of the bounds for each objective + * @param const eoPop& _pop the population + */ + void + setBounds (const eoPop < EOT > &_pop) + { + typedef typename + EOT::Fitness::FitnessTraits + traits; + double + min, + max; + for (unsigned i = 0; i < traits::nObjectives (); i++) + { + min = _pop[0].fitness ().minimum (i); + max = _pop[0].fitness ().maximum (i); + for (unsigned j = 1; j < _pop.size (); j++) + { + min = std::min (min, _pop[j].fitness ().minimum (i)); + max = std::max (max, _pop[j].fitness ().maximum (i)); + } + // setting of the bounds for the ith objective + I->setBounds (i, min, max); + } + } + + + /** + * computation and setting of the fitness for each individual of the population + * @param const eoPop& _pop the population + */ + void + fitnesses (const eoPop < EOT > &_pop) + { + typedef typename + EOT::Fitness::FitnessTraits + traits; + unsigned + nEval = traits::nEvaluations (); + unsigned + index; + double + eiv, + p, + sumP, + iValue; + std::list < std::pair < double, unsigned > > l; + std::vector < unsigned > + n (_pop.size ()); + + for (unsigned ind = 0; ind < _pop.size (); ind++) + { + value ()[ind] = 0.0; // fitness value for the individual ind + for (unsigned eval = 0; eval < nEval; eval++) + { + + // I-values computation for the evaluation eval of the individual ind + l.clear (); + for (unsigned i = 0; i < _pop.size (); i++) + { + if (i != ind) + { + for (unsigned j = 0; j < nEval; j++) + { + std::pair < double, unsigned > + pa; + // I-value + pa.first = + (*I) (_pop[ind].fitness ()[eval], + _pop[i].fitness ()[j]); + // index of the individual + pa.second = i; + // append this to the list + l.push_back (pa); + } + } + } + + // sorting of the I-values (in decreasing order) + l.sort (); + + // computation of the Expected Indicator Value (eiv) for the evaluation eval of the individual ind + eiv = 0.0; + n.assign (n.size (), 0); // n[i]==0 for all i + sumP = 0.0; + while (((1 - sumP) > zero ()) && (l.size () > 0)) + { + // we use the last element of the list (the greatest one) + iValue = l.back ().first; + index = l.back ().second; + // computation of the probability to appear + p = (1.0 / (nEval - n[index])) * (1.0 - sumP); + // eiv update + eiv += p * iValue; + // update of the number of elements for individual index + n[index]++; + // removing the last element of the list + l.pop_back (); + // sum of p update + sumP += p; + } + value ()[ind] += eiv / nEval; + } + } + + } + +}; + + + + + +/** + * Functor + * The sorting phase of IBEA (Indicator-Based Evolutionary Algorithm) under uncertainty using averaged values for each objective + * Follow the idea presented in the Deb & Gupta paper "Searching for Robust Pareto-Optimal Solutions in Multi-Objective Optimization", 2005 + * Of course, the fitness of an individual needs to be an eoStochasticParetoFitness object + */ +template < class EOT, class FitnessEval = typename EOT::Fitness::FitnessEval > class eoIBEAAvgSorting:public eoIBEA < EOT, + FitnessEval + > +{ + +public: + + /** + * constructor + * @param eoBinaryQualityIndicator* _I the binary quality indicator to use in the selection process + * @param double _kappa scaling factor kappa + */ + eoIBEAAvgSorting (eoBinaryQualityIndicator < FitnessEval > *_I, + const double _kappa): + eoIBEA < + EOT, + FitnessEval > (_I) + { + kappa = _kappa; + } + + +private: + /** quality indicator */ + using eoIBEAAvgSorting < EOT, FitnessEval >::I; + /** values */ + using + eoIBEAAvgSorting < + EOT, + FitnessEval >::value; + /** scaling factor kappa */ + double + kappa; + + + /** + * computation and setting of the bounds for each objective + * @param const eoPop& _pop the population + */ + void + setBounds (const eoPop < EOT > &_pop) + { + typedef typename + EOT::Fitness::FitnessTraits + traits; + double + min, + max; + for (unsigned i = 0; i < traits::nObjectives (); i++) + { + min = _pop[0].fitness ().averagedParetoFitnessObject ()[i]; + max = _pop[0].fitness ().averagedParetoFitnessObject ()[i]; + for (unsigned j = 1; j < _pop.size (); j++) + { + min = + std::min (min, + _pop[j].fitness ().averagedParetoFitnessObject ()[i]); + max = + std::max (max, + _pop[j].fitness ().averagedParetoFitnessObject ()[i]); + } + // setting of the bounds for the objective i + I->setBounds (i, min, max); + } + } + + + /** + * computation and setting of the fitness for each individual of the population + * @param const eoPop& _pop the population + */ + void + fitnesses (const eoPop < EOT > &_pop) + { + // reprsentation of the fitness components + std::vector < std::vector < double > > + fitComponents (_pop.size (), _pop.size ()); + // the maximum absolute indicator value + double + maxAbsoluteIndicatorValue = 0; + + // computation of the indicator values and of the maximum absolute indicator value + for (unsigned i = 0; i < _pop.size (); i++) + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + { + fitComponents[i][j] = + (*I) (_pop[i].fitness ().averagedParetoFitnessObject (), + _pop[j].fitness ().averagedParetoFitnessObject ()); + maxAbsoluteIndicatorValue = + std::max (maxAbsoluteIndicatorValue, + fabs (fitComponents[i][j])); + } + + // computation of the fitness components for each pair of individuals + // if maxAbsoluteIndicatorValue==0, every individuals have the same fitness values for all objectives (already = 0) + if (maxAbsoluteIndicatorValue != 0) + for (unsigned i = 0; i < _pop.size (); i++) + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + fitComponents[i][j] = + exp (-fitComponents[i][j] / + (maxAbsoluteIndicatorValue * kappa)); + + // computation of the fitness for each individual + for (unsigned i = 0; i < _pop.size (); i++) + { + value ()[i] = 0; + for (unsigned j = 0; j < _pop.size (); j++) + if (i != j) + value ()[i] += fitComponents[j][i]; + } + } + +}; + + +#endif diff --git a/trunk/paradiseo-moeo/src/old/eoParetoPhenDist.h b/trunk/paradiseo-moeo/src/old/eoParetoPhenDist.h new file mode 100644 index 000000000..e92e5314f --- /dev/null +++ b/trunk/paradiseo-moeo/src/old/eoParetoPhenDist.h @@ -0,0 +1,37 @@ +#include + +template < class EOT, class DistType > class eoParetoPhenDist +{ +public: + virtual DistType operator ()(const EOT & eopf1, const EOT & eopf2) = 0; + +}; + + + +//Euclidien distance + +template < class EOT, class DistType = + double >class eoParetoEuclidDist:public eoParetoPhenDist < EOT, DistType > +{ + +public: + DistType operator () (const EOT & eopf1, const EOT & eopf2) + { + double res = 0.0; + double max = 0.0; + double temp; + for (unsigned i = 0; i < eopf1.fitness ().size (); ++i) + { + temp = + (eopf1.fitness ().operator[](i) - + eopf2.fitness ().operator[](i)) * (eopf1.fitness ().operator[](i) - + eopf2.fitness ().operator[](i)); + if (temp > max) + max = temp; /* for normalization */ + res = res + temp; + } + return sqrt (res / max); + } + +}; diff --git a/trunk/paradiseo-moeo/src/old/eoParetoSharing.h b/trunk/paradiseo-moeo/src/old/eoParetoSharing.h new file mode 100644 index 000000000..3a215c72c --- /dev/null +++ b/trunk/paradiseo-moeo/src/old/eoParetoSharing.h @@ -0,0 +1,147 @@ +// -*- C++ -*- + +#include +#include +#include +#include + +template < class EOT, class worthT = + double >class eoParetoSharing:public eoPerf2Worth < EOT, worthT > +{ +public: + + eoParetoSharing (double _nicheSize):eoPerf2Worth < EOT, + worthT > ("ParetoSharing"), nicheSize (_nicheSize), dist (euc_dist), + Dmax (_nicheSize) + { + } + + + eoParetoSharing (double _nicheSize, eoParetoPhenDist < EOT, + worthT > &_dist):eoPerf2Worth < EOT, + worthT > ("ParetoSharing"), nicheSize (_nicheSize), dist (_dist), + Dmax (_nicheSize) + { + } + + + + + void operator () /*calculate_worths */ (const eoPop < EOT > &_pop) + { + + unsigned i, j, pSize = _pop.size (); + //cout<<"**************************************************************************************\n"; + // std :: cout << "psize = " << pSize << std :: endl ; + if (pSize <= 1) + throw std:: + runtime_error ("Apptempt to do sharing with population of size 1"); + eoPerf2Worth < EOT, worthT >::value ().resize (pSize); + std::vector < double >sim (pSize); // to hold the similarities + + dMatrix distMatrix (pSize); + +// compute the distance + distMatrix[0][0] = 0; + for (i = 1; i < pSize; i++) + { + distMatrix[i][i] = 0; + for (j = 0; j < i; j++) + { + //if + distMatrix[i][j] = distMatrix[j][i] = dist (_pop[i], _pop[j]); + //cout<<" "<"< Dmap1; + Dmap1.setup (_pop); + + eoParetoRanking < EOT > rnk1 (Dmap1); + rnk1.calculate_worths (_pop); +// now set the worthes values + for (i = 0; i < pSize; ++i) + { + typename EOT::Fitness v; + + + +//cout<<"voila: "<< +//rnk1.value().operator[](i); + +//vector v; +//v.resize(_pop[i].fitness().size()); +//for(unsigned k=0;k<_pop[i].fitness().size();++k) +//v[k]=_pop[i].fitness().operator[](k)/sim[i]; +//_pop[i].fitness(v);//.operator[](k)=0;//_pop[i].fitness().operator[](k)/sim[i]; + eoPerf2Worth < EOT, worthT >::value ()[i] = rnk1.value ().operator[](i) / sim[i]; //*_pop[i].fitness().operator[](1)*_pop[i].fitness().operator[](1)); +//cout<<"\n__________"< > + { + public: + dMatrix (unsigned _s):rSize (_s) + { + this->resize (_s); + for (unsigned i = 0; i < _s; ++i) + this->operator[] (i).resize (_s); + } + + void printOn (std::ostream & _os) + { + for (unsigned i = 0; i < rSize; i++) + for (unsigned j = 0; j < rSize; ++j) + { + _os << this->operator[](i)[j] << " "; + _os << endl; + } + _os << endl; + } +//public: +//std::vectorv; + + private: + + + + + unsigned rSize; + }; + +private: + + ; + + double sh (double dist, double Dmax) + { + if (dist < Dmax) + return (1.0 - dist / Dmax); + else + return (0.0); + } + + double nicheSize; + eoParetoPhenDist < EOT, worthT > &dist; + eoParetoEuclidDist < EOT > euc_dist; + double Dmax; + +}; diff --git a/trunk/paradiseo-moeo/src/old/make_algo_MOEO.h b/trunk/paradiseo-moeo/src/old/make_algo_MOEO.h new file mode 100644 index 000000000..46af0756c --- /dev/null +++ b/trunk/paradiseo-moeo/src/old/make_algo_MOEO.h @@ -0,0 +1,254 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "make_algo_MOEO.h" + +// (c) OPAC Team, LIFL, June 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _make_algo_MOEO_h +#define _make_algo_MOEO_h + +// the parser and parameter includes +#include "utils/eoParser.h" +#include "utils/eoState.h" +// selections +#include "eoNDSorting.h" +#include "eoIBEA.h" +#include "eoBinaryQualityIndicator.h" +#include "eoParetoRanking.h" +#include "eoParetoSharing.h" +#include "eoSelectFromWorth.h" +#include "moeoSelectOneFromPopAndArch.h" +// replacements +#include "eoReplacement.h" +#include "moeoReplacement.h" +// breeders +#include "eoGeneralBreeder.h" +// the algorithm +#include "eoEasyEA.h" + +/* + * This function builds the algorithm (i.e. selection and replacement) from existing continue (or checkpoint) and operators + * It uses a parser (to get user parameters) and a state (to store the memory) + * + * NB: this function is almost cut-and-pasted from EO/make_algo_pareto.h and integrates MOEO features + */ +template < class EOT > + eoAlgo < EOT > &do_make_algo_MOEO (eoParser & _parser, eoState & _state, + eoEvalFunc < EOT > &_eval, + eoContinue < EOT > &_continue, + eoGenOp < EOT > &_op, + moeoArchive < EOT > &_arch) +{ + + // the fitness of an EOT object + typedef typename EOT::Fitness EOFitness; + + + + + + /* the selection criteria */ + string & selStr = _parser.createParam (string ("NSGA-II"), "selCrit", + "Multi-objective selection criterion: NSGA, NSGA-II, IBEA, ParetoRanking, ParetoSharing", + 'S', "Evolution Engine").value (); + double nicheSize = _parser.createParam (1.0, "nicheSize", + "Size of niche for NSGA-I or ParetoSharing", + 'n', + "Evolution Engine").value (); + double kappa = + _parser.createParam (0.05, "kappa", "Scaling factor kappa for IBEA", 'k', + "Evolution Engine").value (); + string & indStr = + _parser.createParam (string ("Epsilon"), "indicator", + "Binary quality indicator for IBEA : Epsilon, Hypervolume", + 'I', "Evolution Engine").value (); + double rho = _parser.createParam (1.1, "rho", + "reference point for the hypervolume calculation (must not be smaller than 1)", + 'r', "Evolution Engine").value (); + // the eoPerf2Worth object + eoPerf2Worth < EOT, double >*p2w; + if ((selStr == string ("NSGA")) || (selStr == string ("NSGA-I"))) // NSGA-I + p2w = new eoNDSorting_I < EOT > (nicheSize); + else if (selStr == string ("NSGA-II")) // NSGA-II + p2w = new eoNDSorting_II < EOT > (); + /* + else if (selStr == string("IBEA")) { // IBEA + // the binary quality indicator + eoBinaryQualityIndicator* I; + if (indStr == string("Epsilon")) + I = new eoAdditiveBinaryEpsilonIndicator; + else if (indStr == string("Hypervolume")) + I = new eoBinaryHypervolumeIndicator(rho); + else { + string stmp = string("Invalid binary quality indicator (for IBEA): ") + indStr; + throw std::runtime_error(stmp.c_str()); + } + p2w = new eoIBEASorting(I, kappa); + } + */ + else if (selStr == string ("ParetoRanking")) + { // Pareto Ranking + eoDominanceMap < EOT > &dominance = + _state.storeFunctor (new eoDominanceMap < EOT >); + p2w = new eoParetoRanking < EOT > (dominance); + } + else if (selStr == string ("ParetoSharing")) + { // Pareto Sharing + p2w = new eoParetoSharing < EOT > (nicheSize); + } + else + { + string stmp = string ("Invalid Pareto selection criterion: ") + selStr; + throw std::runtime_error (stmp.c_str ()); + } + // store + _state.storeFunctor (p2w); + + + + + + /* the selector */ + eoValueParam < eoParamParamType > &selectionParam = + _parser.createParam (eoParamParamType ("DetTour(2)"), "selection", + "Selection: Roulette, DetTour(T), StochTour(t) or Random", + 's', "Evolution Engine"); + eoParamParamType & ppSelect = selectionParam.value (); // pair< string , vector > + // the select object + eoSelectOne < EOT > *select; + if (ppSelect.first == string ("DetTour")) + { // DetTour + unsigned detSize; + if (!ppSelect.second.size ()) + { // no parameter added + cerr << "WARNING, no parameter passed to DetTour, using 2" << endl; + detSize = 2; + // put back 2 in parameter for consistency (and status file) + ppSelect.second.push_back (string ("2")); + } + else // parameter passed by user as DetTour(T) + detSize = atoi (ppSelect.second[0].c_str ()); + select = new eoDetTournamentWorthSelect < EOT > (*p2w, detSize); + } + else if (ppSelect.first == string ("StochTour")) + { // StochTour + double p; + if (!ppSelect.second.size ()) + { // no parameter added + cerr << "WARNING, no parameter passed to StochTour, using 1" << + endl; + p = 1; + // put back p in parameter for consistency (and status file) + ppSelect.second.push_back (string ("1")); + } + else // parameter passed by user as DetTour(T) + p = atof (ppSelect.second[0].c_str ()); + select = new eoStochTournamentWorthSelect < EOT > (*p2w, p); + } + else if (ppSelect.first == string ("Roulette")) + { // Roulette + select = new eoRouletteWorthSelect < EOT > (*p2w); + } + else if (ppSelect.first == string ("Random")) + { // Random + select = new eoRandomSelect < EOT >; + } + else + { + string stmp = string ("Invalid selection: ") + ppSelect.first; + throw std::runtime_error (stmp.c_str ()); + } + // store + _state.storeFunctor (select); + + + + + + /* elitism */ + bool useElitism = _parser.createParam (false, "elitism", + "Use elitism in the selection process (individuals from the archive are randomly selected)", + 'E', "Evolution Engine").value (); + double ratioFromPop = _parser.createParam (0.8, "ratio", + "Ratio from the population for elitism (must not be greater than 1)", + '\0', + "Evolution Engine").value (); + if (useElitism) + { + eoSelectOne < EOT > *selectPop = select; + select = + new moeoSelectOneFromPopAndArch < EOT > (*selectPop, _arch, + ratioFromPop); + // store + _state.storeFunctor (select); + } + + + + + + /* the number of offspring */ + eoValueParam < eoHowMany > &offspringRateParam = + _parser.createParam (eoHowMany (1.0), "nbOffspring", + "Nb of offspring (percentage or absolute)", 'O', + "Evolution Engine"); + + + + + + /* the replacement */ + string & repStr = + _parser.createParam (string ("Plus"), "replacement", + "Replacement: Plus, DistinctPlus or Generational", + 'R', "Evolution Engine").value (); + eoReplacement < EOT > *replace; + if (repStr == string ("Plus")) // Plus + replace = new moeoElitistReplacement < EOT, double >(*p2w); + else if (repStr == string ("DistinctPlus")) // DistinctPlus + replace = new moeoDisctinctElitistReplacement < EOT, double >(*p2w); + else if (repStr == string ("Generational")) // Generational + replace = new eoGenerationalReplacement < EOT >; + else + { + string stmp = string ("Invalid replacement: ") + repStr; + throw std::runtime_error (stmp.c_str ()); + } + // store + _state.storeFunctor (replace); + + + + + + // the general breeder + eoGeneralBreeder < EOT > *breed = + new eoGeneralBreeder < EOT > (*select, _op, offspringRateParam.value ()); + _state.storeFunctor (breed); + + // the eoEasyEA + eoAlgo < EOT > *algo = + new eoEasyEA < EOT > (_continue, _eval, *breed, *replace); + _state.storeFunctor (algo); + // that's it! + return *algo; +} + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/Makefile.am b/trunk/paradiseo-moeo/tutorials/Makefile.am new file mode 100755 index 000000000..40441b3b9 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/Makefile.am @@ -0,0 +1 @@ +SUBDIRS=lesson1 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShop.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShop.h new file mode 100644 index 000000000..284804b0a --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShop.h @@ -0,0 +1,148 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShop.h" + +// (c) OPAC Team, LIFL, April 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShop_h +#define _FlowShop_h + +#include +// Fitness for multi-objective flow-shop +#include "FlowShopFitness.h" + + +/** + * Structure of the genotype for the flow-shop scheduling problem + */ +class FlowShop:public EO < FlowShopFitness > +{ + +public: + + /** + * default constructor + */ + FlowShop () + { + } + + /** + * destructor + */ + virtual ~ FlowShop () + { + } + + /** + * class name + */ + virtual string className () const + { + return "FlowShop"; + } + + /** + * set scheduling vector + * @param vector & _scheduling the new scheduling to set + */ + void setScheduling (vector < unsigned >&_scheduling) + { + scheduling = _scheduling; + } + + /** + * get scheduling vector + */ + const vector < unsigned >&getScheduling () const + { + return scheduling; + } + + /** + * printing... + */ + void printOn (ostream & _os) const + { + // fitness + EO < FlowShopFitness >::printOn (_os); + _os << "\t"; + // size + _os << scheduling.size () << "\t"; + // scheduling + for (unsigned i = 0; i < scheduling.size (); i++) + _os << scheduling[i] << ' '; + } + + /** + * reading... + */ + void readFrom (istream & _is) + { + // fitness + EO < FlowShopFitness >::readFrom (_is); + // size + unsigned size; + _is >> size; + // scheduling + scheduling.resize (size); + bool tmp; + for (unsigned i = 0; i < size; i++) + { + _is >> tmp; + scheduling[i] = tmp; + } + } + + + bool operator== (const FlowShop & _other) const + { + return scheduling == _other.getScheduling (); + } + bool operator!= (const FlowShop & _other) const + { + return scheduling != _other.getScheduling (); + } + bool operator< (const FlowShop & _other) const + { + return scheduling < _other.getScheduling (); + } + bool operator> (const FlowShop & _other) const + { + return scheduling > _other.getScheduling (); + } + bool operator<= (const FlowShop & _other) const + { + return scheduling <= _other.getScheduling (); + } + bool operator>= (const FlowShop & _other) const + { + return scheduling >= _other.getScheduling (); + } + + +private: + + /** scheduling (order of operations) */ + std::vector < unsigned >scheduling; + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopBenchmarkParser.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopBenchmarkParser.h new file mode 100644 index 000000000..3b13d9872 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopBenchmarkParser.h @@ -0,0 +1,189 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopBenchmarkParser.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopBenchmarkParser_h +#define _FlowShopBenchmarkParser_h + +// general include +#include +#include + +/** Web site to download benchmarks */ +const static + std::string + BENCHMARKS_WEB_SITE = "www.lifl.fr/~liefooga/benchmarks/"; + + +/** + * Class to handle parameters of a flow-shop instance from a benchmark file + * benchmark files are available at www.lifl.fr/~basseur/BenchsUncertain/ + */ +class FlowShopBenchmarkParser +{ + +public: + + /** + * constructor + * @param const string _benchmarkFileName the name of the benchmark file + */ + FlowShopBenchmarkParser (const string _benchmarkFileName) + { + init (_benchmarkFileName); + } + + /** + * the number of machines + */ + const unsigned + getM () + { + return M; + } + + /** + * the number of jobs + */ + const unsigned + getN () + { + return N; + } + + /** + * the processing times + */ + const + std::vector < std::vector < unsigned > > + getP () + { + return p; + } + + /** + * the due-dates + */ + const + std::vector < unsigned > + getD () + { + return d; + } + + /** + * printing... + */ + void + printOn (ostream & _os) const + { + _os << + "M=" << + M << + " N=" << + N << + endl; + _os << + "*** processing times" << + endl; + for (unsigned i = 0; i < M; i++) + { + for (unsigned j = 0; j < N; j++) + { + _os << p[i][j] << " "; + } + _os << + endl; + } + _os << "*** due-dates" << endl; + for (unsigned j = 0; j < N; j++) + { + _os << d[j] << " "; + } + _os << endl << endl; + } + +private: + /** number of machines */ + unsigned + M; + /** number of jobs */ + unsigned + N; + /** p[i][j] = processing time of job j on machine i */ + std::vector < std::vector < unsigned > > + p; + /** d[j] = due-date of the job j */ + std::vector < unsigned > + d; + + + /** + * Initialisation of the parameters with the data contained in the benchmark file + * @param const string _benchmarkFileName the name of the benchmark file + */ + void + init (const string _benchmarkFileName) + { + string buffer; + string::size_type start, end; + ifstream inputFile (_benchmarkFileName.data (), ios::in); + // opening of the benchmark file + if (!inputFile) + cerr << "*** ERROR : Unable to open the benchmark file '" << + _benchmarkFileName << "'" << endl; + // number of jobs (N) + getline (inputFile, buffer, '\n'); + N = atoi (buffer.data ()); + // number of machines M + getline (inputFile, buffer, '\n'); + M = atoi (buffer.data ()); + // initial and current seeds (not used) + getline (inputFile, buffer, '\n'); + // processing times and due-dates + p = std::vector < std::vector < unsigned > > (M, N); + d = std::vector < unsigned > (N); + // for each job... + for (unsigned j = 0; j < N; j++) + { + // index of the job (<=> j) + getline (inputFile, buffer, '\n'); + // due-date of the job j + getline (inputFile, buffer, '\n'); + d[j] = atoi (buffer.data ()); + // processing times of the job j on each machine + getline (inputFile, buffer, '\n'); + start = buffer.find_first_not_of (" "); + for (unsigned i = 0; i < M; i++) + { + end = buffer.find_first_of (" ", start); + p[i][j] = atoi (buffer.substr (start, end - start).data ()); + start = buffer.find_first_not_of (" ", end); + } + } + // closing of the input file + inputFile.close (); + } + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA new file mode 100755 index 000000000..6898829b1 Binary files /dev/null and b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA differ diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.cpp b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.cpp new file mode 100644 index 000000000..b22742025 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.cpp @@ -0,0 +1,170 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopEA.cpp" + +// (c) OPAC Team, LIFL, October 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + + +// Miscilaneous include and declaration +using namespace std; + + +/* EO */ +// eo general include +#include "eo" +// for the creation of an evaluator +#include "make_eval_FlowShop.h" +// for the creation of an initializer +#include "make_genotype_FlowShop.h" +// for the creation of the variation operators +#include "make_op_FlowShop.h" +// how to initialize the population +#include +// the stopping criterion +#include +// outputs (stats, population dumps, ...) +#include +// simple call to the algo +#include + +// checks for help demand, and writes the status file and make_help; in libutils +void make_help (eoParser & _parser); + + +/* MOEO */ +#include +#include +#include +#include +#include +#include +// evolution engine (selection and replacement) +#include + +/* FLOW-SHOP */ +// definition of representation +#include "FlowShop.h" +// definition of fitness +#include "FlowShopFitness.h" + + + +int +main (int argc, char *argv[]) +{ + try + { + + eoParser parser (argc, argv); // for user-parameter reading + eoState state; // to keep all things allocated + + + + + + /*** the representation-dependent things ***/ + + // The fitness evaluation + eoEvalFuncCounter < FlowShop > &eval = do_make_eval (parser, state); + // the genotype (through a genotype initializer) + eoInit < FlowShop > &init = do_make_genotype (parser, state); + // the variation operators + eoGenOp < FlowShop > &op = do_make_op (parser, state); + + + + + + /*** the representation-independent things ***/ + + // initialization of the population + eoPop < FlowShop > &pop = do_make_pop (parser, state, init); + // definition of the archive + moeoArchive < FlowShop > arch; + // stopping criteria + eoContinue < FlowShop > &term = + do_make_continue_pareto (parser, state, eval); + // output + eoCheckPoint < FlowShop > &checkpoint = + do_make_checkpoint_pareto (parser, state, eval, term); + // algorithm + eoAlgo < FlowShop > &algo = + do_make_algo_MOEO (parser, state, eval, checkpoint, op, arch); + + + + + + /*** archive-related features ***/ + // update the archive every generation + moeoArchiveUpdater < FlowShop > updater (arch, pop); + checkpoint.add (updater); + // save the archive every generation in 'Res/Arch*' + moeoArchiveFitnessSavingUpdater < FlowShop > save_updater (arch); + checkpoint.add (save_updater); + // save the contribution of the non-dominated solutions in 'Res/Contribution.txt' + moeoVectorVsVectorBM < FlowShop, double >*contribution = + new moeoContributionMetric < FlowShop > (); + moeoBinaryMetricSavingUpdater < FlowShop > + contribution_updater (*contribution, arch, "Res/Contribution.txt"); + checkpoint.add (contribution_updater); + // save the entropy of the non-dominated solutions in 'Res/Entropy.txt' + moeoVectorVsVectorBM < FlowShop, double >*entropy = + new moeoEntropyMetric < FlowShop > (); + moeoBinaryMetricSavingUpdater < FlowShop > entropy_updater (*entropy, + arch, + "Res/Entropy.txt"); + checkpoint.add (entropy_updater); + + + + + /*** Go ! ***/ + + // help ? + make_help (parser); + + // first evalution + apply < FlowShop > (eval, pop); + + // printing of the initial population + cout << "Initial Population\n"; + pop.sortedPrintOn (cout); + cout << endl; + + // run the algo + do_run (algo, pop); + + // printing of the final population + cout << "Final Population\n"; + pop.sortedPrintOn (cout); + cout << endl; + + // printing of the final archive + cout << "Final Archive\n"; + arch.sortedPrintOn (cout); + cout << endl; + + } catch (exception & e) + { + cout << e.what () << endl; + } + return EXIT_SUCCESS; +} diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.param b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.param new file mode 100644 index 000000000..c70b0b1a7 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEA.param @@ -0,0 +1,51 @@ + +###### General ###### +# --help=0 # -h : Prints this message +# --stopOnUnknownParam=1 # Stop if unkown param entered +# --seed=1165485212 # -S : Random number seed + +###### Evolution Engine ###### +--popSize=20 # -P : Population Size +--selCrit=NSGA-II # -S : Multi-objective selection criterion: NSGA, NSGA-II, IBEA, ParetoRanking, ParetoSharing +--nicheSize=1 # -n : Size of niche for NSGA-I or ParetoSharing +--kappa=0.05 # -k : Scaling factor kappa for IBEA +--indicator=Epsilon # -I : Binary quality indicator for IBEA : Epsilon, Hypervolume +--rho=1.1 # -r : reference point for the hypervolume calculation (must not be smaller than 1) +--selection=DetTour(2) # -s : Selection: Roulette, DetTour(T), StochTour(t) or Random +--elitism=0 # -E : Use elitism in the selection process (individuals from the archive are randomly selected) +--ratio=0.8 # Ratio from the population for elitism (must not be greater than 1) +--nbOffspring=100% # -O : Nb of offspring (percentage or absolute) +--replacement=Plus # -R : Replacement: Plus, DistinctPlus or Generational + +###### Output ###### +--useEval=1 # Use nb of eval. as counter (vs nb of gen.) +--printPop=0 # Print sorted pop. every gen. + +###### Output - Disk ###### +--resDir=Res # Directory to store DISK outputs +--eraseDir=1 # erase files in dirName if any +--frontFileFrequency=1(0,1) # File save frequency in objective spaces (std::pairs of comma-separated objectives in 1 single parentheses std::pair) + +###### Output - Graphical ###### +--plotFront=0 # Objective plots (requires corresponding files - see frontFileFrequency + +###### Persistence ###### +# --Load= # -L : A save file to restart from +--recomputeFitness=0 # -r : Recompute the fitness after re-loading the pop.? +--saveFrequency=0 # Save every F generation (0 = only final state, absent = never) +--saveTimeInterval=0 # Save every T seconds (0 or absent = never) +--status=./FlowShopEA.status # Status file + +###### Representation ###### +--BenchmarkFile=benchmarks/020_05_01.txt # -B : Benchmark file name (benchmarks are available at www.lifl.fr/~basseur/BenchsUncertain/) REQUIRED + +###### Stopping criterion ###### +--maxGen=100 # -G : Maximum number of generations () = none) +--CtrlC=1 # -C : Terminate current generation upon Ctrl C + +###### Variation Operators ###### +--crossRate=1 # Relative rate for the only crossover +--shiftMutRate=0.5 # Relative rate for shift mutation +--exchangeMutRate=0.5 # Relative rate for exchange mutation +--pCross=0.25 # -c : Probability of Crossover +--pMut=0.35 # -m : Probability of Mutation diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEval.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEval.h new file mode 100644 index 000000000..a974d8fc4 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopEval.h @@ -0,0 +1,157 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopEval.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopEval_h +#define _FlowShopEval_h + +// Flow-shop fitness +#include "FlowShopFitness.h" +// include the base definition of eoEvalFunc +#include + + + +/** + * Functor + * Computation of the multi-objective evaluation of a FlowShop object + */ +class FlowShopEval:public eoEvalFunc < FlowShop > +{ + +public: + + /** + * constructor + * @param _M the number of machines + * @param _N the number of jobs to schedule + * @param _p the processing times + * @param _d the due dates + */ + FlowShopEval (const unsigned _M, const unsigned _N, + const vector < vector < unsigned > >&_p, + const vector < unsigned >&_d):M (_M), N (_N), p (_p), d (_d) + { + + unsigned nObjs = 2; + std::vector < bool > bObjs (nObjs, false); + eoVariableParetoTraits::setUp (nObjs, bObjs); + } + + + + /** + * computation of the multi-objective evaluation of an eoFlowShop object + * @param FlowShop & _eo the FlowShop object to evaluate + */ + void operator () (FlowShop & _eo) + { + FlowShopFitness fitness; + fitness[0] = tardiness (_eo); + fitness[1] = makespan (_eo); + _eo.fitness (fitness); + } + + + + + +private: + + /** number of machines */ + unsigned M; + /** number of jobs */ + unsigned N; + /** p[i][j] = processing time of job j on machine i */ + std::vector < std::vector < unsigned > > p; + /** d[j] = due-date of the job j */ + std::vector < unsigned > d; + + + + /** + * computation of the makespan + * @param FlowShop _eo the FlowShop object to evaluate + */ + double makespan (FlowShop _eo) + { + // the scheduling to evaluate + vector < unsigned >scheduling = _eo.getScheduling (); + // completion times computation for each job on each machine + // C[i][j] = completion of the jth job of the scheduling on the ith machine + std::vector < std::vector < unsigned > > C = completionTime (_eo); + // fitness == C[M-1][scheduling[N-1]]; + return C[M - 1][scheduling[N - 1]]; + } + + + + /** + * computation of the tardiness + * @param _eo the FlowShop object to evaluate + */ + double tardiness (FlowShop _eo) + { + // the scheduling to evaluate + vector < unsigned >scheduling = _eo.getScheduling (); + // completion times computation for each job on each machine + // C[i][j] = completion of the jth job of the scheduling on the ith machine + std::vector < std::vector < unsigned > > C = completionTime (_eo); + // tardiness computation + unsigned long sum = 0; + for (unsigned j = 0; j < N; j++) + sum += + (unsigned) std::max (0, + (int) (C[M - 1][scheduling[j]] - + d[scheduling[j]])); + // fitness == sum + return sum; + } + + + + /** + * computation of the completion times of a scheduling (for each job on each machine) + * C[i][j] = completion of the jth job of the scheduling on the ith machine + * @param const FlowShop _eo the genotype to evaluate + */ + std::vector < std::vector < unsigned > > completionTime (FlowShop _eo) + { + vector < unsigned > scheduling = _eo.getScheduling (); + std::vector < std::vector < unsigned > > C (M, N); + C[0][scheduling[0]] = p[0][scheduling[0]]; + for (unsigned j = 1; j < N; j++) + C[0][scheduling[j]] = C[0][scheduling[j - 1]] + p[0][scheduling[j]]; + for (unsigned i = 1; i < M; i++) + C[i][scheduling[0]] = C[i - 1][scheduling[0]] + p[i][scheduling[0]]; + for (unsigned i = 1; i < M; i++) + for (unsigned j = 1; j < N; j++) + C[i][scheduling[j]] = + std::max (C[i][scheduling[j - 1]], + C[i - 1][scheduling[j]]) + p[i][scheduling[j]]; + return C; + } + + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopFitness.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopFitness.h new file mode 100644 index 000000000..10ae5cc01 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopFitness.h @@ -0,0 +1,35 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopFitness.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopFitness_h +#define _FlowShopFitness_h + +#include + + +/** + * definition of the fitness for multi-objective flow-shop problems + */ +typedef eoParetoFitness < eoVariableParetoTraits > FlowShopFitness; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopInit.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopInit.h new file mode 100644 index 000000000..a72329195 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopInit.h @@ -0,0 +1,79 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopInit.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopInit_h +#define _FlowShopInit_h + +#include + + +/** + * Functor + * Initialisation of a random genotype built by the default constructor of the eoFlowShop class + */ +class FlowShopInit:public eoInit < FlowShop > +{ + +public: + + /** + * constructor + * @param const unsigned _N the number of jobs to schedule + */ + FlowShopInit (const unsigned _N) + { + N = _N; + } + + /** + * randomize a genotype + * @param FlowShop & _genotype a genotype that has been default-constructed + */ + void operator () (FlowShop & _genotype) + { + // scheduling vector + vector < unsigned >scheduling (N); + // initialisation of possible values + vector < unsigned >possibles (N); + for (unsigned i = 0; i < N; i++) + possibles[i] = i; + // random initialization + unsigned rInd; // random index + for (unsigned i = 0; i < N; i++) + { + rInd = (unsigned) rng.uniform (N - i); + scheduling[i] = possibles[rInd]; + possibles[rInd] = possibles[N - i - 1]; + } + _genotype.setScheduling (scheduling); + _genotype.invalidate (); // IMPORTANT in case the _genotype is old + } + + +private: + /** the number of jobs (size of a scheduling vector) */ + unsigned N; + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpCrossoverQuad.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpCrossoverQuad.h new file mode 100644 index 000000000..40d1e247d --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpCrossoverQuad.h @@ -0,0 +1,149 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopOpCrossoverQuad.h" + +// (c) OPAC Team, LIFL, April 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopOpCrossoverQuad_h +#define _FlowShopOpCrossoverQuad_h + +#include + +/** + * Functor + * Quadratic crossover operator for flow-shop (modify the both genotypes) + */ +class FlowShopOpCrossoverQuad:public eoQuadOp < FlowShop > +{ + +public: + + /** + * default constructor + */ + FlowShopOpCrossoverQuad () + { + } + + /** + * the class name (used to display statistics) + */ + string className () const + { + return "FlowShopOpCrossoverQuad"; + } + + /** + * eoQuad crossover - _genotype1 and _genotype2 are the (future) offspring, i.e. _copies_ of the parents + * @param FlowShop & _genotype1 the first parent + * @param FlowShop & _genotype2 the second parent + */ + bool operator () (FlowShop & _genotype1, FlowShop & _genotype2) + { + bool oneAtLeastIsModified; + + // parents + vector < unsigned >parent1 = _genotype1.getScheduling (); + vector < unsigned >parent2 = _genotype2.getScheduling (); + + // computation of the 2 random points + unsigned point1, point2; + do + { + point1 = rng.random (min (parent1.size (), parent2.size ())); + point2 = rng.random (min (parent1.size (), parent2.size ())); + } + while (fabs ((double) point1 - point2) <= 1); + + // computation of the offspring + vector < unsigned >offspring1 = + generateOffspring (parent1, parent2, point1, point2); + vector < unsigned >offspring2 = + generateOffspring (parent2, parent1, point1, point2); + + // does at least one genotype has been modified ? + if ((parent1 != offspring1) || (parent2 != offspring2)) + { + // update + _genotype1.setScheduling (offspring1); + _genotype2.setScheduling (offspring2); + // at least one genotype has been modified + oneAtLeastIsModified = true; + } + else + { + // no genotype has been modified + oneAtLeastIsModified = false; + } + + // return 'true' if at least one genotype has been modified + return oneAtLeastIsModified; + } + + +private: + + /** + * generation of an offspring by a 2 points crossover + * @param vector _parent1 the first parent + * @param vector _parent2 the second parent + * @param unsigned_point1 the first point + * @param unsigned_point2 the second point + */ + vector < unsigned >generateOffspring (vector < unsigned >_parent1, + vector < unsigned >_parent2, + unsigned _point1, unsigned _point2) + { + vector < unsigned >result = _parent1; + vector < bool > taken_values (result.size (), false); + if (_point1 > _point2) + swap (_point1, _point2); + + /* first parent */ + for (unsigned i = 0; i <= _point1; i++) + { + // result[i] == _parent1[i] + taken_values[_parent1[i]] = true; + } + for (unsigned i = _point2; i < result.size (); i++) + { + // result[i] == _parent1[i] + taken_values[_parent1[i]] = true; + } + + /* second parent */ + unsigned i = _point1 + 1; + unsigned j = 0; + while (i < _point2 && j < _parent2.size ()) + { + if (!taken_values[_parent2[j]]) + { + result[i] = _parent2[j]; + i++; + } + j++; + } + + return result; + } + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationExchange.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationExchange.h new file mode 100644 index 000000000..13626313f --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationExchange.h @@ -0,0 +1,98 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopOpMutationExchange.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopOpMutationExchange_h +#define _FlowShopOpMutationExchange_h + +#include + + +/** + * Functor + * Exchange mutation operator for flow-shop + */ +class FlowShopOpMutationExchange:public eoMonOp < FlowShop > +{ + +public: + + /** + * default constructor + */ + FlowShopOpMutationExchange () + { + } + + /** + * the class name (used to display statistics) + */ + string className () const + { + return "FlowShopOpMutationExchange"; + } + + /** + * modifies the parent with an exchange mutation + * @param FlowShop & _genotype the parent genotype (will be modified) + */ + bool operator () (FlowShop & _genotype) + { + bool isModified; + + // schedulings + vector < unsigned >initScheduling = _genotype.getScheduling (); + vector < unsigned >resultScheduling = _genotype.getScheduling (); + + // computation of the 2 random points + unsigned point1, point2; + do + { + point1 = rng.random (resultScheduling.size ()); + point2 = rng.random (resultScheduling.size ()); + } + while (point1 == point2); + + // swap + swap (resultScheduling[point1], resultScheduling[point2]); + + // update (if necessary) + if (resultScheduling != initScheduling) + { + // update + _genotype.setScheduling (resultScheduling); + // the genotype has been modified + isModified = true; + } + else + { + // the genotype has not been modified + isModified = false; + } + + // return 'true' if the genotype has been modified + return isModified; + } + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationShift.h b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationShift.h new file mode 100644 index 000000000..a392c21f2 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/FlowShopOpMutationShift.h @@ -0,0 +1,108 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "FlowShopOpMutationShift.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _FlowShopOpMutationShift_h +#define _FlowShopOpMutationShift_h + +#include + + +/** + * Functor + * Shift mutation operator for flow-shop + */ +class FlowShopOpMutationShift:public eoMonOp < FlowShop > +{ + +public: + + /** + * default constructor + */ + FlowShopOpMutationShift () + { + } + + /** + * the class name (used to display statistics) + */ + string className () const + { + return "FlowShopOpMutationShift"; + } + + /** + * modifies the parent with a shift mutation + * @param FlowShop & _genotype the parent genotype (will be modified) + */ + bool operator () (FlowShop & _genotype) + { + bool isModified; + int direction; + unsigned tmp; + + // schedulings + vector < unsigned >initScheduling = _genotype.getScheduling (); + vector < unsigned >resultScheduling = initScheduling; + + // computation of the 2 random points + unsigned point1, point2; + do + { + point1 = rng.random (resultScheduling.size ()); + point2 = rng.random (resultScheduling.size ()); + } + while (point1 == point2); + + // direction + if (point1 < point2) + direction = 1; + else + direction = -1; + // mutation + tmp = resultScheduling[point1]; + for (unsigned i = point1; i != point2; i += direction) + resultScheduling[i] = resultScheduling[i + direction]; + resultScheduling[point2] = tmp; + + // update (if necessary) + if (resultScheduling != initScheduling) + { + // update + _genotype.setScheduling (resultScheduling); + // the genotype has been modified + isModified = true; + } + else + { + // the genotype has not been modified + isModified = false; + } + + // return 'true' if the genotype has been modified + return isModified; + } + +}; + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/Makefile.am b/trunk/paradiseo-moeo/tutorials/lesson1/Makefile.am new file mode 100644 index 000000000..26370a030 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/Makefile.am @@ -0,0 +1,9 @@ + +noinst_PROGRAMS = FlowShopEA + +FlowShopEA_SOURCES = FlowShopEA.cpp + +LDADD = -L$(top_builddir)/src ${EO_DIR}/src/libeo.a ${EO_DIR}/src/utils/libeoutils.a + +INCLUDES = -I${EO_DIR}/src/ -I$(top_srcdir)/src + diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_01.txt new file mode 100644 index 000000000..2c2f78d86 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_01.txt @@ -0,0 +1,63 @@ +20 +5 +873654221 +0 +468 +54 79 16 66 58 +1 +325 +83 3 89 58 56 +2 +923 +15 11 49 31 20 +3 +513 +71 99 15 68 85 +4 +1070 +77 56 89 78 53 +5 +690 +36 70 45 91 35 +6 +602 +53 99 60 13 53 +7 +289 +38 60 23 59 41 +8 +873 +27 5 57 49 69 +9 +342 +87 56 64 85 13 +10 +764 +76 3 7 85 86 +11 +268 +91 61 1 9 72 +12 +1158 +14 73 63 39 8 +13 +646 +29 75 41 41 49 +14 +1111 +12 47 63 56 47 +15 +965 +77 14 47 40 87 +16 +703 +32 21 26 54 58 +17 +1205 +87 86 75 77 18 +18 +334 +68 5 77 51 68 +19 +1111 +94 77 40 31 28 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_02.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_02.txt new file mode 100644 index 000000000..c82c2d033 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_05_02.txt @@ -0,0 +1,63 @@ +20 +5 +379008056 +0 +517 +26 59 78 88 69 +1 +461 +38 62 90 54 30 +2 +832 +27 44 64 47 61 +3 +653 +88 10 49 83 35 +4 +933 +95 23 47 84 53 +5 +811 +55 64 20 9 98 +6 +966 +54 47 61 30 94 +7 +448 +63 68 93 11 33 +8 +577 +23 54 36 92 77 +9 +1122 +45 9 47 63 31 +10 +666 +86 30 70 62 54 +11 +1189 +43 31 54 75 71 +12 +470 +43 92 87 48 78 +13 +475 +40 7 13 23 9 +14 +462 +37 14 40 85 79 +15 +866 +54 95 34 23 51 +16 +392 +35 76 55 4 76 +17 +310 +59 82 13 31 56 +18 +719 +43 91 11 13 80 +19 +1221 +50 37 5 98 72 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_01.txt new file mode 100644 index 000000000..96bca095d --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_01.txt @@ -0,0 +1,63 @@ +20 +10 +587595453 +0 +1250 +74 28 89 60 54 92 9 4 25 15 +1 +1371 +21 3 52 88 66 11 8 18 15 84 +2 +637 +58 27 56 26 12 54 88 25 91 8 +3 +616 +4 61 13 58 57 97 72 28 49 30 +4 +917 +21 34 7 76 70 57 27 95 56 95 +5 +937 +28 76 32 98 82 53 22 51 10 79 +6 +1435 +58 64 32 29 99 65 50 84 62 9 +7 +1197 +83 87 98 47 84 77 2 18 70 91 +8 +1301 +31 54 46 79 16 51 49 6 76 76 +9 +637 +61 98 60 26 41 36 82 90 99 26 +10 +749 +94 76 23 19 23 53 93 69 58 42 +11 +1223 +44 41 87 48 11 19 96 61 83 66 +12 +887 +97 70 7 95 68 54 43 57 84 70 +13 +1316 +94 43 36 78 58 86 13 5 64 91 +14 +1330 +66 42 26 77 30 40 60 75 74 67 +15 +1380 +6 79 85 90 5 56 11 4 14 3 +16 +767 +37 88 7 24 5 79 37 38 18 98 +17 +574 +22 15 34 10 39 74 91 28 48 4 +18 +1398 +99 49 36 85 58 24 84 4 96 71 +19 +1179 +83 72 48 55 31 3 67 80 86 62 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_02.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_02.txt new file mode 100644 index 000000000..bf23361f5 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_10_02.txt @@ -0,0 +1,63 @@ +20 +10 +1401007982 +0 +1279 +80 59 59 31 30 53 93 90 65 64 +1 +1481 +13 83 70 64 88 19 79 92 97 38 +2 +1157 +64 85 76 11 14 99 88 35 27 44 +3 +1391 +77 85 10 9 22 62 77 13 25 46 +4 +763 +17 70 65 32 93 88 94 75 61 66 +5 +1456 +78 35 19 58 48 93 39 55 24 31 +6 +900 +82 2 77 98 10 34 74 80 97 48 +7 +1047 +4 76 86 95 7 72 46 67 61 27 +8 +1355 +72 46 21 25 14 42 17 3 75 82 +9 +1262 +93 72 75 4 91 65 30 93 92 51 +10 +1329 +68 69 96 45 5 39 62 54 73 90 +11 +562 +25 46 3 60 43 79 77 67 21 63 +12 +684 +67 3 50 87 30 9 43 25 29 85 +13 +567 +80 57 57 31 79 26 98 77 3 36 +14 +765 +43 71 66 1 39 72 48 38 96 69 +15 +808 +93 77 84 96 34 29 14 98 51 67 +16 +999 +21 33 98 22 77 36 45 96 26 81 +17 +548 +33 49 55 95 81 48 25 20 44 18 +18 +577 +14 59 70 73 11 57 98 15 56 81 +19 +704 +30 82 32 77 10 95 30 36 31 72 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_20_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_20_01.txt new file mode 100644 index 000000000..2ef8f0bee --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/020_20_01.txt @@ -0,0 +1,63 @@ +20 +20 +479340445 +0 +1696 +50 78 36 85 9 75 46 73 71 7 49 3 60 12 75 31 70 20 88 9 +1 +1273 +90 56 43 88 92 64 94 3 49 40 49 53 88 47 19 61 78 78 30 41 +2 +1546 +39 9 10 60 98 96 6 56 36 33 15 59 15 46 60 47 41 38 34 22 +3 +1882 +34 43 19 98 44 95 19 73 87 64 18 7 26 17 87 32 9 26 33 34 +4 +1117 +66 84 55 4 51 22 20 80 8 5 65 65 11 43 27 34 47 64 21 83 +5 +1181 +81 73 48 99 8 41 51 82 25 25 55 58 16 16 48 69 94 62 7 55 +6 +1416 +27 66 85 53 31 26 85 36 76 89 1 24 55 91 72 32 26 11 94 3 +7 +1635 +48 38 70 21 15 33 92 98 73 95 79 55 59 94 88 1 65 38 10 8 +8 +1723 +46 83 82 33 47 68 43 90 80 58 10 26 81 73 48 1 17 68 73 75 +9 +1932 +68 57 39 53 31 9 75 46 6 83 37 40 53 89 59 80 42 37 85 30 +10 +1219 +48 97 91 63 80 81 70 10 6 28 77 89 92 12 74 19 59 74 82 57 +11 +1521 +92 52 82 18 83 28 70 46 33 35 80 94 23 58 86 57 80 9 62 65 +12 +1322 +78 77 85 45 20 61 36 65 79 74 79 51 55 25 49 98 7 65 99 89 +13 +1057 +84 13 17 29 84 69 31 83 10 5 84 74 79 24 94 37 75 16 67 60 +14 +1922 +93 12 6 43 69 37 76 75 93 6 93 54 13 55 15 31 63 38 61 90 +15 +1130 +39 2 54 41 49 57 63 47 65 9 21 86 89 1 95 51 96 85 10 84 +16 +1411 +43 65 87 80 93 36 89 61 26 3 85 22 2 67 41 66 7 50 4 74 +17 +1840 +1 93 85 4 39 80 46 28 73 2 64 83 17 3 94 38 10 62 70 17 +18 +1741 +65 39 4 31 13 96 25 59 42 35 46 19 97 1 15 62 47 39 31 2 +19 +1377 +87 1 72 19 88 74 88 22 18 41 35 44 41 71 71 72 38 97 49 19 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_05_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_05_01.txt new file mode 100644 index 000000000..5f4b46f37 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_05_01.txt @@ -0,0 +1,153 @@ +50 +5 +1328042058 +0 +1290 +75 26 48 26 77 +1 +2352 +87 37 4 67 94 +2 +362 +13 25 92 4 9 +3 +305 +11 95 92 14 57 +4 +262 +41 49 72 93 29 +5 +1250 +43 12 45 54 79 +6 +2170 +93 59 5 21 55 +7 +1601 +69 17 98 20 73 +8 +2039 +80 46 93 6 65 +9 +1628 +13 20 17 18 86 +10 +483 +24 52 79 75 25 +11 +285 +72 44 11 25 39 +12 +1092 +38 92 16 16 76 +13 +936 +81 75 89 77 24 +14 +2349 +83 95 81 28 38 +15 +473 +88 33 92 24 5 +16 +2325 +26 10 45 15 91 +17 +747 +6 45 61 77 29 +18 +970 +89 2 39 36 22 +19 +434 +67 62 28 16 27 +20 +1258 +70 62 94 32 39 +21 +2405 +30 82 87 46 31 +22 +862 +89 29 23 21 46 +23 +298 +30 29 1 81 18 +24 +2014 +68 94 55 28 93 +25 +2608 +21 20 91 70 58 +26 +1737 +78 42 67 89 85 +27 +2214 +46 80 91 54 58 +28 +1910 +99 94 4 96 97 +29 +2245 +10 35 60 62 10 +30 +2211 +17 8 38 46 79 +31 +547 +23 41 25 60 93 +32 +2237 +83 65 90 19 2 +33 +1327 +47 4 93 97 87 +34 +700 +86 71 13 13 17 +35 +1011 +18 30 65 7 18 +36 +2001 +67 14 25 44 10 +37 +1230 +46 32 34 7 50 +38 +1020 +4 50 47 73 8 +39 +1918 +14 30 98 15 26 +40 +1001 +4 27 91 66 14 +41 +1383 +20 98 11 70 21 +42 +1229 +88 39 46 97 15 +43 +2594 +50 84 50 33 10 +44 +403 +84 65 77 97 85 +45 +1515 +58 12 5 64 46 +46 +431 +93 58 14 73 42 +47 +1971 +76 45 47 28 18 +48 +939 +50 49 80 4 36 +49 +2028 +30 15 45 87 2 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_10_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_10_01.txt new file mode 100644 index 000000000..17f3cb117 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_10_01.txt @@ -0,0 +1,153 @@ +50 +10 +1958948863 +0 +793 +46 61 3 51 37 79 83 22 27 24 +1 +2280 +52 87 1 24 16 93 87 29 92 47 +2 +939 +79 51 58 21 42 68 38 99 75 39 +3 +2591 +45 25 85 57 47 75 38 25 94 66 +4 +1540 +97 73 33 69 94 37 86 98 18 41 +5 +2386 +10 93 71 51 14 44 67 55 41 46 +6 +812 +44 28 58 50 94 34 23 80 37 24 +7 +2524 +24 90 56 51 34 39 19 82 58 23 +8 +1370 +85 94 64 21 72 76 97 33 56 68 +9 +1319 +75 59 43 19 36 62 78 68 20 50 +10 +2388 +66 64 48 63 88 74 66 47 2 93 +11 +961 +49 2 69 91 51 28 67 74 39 22 +12 +2831 +95 16 96 11 41 78 7 26 91 64 +13 +2790 +61 35 35 6 71 43 23 61 81 81 +14 +2076 +19 53 82 31 94 98 67 95 33 94 +15 +2519 +47 40 53 63 99 83 8 55 14 97 +16 +1981 +84 81 64 36 11 91 77 11 88 54 +17 +695 +13 26 11 39 97 27 71 42 22 82 +18 +2133 +11 85 61 57 44 6 85 72 36 11 +19 +1871 +19 4 36 47 77 82 29 14 65 91 +20 +1495 +98 4 53 56 69 60 49 8 79 23 +21 +754 +2 10 87 65 91 44 3 98 23 32 +22 +783 +85 63 88 59 38 43 94 90 66 26 +23 +984 +44 96 10 4 25 76 76 36 5 22 +24 +2004 +7 55 32 10 87 99 95 75 15 12 +25 +2269 +73 71 38 12 7 66 48 69 51 23 +26 +1771 +19 66 25 62 66 11 4 26 2 34 +27 +2030 +69 94 24 43 54 35 37 24 81 87 +28 +2603 +12 7 90 49 86 52 82 55 12 59 +29 +2150 +73 15 7 54 49 8 57 98 40 2 +30 +2157 +85 11 11 87 3 40 61 86 59 38 +31 +2187 +23 99 49 29 48 62 6 30 32 84 +32 +937 +53 37 2 2 44 25 97 92 16 62 +33 +728 +16 50 76 18 93 24 5 94 87 10 +34 +510 +88 56 17 75 37 30 27 66 78 11 +35 +2786 +8 69 32 39 82 1 95 47 41 93 +36 +2134 +26 22 39 77 31 73 46 3 43 57 +37 +1046 +42 56 9 69 59 27 92 41 94 81 +38 +2849 +58 67 83 15 78 16 46 41 1 10 +39 +1956 +63 63 69 78 33 91 52 47 93 40 +40 +2456 +7 96 67 68 36 33 8 89 22 62 +41 +1105 +2 74 28 37 3 11 11 28 93 49 +42 +1560 +44 4 88 22 58 99 7 39 62 90 +43 +1745 +38 42 23 41 10 2 54 80 53 34 +44 +2216 +24 40 91 92 98 60 72 47 30 11 +45 +1157 +76 30 71 67 6 90 57 57 34 81 +46 +1317 +85 93 3 24 44 36 85 74 27 51 +47 +2372 +61 36 26 87 62 62 22 38 30 21 +48 +777 +32 25 41 91 24 15 87 59 54 39 +49 +972 +90 87 96 31 94 3 65 5 77 27 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_20_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_20_01.txt new file mode 100644 index 000000000..23ccddab3 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/050_20_01.txt @@ -0,0 +1,153 @@ +50 +20 +1539989115 +0 +2509 +52 63 82 16 63 94 79 22 80 96 53 54 71 27 95 3 92 80 61 74 +1 +2039 +95 99 21 26 55 34 21 6 13 3 19 67 90 93 53 80 62 38 86 38 +2 +3096 +42 69 79 46 59 89 93 24 64 50 99 25 59 49 54 78 11 55 16 4 +3 +2950 +75 70 95 66 35 62 32 55 77 57 62 77 82 63 22 32 83 34 42 31 +4 +1249 +44 53 46 76 21 47 8 48 17 66 88 38 22 65 84 53 87 85 14 62 +5 +2481 +57 21 23 31 59 66 45 57 78 84 93 98 88 34 54 43 66 44 92 39 +6 +3193 +89 10 40 36 78 76 37 78 82 98 34 96 35 10 2 85 98 47 67 97 +7 +3253 +53 31 95 8 25 15 78 5 4 55 72 20 49 56 80 19 42 66 77 57 +8 +2123 +84 80 87 37 30 18 26 50 72 70 42 15 78 51 84 48 23 19 46 9 +9 +2390 +62 18 37 21 38 54 98 83 93 32 65 36 69 97 66 49 45 66 41 54 +10 +1764 +91 5 24 3 78 24 17 70 68 31 39 65 76 52 25 66 52 61 78 13 +11 +2940 +14 18 24 76 79 55 25 21 25 64 79 97 2 46 16 22 6 60 3 47 +12 +1635 +95 17 65 67 58 96 21 71 67 11 9 27 14 16 79 37 3 98 72 6 +13 +3171 +89 71 62 5 44 10 28 58 80 9 26 25 3 50 90 51 64 82 95 70 +14 +2670 +4 90 19 47 38 12 68 36 43 32 72 61 22 96 51 82 55 79 53 19 +15 +2932 +95 93 67 72 76 96 24 50 93 58 29 24 26 85 29 59 97 71 59 97 +16 +2054 +2 14 66 66 70 53 62 31 21 98 36 97 44 61 29 88 83 28 34 41 +17 +3238 +97 49 6 56 72 92 89 86 33 95 48 61 1 76 90 77 42 74 66 1 +18 +2466 +68 52 65 95 85 77 60 29 14 25 57 75 4 30 83 19 81 27 42 57 +19 +2384 +20 7 59 49 8 6 64 30 30 4 95 92 16 90 83 32 92 33 63 60 +20 +3473 +33 78 2 47 10 91 38 93 59 45 93 73 55 42 19 52 68 13 27 62 +21 +3290 +51 57 67 26 84 14 90 49 83 60 79 21 43 88 95 9 46 9 92 14 +22 +2086 +98 41 82 81 42 41 87 83 85 87 88 29 87 37 87 96 56 12 8 90 +23 +2560 +8 75 90 56 67 30 1 89 85 31 77 3 35 43 12 23 88 51 65 76 +24 +3253 +85 98 30 76 20 85 99 44 70 1 94 96 76 88 34 64 50 16 34 12 +25 +3205 +86 93 63 66 24 17 34 38 35 96 39 51 98 91 23 22 13 49 6 89 +26 +2534 +73 33 5 36 75 23 9 62 2 22 74 26 78 14 44 37 23 83 42 37 +27 +2039 +4 75 93 53 23 60 22 45 76 95 46 44 81 63 30 3 13 48 39 35 +28 +2273 +40 68 53 26 33 76 74 22 46 73 17 56 48 65 82 52 49 13 2 91 +29 +2062 +98 33 85 52 60 39 14 85 72 77 30 31 25 74 83 44 18 78 7 69 +30 +1909 +12 60 81 29 20 85 14 39 69 30 62 64 81 71 42 11 50 96 85 55 +31 +2432 +59 82 73 36 75 10 84 98 46 88 77 38 27 8 56 21 94 77 32 48 +32 +2624 +44 24 34 68 83 65 75 56 3 14 43 44 84 39 89 85 71 68 14 56 +33 +3325 +46 99 74 21 26 15 37 68 57 22 98 46 59 95 38 6 64 88 74 84 +34 +3427 +2 4 13 71 92 55 32 84 71 93 48 66 98 82 96 40 31 77 59 22 +35 +1318 +41 97 78 61 29 41 29 77 77 48 14 31 14 17 10 68 21 76 95 51 +36 +1539 +28 24 35 71 39 28 32 67 33 10 45 48 32 38 3 30 2 73 48 43 +37 +3223 +83 50 20 69 14 93 89 53 49 7 25 27 95 69 53 35 63 92 37 50 +38 +1703 +28 55 16 28 74 88 12 46 59 14 98 82 30 17 97 58 58 72 59 62 +39 +1051 +21 91 48 86 66 27 47 24 82 91 30 51 13 24 11 31 36 87 4 61 +40 +1512 +80 46 12 27 86 77 19 52 59 5 90 90 68 66 65 11 64 66 42 10 +41 +2589 +71 58 11 41 10 81 97 96 70 43 92 63 19 75 47 11 52 98 93 87 +42 +3248 +4 17 80 86 27 19 7 2 76 30 35 85 57 52 76 6 8 40 32 99 +43 +2047 +60 47 9 55 8 76 12 88 10 79 13 36 65 59 22 59 94 31 30 40 +44 +3333 +34 82 24 17 7 55 43 33 65 39 75 69 13 4 17 64 51 75 16 91 +45 +1760 +55 6 76 62 97 67 89 27 19 34 55 67 63 73 14 65 36 45 95 64 +46 +2333 +53 15 32 96 84 65 14 49 77 77 80 81 26 56 11 23 82 98 58 62 +47 +2400 +96 91 35 59 56 8 33 78 86 81 67 18 96 19 69 80 30 90 12 53 +48 +2142 +37 74 66 53 61 18 56 82 21 11 3 81 53 39 91 75 17 4 95 33 +49 +1231 +37 42 48 93 9 56 57 65 75 10 93 72 94 51 53 63 21 23 21 16 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_05_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_05_01.txt new file mode 100644 index 000000000..f0d8d9b38 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_05_01.txt @@ -0,0 +1,303 @@ +100 +5 +896678084 +0 +1682 +73 34 8 62 10 +1 +4503 +84 46 37 86 60 +2 +1249 +57 97 38 46 34 +3 +4984 +52 88 30 3 96 +4 +2923 +66 52 20 22 79 +5 +2401 +67 49 68 33 62 +6 +1978 +33 88 4 90 6 +7 +5318 +62 15 78 94 15 +8 +4769 +65 55 41 98 94 +9 +2093 +7 6 2 9 39 +10 +2438 +6 77 62 84 85 +11 +3143 +31 49 38 69 17 +12 +698 +42 46 95 26 55 +13 +621 +82 14 82 22 59 +14 +2463 +48 35 96 49 48 +15 +3865 +45 40 56 90 11 +16 +1563 +79 1 61 81 63 +17 +1461 +86 70 34 12 98 +18 +2285 +10 46 1 54 33 +19 +4381 +47 28 9 53 49 +20 +1057 +67 73 57 18 41 +21 +3190 +86 24 80 56 82 +22 +4493 +64 44 58 43 12 +23 +4604 +38 55 7 50 61 +24 +1592 +13 94 56 82 94 +25 +4645 +69 52 31 18 80 +26 +2729 +4 40 92 89 84 +27 +1925 +21 76 84 49 18 +28 +3843 +25 92 25 20 68 +29 +4188 +74 22 20 76 6 +30 +2635 +11 46 65 90 98 +31 +3773 +85 19 36 64 47 +32 +269 +50 18 67 89 6 +33 +307 +21 50 96 16 55 +34 +907 +93 31 35 3 73 +35 +288 +98 41 59 12 70 +36 +5211 +91 51 76 45 56 +37 +331 +26 73 66 67 46 +38 +1499 +4 22 83 97 50 +39 +1119 +28 21 37 80 90 +40 +4399 +61 79 33 97 89 +41 +1306 +8 93 2 92 88 +42 +1149 +55 98 95 56 50 +43 +3919 +68 89 20 50 99 +44 +3875 +30 44 84 95 41 +45 +3485 +26 64 43 25 36 +46 +2800 +81 93 4 52 16 +47 +1893 +95 66 44 21 84 +48 +2341 +49 14 74 47 98 +49 +874 +6 10 92 4 44 +50 +3355 +82 36 55 67 42 +51 +345 +71 36 98 62 43 +52 +1530 +61 69 8 63 62 +53 +3516 +84 79 30 25 49 +54 +3194 +29 90 18 3 22 +55 +985 +44 51 28 55 16 +56 +1638 +83 81 54 87 14 +57 +2970 +12 16 68 84 55 +58 +4265 +54 28 42 28 45 +59 +3494 +19 26 28 73 20 +60 +5134 +52 97 12 8 35 +61 +3520 +59 33 57 38 89 +62 +3570 +74 77 81 80 7 +63 +1335 +42 68 19 53 64 +64 +313 +60 28 16 70 36 +65 +1031 +43 46 88 9 5 +66 +4360 +80 16 75 87 63 +67 +2814 +34 96 11 33 8 +68 +571 +74 59 57 11 76 +69 +538 +46 56 99 65 95 +70 +2856 +40 4 4 92 40 +71 +747 +27 52 51 34 51 +72 +3321 +79 89 26 64 98 +73 +612 +1 84 6 96 77 +74 +4517 +98 42 16 67 92 +75 +1532 +44 37 71 54 35 +76 +2848 +8 90 52 26 3 +77 +4701 +55 51 96 32 56 +78 +263 +55 84 89 10 1 +79 +5340 +27 16 79 91 17 +80 +3979 +69 39 91 90 70 +81 +4804 +79 16 57 31 45 +82 +1574 +97 37 2 7 87 +83 +3644 +39 19 33 6 37 +84 +1512 +54 15 42 77 70 +85 +4445 +75 68 1 91 84 +86 +3253 +88 7 40 42 69 +87 +5334 +87 58 76 5 7 +88 +2338 +97 47 85 46 5 +89 +1071 +4 27 99 54 97 +90 +2398 +79 82 65 56 47 +91 +1675 +59 72 98 1 12 +92 +4974 +7 1 78 24 54 +93 +1785 +89 7 61 62 84 +94 +3391 +61 22 83 47 49 +95 +4517 +42 40 30 63 89 +96 +2909 +79 59 14 39 86 +97 +2733 +85 16 62 63 37 +98 +853 +66 7 41 95 52 +99 +4261 +99 72 91 45 85 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_10_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_10_01.txt new file mode 100644 index 000000000..480d6be62 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_10_01.txt @@ -0,0 +1,303 @@ +100 +10 +1539989115 +0 +3490 +52 82 63 79 80 53 71 95 92 61 +1 +2540 +95 21 55 21 13 19 90 53 62 86 +2 +4675 +42 79 59 93 64 99 59 54 11 16 +3 +4381 +75 95 35 32 77 62 82 22 83 42 +4 +945 +44 46 21 8 17 88 22 84 87 14 +5 +3435 +57 23 59 45 78 93 88 54 66 92 +6 +4873 +89 40 78 37 82 34 35 2 98 67 +7 +4993 +53 95 25 78 4 72 49 80 42 77 +8 +2710 +84 87 30 26 72 42 78 84 23 46 +9 +3251 +62 37 38 98 93 65 69 66 45 41 +10 +1985 +91 24 78 17 68 39 76 25 52 78 +11 +4361 +14 24 79 25 25 79 2 16 6 3 +12 +1726 +95 65 58 21 67 9 14 79 3 72 +13 +4828 +89 62 44 28 80 26 3 90 64 95 +14 +3816 +4 19 38 68 43 72 22 51 55 53 +15 +4345 +95 67 76 24 93 29 26 29 97 59 +16 +2572 +2 66 70 62 21 36 44 29 83 34 +17 +4963 +97 6 72 89 33 48 1 90 42 66 +18 +3403 +68 65 85 60 14 57 4 83 81 42 +19 +3238 +20 59 8 64 30 95 16 83 92 63 +20 +5437 +33 2 10 38 59 93 55 19 68 27 +21 +5068 +51 67 84 90 83 79 43 95 46 92 +22 +2635 +98 82 42 87 85 88 87 87 56 8 +23 +3593 +8 90 67 1 85 77 35 12 88 65 +24 +4993 +85 30 20 99 70 94 76 34 50 34 +25 +4897 +86 63 24 34 35 39 98 23 13 6 +26 +3542 +73 5 75 9 2 74 78 44 23 42 +27 +2541 +4 93 23 22 76 46 81 30 13 39 +28 +3014 +40 53 33 74 46 17 48 82 49 2 +29 +2587 +98 85 60 14 72 30 25 83 18 7 +30 +2278 +12 81 20 14 69 62 81 42 50 85 +31 +3336 +59 73 75 84 46 77 27 56 94 32 +32 +3723 +44 34 83 75 3 43 84 89 71 14 +33 +5138 +46 74 26 37 57 98 59 38 64 74 +34 +5345 +2 13 92 32 71 48 98 96 31 59 +35 +1084 +41 78 29 29 77 14 14 10 21 95 +36 +1531 +28 35 39 32 33 45 32 3 2 48 +37 +4932 +83 20 14 89 49 25 95 53 63 37 +38 +1863 +28 16 74 12 59 98 30 97 58 59 +39 +545 +21 48 66 47 82 30 13 11 36 4 +40 +1477 +80 12 86 19 59 90 68 65 64 42 +41 +3653 +71 11 10 97 70 92 19 47 52 93 +42 +4983 +4 80 27 7 76 35 57 76 8 32 +43 +2558 +60 9 8 12 10 13 65 22 94 30 +44 +5156 +34 24 7 43 65 75 13 17 51 16 +45 +1977 +55 76 97 89 19 55 63 14 36 95 +46 +3136 +53 32 84 14 77 80 26 11 82 58 +47 +3271 +96 35 56 33 86 67 96 69 30 12 +48 +2748 +37 66 61 56 21 3 53 91 17 95 +49 +909 +37 48 9 57 75 93 94 53 21 21 +50 +4366 +63 16 94 22 96 54 27 3 80 74 +51 +4943 +99 26 34 6 3 67 93 80 38 38 +52 +4596 +69 46 89 24 50 25 49 78 55 4 +53 +1793 +70 66 62 55 57 77 63 32 34 31 +54 +4596 +53 76 47 48 66 38 65 53 85 62 +55 +3717 +21 31 66 57 84 98 34 43 44 39 +56 +4624 +10 36 76 78 98 96 10 85 47 97 +57 +5212 +31 8 15 5 55 20 56 19 66 57 +58 +5604 +80 37 18 50 70 15 51 48 19 9 +59 +2110 +18 21 54 83 32 36 97 49 66 54 +60 +2568 +5 3 24 70 31 65 52 66 61 13 +61 +5330 +18 76 55 21 64 97 46 22 60 47 +62 +676 +17 67 96 71 11 27 16 37 98 6 +63 +1603 +71 5 10 58 9 25 50 51 82 70 +64 +1085 +90 47 12 36 32 61 96 82 79 19 +65 +5128 +93 72 96 50 58 24 85 59 71 97 +66 +938 +14 66 53 31 98 97 61 88 28 41 +67 +4778 +49 56 92 86 95 61 76 77 74 1 +68 +1986 +52 95 77 29 25 75 30 19 27 57 +69 +2115 +7 49 6 30 4 92 90 32 33 60 +70 +616 +78 47 91 93 45 73 42 52 13 62 +71 +534 +57 26 14 49 60 21 88 9 9 14 +72 +1231 +41 81 41 83 87 29 37 96 12 90 +73 +3376 +75 56 30 89 31 3 43 23 51 76 +74 +2922 +98 76 85 44 1 96 88 64 16 12 +75 +2152 +93 66 17 38 96 51 91 22 49 89 +76 +1813 +33 36 23 62 22 26 14 37 83 37 +77 +3561 +75 53 60 45 95 44 63 3 48 35 +78 +4603 +68 26 76 22 73 56 65 52 13 91 +79 +2813 +33 52 39 85 77 31 74 44 78 69 +80 +528 +60 29 85 39 30 64 71 11 96 55 +81 +1112 +82 36 10 98 88 38 8 21 77 48 +82 +4387 +24 68 65 56 14 44 39 85 68 56 +83 +4573 +99 21 15 68 22 46 95 6 88 84 +84 +5585 +4 71 55 84 93 66 82 40 77 22 +85 +2680 +97 61 41 77 48 31 17 68 76 51 +86 +3262 +24 71 28 67 10 48 38 30 73 43 +87 +3913 +50 69 93 53 7 27 69 35 92 50 +88 +1749 +55 28 88 46 14 82 17 58 72 62 +89 +2369 +91 86 27 24 91 51 24 31 87 61 +90 +888 +46 27 77 52 5 90 66 11 66 10 +91 +3107 +58 41 81 96 43 63 75 11 98 87 +92 +4964 +17 86 19 2 30 85 52 6 40 99 +93 +5249 +47 55 76 88 79 36 59 59 31 40 +94 +5632 +82 17 55 33 39 69 4 64 75 91 +95 +893 +6 62 67 27 34 67 73 65 45 64 +96 +3432 +15 96 65 49 77 81 56 23 98 62 +97 +5507 +91 59 8 78 81 18 19 80 90 53 +98 +2007 +74 53 18 82 11 81 39 75 4 33 +99 +5336 +42 93 56 65 10 72 51 63 23 16 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_20_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_20_01.txt new file mode 100644 index 000000000..f063c0f7c --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/100_20_01.txt @@ -0,0 +1,303 @@ +100 +20 +450926852 +0 +1420 +12 27 24 42 5 27 51 48 42 31 48 51 8 1 1 28 4 44 6 57 +1 +1890 +72 97 57 16 42 69 9 44 18 49 92 84 37 77 59 81 40 6 49 88 +2 +5212 +29 53 68 44 47 38 22 73 31 78 43 28 33 92 53 96 5 18 84 88 +3 +2835 +16 16 58 75 47 66 15 95 18 23 35 63 4 57 22 99 37 51 72 43 +4 +4466 +22 36 76 32 47 21 84 72 55 37 7 86 8 46 10 79 80 77 39 25 +5 +5004 +61 28 70 66 78 65 38 12 82 34 51 99 38 75 48 97 46 47 51 81 +6 +1562 +69 50 72 31 94 3 71 30 64 43 85 27 97 2 94 15 14 27 77 3 +7 +1927 +71 41 56 6 18 7 11 22 36 7 66 24 75 14 46 6 81 17 59 3 +8 +2807 +86 42 56 6 14 10 45 25 48 69 87 36 76 14 57 77 16 42 97 78 +9 +2057 +16 86 55 52 97 11 48 92 74 97 71 83 93 79 55 98 10 84 5 97 +10 +5762 +54 2 89 7 54 41 29 5 17 15 16 24 69 64 66 5 79 3 83 74 +11 +5182 +53 45 23 92 73 64 31 44 60 38 40 54 10 8 69 51 35 69 51 71 +12 +5558 +64 86 42 45 94 9 14 90 18 80 22 34 25 73 7 51 41 3 9 50 +13 +2591 +96 43 26 70 17 15 56 35 88 78 12 49 40 15 13 60 83 6 9 70 +14 +4353 +79 92 87 72 97 71 59 24 37 89 2 43 88 71 64 17 13 94 59 23 +15 +4442 +68 73 17 48 7 86 35 64 29 95 90 5 90 6 83 98 93 58 30 43 +16 +2375 +98 99 38 86 94 2 7 82 19 1 63 70 57 54 39 46 55 65 86 51 +17 +3311 +87 84 24 63 94 26 20 7 51 18 52 56 39 59 46 87 48 36 49 97 +18 +2369 +40 83 82 61 68 57 48 34 20 11 15 71 29 49 59 44 35 28 46 57 +19 +4728 +74 61 55 92 4 78 88 91 7 11 6 12 97 38 36 18 75 68 13 77 +20 +5437 +22 7 47 73 60 84 54 59 43 92 18 30 51 21 69 71 66 73 45 90 +21 +3616 +23 8 7 49 70 20 30 5 77 99 87 77 97 60 47 93 82 81 51 58 +22 +4472 +47 62 99 53 68 21 81 47 95 81 66 55 5 8 83 97 3 12 68 75 +23 +2738 +55 3 89 20 22 3 2 96 92 79 7 92 75 35 25 44 79 89 82 4 +24 +1604 +21 21 20 97 17 39 1 7 27 53 43 78 91 81 12 18 78 53 6 12 +25 +3121 +90 50 65 58 59 64 78 53 70 47 27 79 80 96 28 59 48 14 99 2 +26 +2296 +68 71 3 59 98 51 8 60 91 48 78 52 81 61 30 9 99 88 12 4 +27 +2107 +14 95 45 29 55 83 8 77 74 32 80 19 60 89 49 45 91 78 8 28 +28 +5637 +42 70 89 98 76 12 71 61 62 58 73 16 97 58 81 78 29 63 36 54 +29 +1686 +41 60 96 61 3 16 60 14 80 33 86 21 14 32 56 67 87 81 24 39 +30 +2186 +40 4 16 83 21 3 41 88 85 65 82 37 2 59 96 65 27 29 82 30 +31 +5311 +63 58 42 8 10 1 39 97 8 86 33 85 55 89 89 50 2 15 73 71 +32 +3210 +23 16 70 83 11 88 8 92 39 60 92 56 97 99 73 87 48 81 66 89 +33 +1223 +75 30 69 73 44 80 96 65 85 47 8 29 60 7 52 29 33 84 69 33 +34 +2856 +4 80 77 2 29 77 3 73 83 89 87 56 8 79 12 80 92 36 71 85 +35 +4618 +31 71 46 56 43 2 79 19 76 40 64 23 30 38 98 14 15 8 70 2 +36 +1981 +87 59 20 7 60 14 48 99 31 72 7 19 87 1 12 70 55 60 61 69 +37 +2755 +25 75 71 15 14 60 23 92 12 54 26 52 42 67 40 10 24 24 42 20 +38 +1976 +47 52 91 55 46 45 38 19 69 29 79 39 16 63 70 30 59 57 77 64 +39 +1153 +70 25 8 3 3 39 85 66 26 57 49 4 56 42 35 19 41 87 10 94 +40 +5686 +1 86 34 73 60 32 32 25 54 93 71 46 86 3 58 51 49 61 2 3 +41 +4817 +49 48 72 13 72 97 69 79 91 65 72 59 4 29 95 4 88 57 6 41 +42 +1305 +59 53 40 47 90 98 56 36 61 39 69 22 30 23 41 23 67 85 24 37 +43 +4539 +11 54 82 76 1 65 99 10 27 8 30 76 15 21 71 9 49 45 97 36 +44 +4894 +93 98 60 15 42 86 51 23 88 87 28 34 24 25 90 62 81 69 15 74 +45 +2853 +38 36 59 43 74 6 59 37 53 57 46 63 23 48 3 30 89 15 91 53 +46 +1815 +5 9 59 44 54 14 47 76 47 5 75 32 57 33 68 20 43 7 32 49 +47 +5816 +43 78 43 13 41 99 79 83 39 56 78 72 81 92 5 69 24 87 68 77 +48 +5297 +82 80 72 16 15 93 67 58 14 80 34 92 77 2 18 88 70 58 17 13 +49 +4830 +33 88 10 18 38 54 83 99 78 2 4 72 43 12 26 22 74 61 1 37 +50 +4903 +26 52 63 16 24 54 58 29 90 17 23 26 82 32 2 43 44 82 49 34 +51 +3618 +89 30 67 18 91 92 49 35 90 84 69 46 97 38 21 63 23 73 25 31 +52 +4572 +86 62 12 3 49 57 50 49 50 86 33 30 3 67 86 67 89 84 46 15 +53 +5078 +10 8 41 11 23 39 19 89 64 65 11 49 46 93 8 22 96 63 37 32 +54 +1714 +16 45 5 98 63 13 64 79 94 53 5 3 86 80 33 82 80 14 56 45 +55 +1214 +72 77 25 9 88 70 5 82 79 5 54 81 62 75 88 41 44 73 50 50 +56 +2317 +96 90 67 28 1 73 5 92 10 16 42 4 26 59 33 69 69 84 9 81 +57 +1939 +47 52 95 44 30 16 52 45 18 58 12 46 56 51 65 81 7 9 62 46 +58 +4684 +9 39 46 14 85 43 15 42 7 60 40 95 67 7 8 21 10 38 10 93 +59 +2148 +56 95 37 39 22 9 26 21 26 78 30 20 87 65 89 54 15 67 89 13 +60 +4555 +8 86 41 76 94 2 67 51 51 25 51 56 46 6 46 42 55 76 66 47 +61 +5302 +69 15 2 92 39 76 11 30 23 71 94 57 66 59 76 53 27 18 98 50 +62 +1794 +87 98 25 59 70 38 77 70 43 93 24 85 53 30 57 52 55 70 10 70 +63 +2125 +84 59 99 95 85 66 74 2 95 99 28 31 34 67 51 26 2 69 70 21 +64 +3571 +62 22 48 11 7 21 88 20 57 6 84 44 52 41 58 69 82 4 92 41 +65 +5197 +52 43 24 55 65 32 83 82 30 62 69 1 81 32 62 80 42 58 36 12 +66 +1470 +82 85 18 56 43 78 96 13 86 60 44 11 68 63 59 46 88 66 82 18 +67 +2420 +66 93 10 16 4 41 73 92 80 33 98 72 48 7 71 10 84 11 54 28 +68 +4451 +67 6 23 56 60 52 59 91 55 57 36 6 4 8 12 81 38 1 34 22 +69 +1234 +33 46 66 23 90 88 94 2 76 79 21 68 25 89 11 99 69 51 34 60 +70 +1487 +3 51 82 84 73 76 15 80 12 7 9 62 76 51 82 6 31 38 5 69 +71 +5745 +53 97 84 22 21 14 50 38 91 69 48 18 46 81 56 90 5 16 12 49 +72 +1472 +95 79 14 32 25 86 20 54 95 82 30 21 13 9 57 79 3 81 3 38 +73 +5132 +42 46 13 40 33 35 54 45 28 26 15 48 72 13 53 34 37 39 56 80 +74 +3842 +59 71 88 47 48 81 16 19 12 41 21 32 72 27 45 56 14 56 44 52 +75 +3269 +77 18 7 92 25 32 33 65 18 52 43 42 82 74 96 75 35 83 41 45 +76 +4366 +38 33 40 61 27 75 9 35 80 38 91 79 32 59 31 54 61 27 14 34 +77 +4912 +12 13 20 51 37 38 74 66 32 21 49 74 25 98 39 94 43 29 25 3 +78 +3383 +1 3 68 74 63 55 11 26 67 84 86 82 58 31 12 84 38 93 78 61 +79 +4632 +66 32 22 85 28 96 21 18 2 74 36 3 17 98 13 55 48 70 25 96 +80 +2775 +24 28 92 6 88 19 97 32 4 76 41 64 99 48 8 64 89 64 89 99 +81 +5614 +17 48 53 13 27 35 15 51 30 16 10 90 54 74 49 14 86 22 83 49 +82 +3465 +58 8 16 32 94 41 43 23 64 75 75 10 81 76 4 18 37 84 78 78 +83 +1004 +71 42 10 8 20 77 2 18 69 75 56 72 73 75 33 6 20 25 23 34 +84 +1425 +88 26 23 43 54 36 1 87 76 36 70 2 93 78 22 27 33 73 51 78 +85 +1759 +63 26 88 30 17 24 74 74 92 79 73 49 73 11 30 20 1 81 7 79 +86 +5341 +60 95 65 53 74 52 37 10 50 71 57 88 79 71 34 54 8 10 20 64 +87 +1080 +86 44 11 24 35 60 61 76 35 82 51 53 54 54 19 30 61 46 30 55 +88 +4906 +8 74 89 2 15 43 3 31 20 70 34 59 72 10 24 58 41 32 30 63 +89 +2859 +8 82 78 11 53 30 75 31 23 22 62 88 37 96 56 35 40 38 30 24 +90 +5588 +44 28 94 33 64 86 41 93 52 39 3 97 68 97 96 66 10 68 63 58 +91 +5551 +99 4 32 27 38 6 86 61 25 8 34 98 22 75 35 85 10 40 82 25 +92 +5376 +80 42 64 35 79 8 51 26 82 22 27 94 94 41 43 78 75 33 40 93 +93 +5672 +76 81 42 40 45 31 65 39 18 79 29 95 37 30 8 15 9 79 39 73 +94 +5671 +94 56 74 40 67 80 42 83 2 90 25 93 15 73 5 29 81 64 37 45 +95 +4086 +75 38 87 96 93 82 50 11 29 55 97 95 31 84 65 31 40 36 44 93 +96 +1806 +63 50 63 69 16 2 48 57 70 77 30 6 46 22 64 45 13 62 2 37 +97 +5810 +57 12 94 23 59 59 88 81 7 3 28 1 33 8 20 41 10 82 27 64 +98 +1083 +76 43 87 32 47 47 52 40 36 20 48 15 82 98 54 84 53 44 71 92 +99 +1887 +34 51 72 13 95 21 46 97 96 61 99 66 75 68 38 51 28 99 45 59 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/200_10_01.txt b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/200_10_01.txt new file mode 100644 index 000000000..d1bccf9b0 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/200_10_01.txt @@ -0,0 +1,603 @@ +200 +10 +471503978 +0 +7166 +17 30 28 15 52 5 53 55 81 47 +1 +7478 +37 26 82 67 82 44 43 65 44 51 +2 +4344 +22 2 88 57 17 2 43 38 46 44 +3 +3004 +71 29 33 64 66 98 56 76 3 27 +4 +4783 +79 98 69 23 62 27 48 45 93 76 +5 +4813 +37 67 28 9 57 10 83 99 14 4 +6 +1411 +69 92 92 1 58 25 34 84 86 76 +7 +4573 +53 51 66 2 91 27 93 67 23 49 +8 +7480 +59 53 92 43 42 41 95 40 59 5 +9 +4429 +64 82 30 73 69 59 48 93 47 25 +10 +841 +11 86 67 94 48 89 63 70 76 23 +11 +9418 +67 47 53 96 46 36 93 45 45 67 +12 +8849 +27 36 93 78 18 62 91 75 64 55 +13 +5306 +64 23 45 14 94 29 94 91 10 40 +14 +4634 +59 34 7 32 83 17 32 21 4 58 +15 +9336 +31 66 70 23 48 37 81 72 29 26 +16 +4344 +43 43 58 83 81 35 69 15 69 36 +17 +10182 +42 71 58 29 57 47 29 73 46 83 +18 +5648 +56 31 17 75 93 37 44 43 68 65 +19 +10009 +88 36 41 55 67 52 2 62 89 91 +20 +7809 +71 41 56 91 19 3 66 40 48 77 +21 +6970 +86 6 34 44 65 87 25 43 68 62 +22 +6260 +6 28 62 46 49 4 60 96 13 6 +23 +3543 +54 43 81 59 45 50 69 39 36 57 +24 +4215 +92 18 44 11 22 96 44 23 85 87 +25 +7436 +75 64 95 20 92 74 34 79 35 4 +26 +2229 +83 28 50 68 41 68 68 66 25 11 +27 +6742 +2 13 88 3 38 30 77 19 21 60 +28 +1878 +60 7 19 17 26 69 31 41 44 23 +29 +3222 +62 13 50 55 2 17 10 71 40 87 +30 +2189 +83 93 25 59 90 34 57 60 20 50 +31 +9874 +73 93 88 18 79 95 21 72 83 18 +32 +1849 +55 56 1 31 17 3 56 62 76 23 +33 +10057 +3 72 6 84 61 24 36 17 26 24 +34 +7309 +71 71 45 61 81 51 26 25 50 82 +35 +9509 +34 28 29 55 67 55 11 59 98 16 +36 +10403 +40 95 2 46 18 60 6 95 6 96 +37 +4515 +13 96 54 77 1 61 86 47 83 37 +38 +1586 +62 55 71 59 36 15 2 10 51 29 +39 +638 +56 58 81 98 31 38 89 94 46 19 +40 +7434 +28 66 22 23 85 83 28 39 99 26 +41 +9737 +53 3 57 18 92 62 62 53 65 56 +42 +5477 +71 77 16 17 6 84 63 50 46 33 +43 +5976 +5 80 88 70 78 44 52 99 24 53 +44 +3293 +73 2 5 73 83 80 12 63 47 6 +45 +5869 +95 82 52 38 39 48 13 59 24 95 +46 +10358 +23 86 23 13 74 45 43 30 32 63 +47 +4698 +49 16 21 77 77 54 99 67 66 84 +48 +9855 +17 29 21 74 85 71 11 18 48 13 +49 +5305 +81 24 58 79 88 10 70 12 83 6 +50 +8401 +88 89 96 51 25 96 82 9 3 19 +51 +6004 +62 96 37 48 33 23 14 41 74 16 +52 +3369 +35 99 46 16 36 8 39 67 97 80 +53 +10335 +78 15 78 93 32 56 83 52 39 37 +54 +2868 +90 49 87 29 82 35 4 39 80 20 +55 +5297 +36 78 91 28 98 72 86 90 27 62 +56 +3744 +46 48 9 6 3 53 93 25 70 81 +57 +9148 +98 64 96 82 46 13 87 13 65 52 +58 +3270 +75 3 93 40 68 72 82 81 1 14 +59 +7616 +36 63 98 9 11 38 78 3 26 67 +60 +5131 +74 14 31 88 30 1 32 8 46 19 +61 +9674 +86 95 78 51 75 69 82 66 8 86 +62 +940 +67 88 20 48 42 85 24 67 74 1 +63 +6286 +87 9 75 1 93 2 88 51 47 53 +64 +1159 +68 61 18 4 36 28 45 54 19 21 +65 +10410 +1 24 34 77 97 18 48 85 85 33 +66 +3268 +87 38 48 48 1 10 67 10 62 68 +67 +6533 +87 50 49 6 63 70 14 95 33 28 +68 +1984 +7 47 69 1 86 67 34 59 96 25 +69 +2658 +34 42 88 32 54 95 76 64 33 69 +70 +7518 +1 30 30 79 33 72 1 90 5 71 +71 +3280 +91 97 34 40 71 64 51 28 23 60 +72 +8989 +7 49 22 14 1 19 15 48 43 69 +73 +4877 +6 79 81 20 18 60 67 57 63 99 +74 +7608 +46 19 50 86 75 31 57 85 10 53 +75 +4775 +3 80 40 40 55 29 3 78 47 77 +76 +4441 +45 30 73 25 62 43 37 18 73 27 +77 +689 +55 24 91 94 21 17 15 59 1 29 +78 +8408 +92 58 7 73 71 78 50 11 19 83 +79 +2103 +67 43 1 44 80 28 75 67 92 22 +80 +6500 +13 6 71 98 5 47 80 36 31 10 +81 +3906 +30 95 72 94 48 78 3 24 29 42 +82 +4713 +27 43 8 61 87 77 9 59 68 64 +83 +9905 +19 99 68 65 22 92 28 24 31 80 +84 +3660 +51 22 49 44 5 42 44 39 92 73 +85 +2405 +86 99 7 75 71 86 2 1 48 91 +86 +7436 +20 11 47 4 69 6 71 80 87 38 +87 +5400 +95 99 90 17 75 19 89 58 8 60 +88 +8689 +79 60 59 1 72 28 24 76 90 53 +89 +5805 +48 42 39 12 36 18 73 59 57 38 +90 +685 +83 33 49 78 54 4 28 90 40 19 +91 +9892 +91 68 28 51 24 24 98 92 25 14 +92 +9000 +78 78 22 55 55 57 17 3 49 35 +93 +2827 +41 26 10 53 5 82 27 51 26 10 +94 +1779 +61 77 96 96 40 7 90 1 35 44 +95 +2539 +90 1 2 92 56 4 4 55 90 97 +96 +5797 +57 13 88 82 8 94 13 50 99 17 +97 +6740 +4 67 90 20 19 9 83 15 30 50 +98 +5913 +21 87 69 22 7 57 43 31 5 22 +99 +1778 +68 31 44 13 12 82 63 99 52 19 +100 +9256 +87 49 74 40 44 98 68 8 12 70 +101 +1943 +62 90 16 43 66 54 74 44 11 88 +102 +2314 +69 6 90 23 39 2 12 91 72 31 +103 +5964 +79 76 7 30 41 71 69 83 32 7 +104 +2160 +69 94 14 16 60 94 38 75 81 81 +105 +5000 +35 76 47 76 11 69 74 66 21 58 +106 +753 +25 79 48 30 31 51 98 98 81 2 +107 +8317 +68 66 36 59 65 80 86 77 64 89 +108 +9608 +14 51 62 64 16 79 72 8 45 1 +109 +5659 +9 14 1 72 67 85 76 6 4 80 +110 +3727 +74 89 63 61 19 56 53 26 10 52 +111 +878 +61 87 86 13 69 79 94 47 90 15 +112 +5610 +58 1 49 81 56 46 45 55 11 25 +113 +8024 +81 65 48 25 96 71 30 39 88 11 +114 +7993 +52 53 3 90 78 85 39 91 52 97 +115 +7345 +93 19 51 67 36 52 60 78 96 90 +116 +5943 +44 21 80 21 56 42 69 49 92 62 +117 +5637 +57 98 86 70 12 66 12 23 44 69 +118 +3377 +89 90 97 96 37 82 83 92 54 34 +119 +10135 +81 45 4 99 1 91 21 68 28 66 +120 +2394 +69 77 58 64 50 48 25 88 85 54 +121 +6036 +98 54 79 68 43 70 50 9 51 84 +122 +6761 +78 86 28 61 58 21 47 38 21 62 +123 +7860 +70 2 19 36 13 82 43 60 4 71 +124 +8007 +3 3 93 57 55 12 58 2 42 70 +125 +7718 +70 88 88 86 87 94 11 8 43 60 +126 +7598 +62 39 44 10 20 17 63 86 55 54 +127 +3245 +81 56 74 57 84 45 74 62 89 52 +128 +4953 +61 24 18 88 28 68 6 41 4 71 +129 +8163 +65 91 95 59 59 60 23 66 1 9 +130 +8429 +65 86 2 73 65 93 94 94 97 99 +131 +8623 +33 80 22 43 56 30 93 54 65 41 +132 +1742 +62 58 7 25 2 5 26 9 38 30 +133 +1409 +19 54 82 37 36 31 49 75 87 23 +134 +5249 +57 57 52 70 41 30 30 43 58 60 +135 +9063 +82 42 17 97 7 71 50 9 47 1 +136 +7293 +78 32 59 29 23 29 47 10 53 67 +137 +1353 +94 5 42 33 25 82 89 79 51 55 +138 +6480 +65 43 51 99 81 20 43 10 40 64 +139 +8191 +14 80 79 34 6 13 32 97 80 21 +140 +7595 +9 86 93 96 67 94 45 39 20 16 +141 +739 +29 47 65 65 5 47 47 30 24 94 +142 +7977 +70 95 27 90 89 57 68 74 77 11 +143 +8304 +90 86 25 52 71 95 13 52 37 90 +144 +6930 +86 40 60 95 86 8 86 90 13 48 +145 +5996 +12 31 72 3 48 46 97 12 29 85 +146 +2438 +40 61 29 64 50 80 2 61 28 34 +147 +2339 +12 12 55 21 54 32 16 34 18 7 +148 +5848 +64 64 58 16 21 7 27 88 22 79 +149 +4982 +32 17 22 70 83 34 38 27 75 95 +150 +7604 +18 52 58 67 27 33 53 68 24 50 +151 +10491 +11 56 61 13 38 33 37 14 79 78 +152 +8007 +40 35 89 96 79 18 94 88 99 39 +153 +6393 +14 60 67 57 71 29 78 74 35 79 +154 +1948 +22 75 14 7 53 19 84 71 45 69 +155 +8138 +49 10 10 30 2 74 49 14 95 27 +156 +3757 +95 50 40 96 9 58 25 16 46 42 +157 +4120 +82 66 11 98 49 52 59 46 15 15 +158 +4850 +7 53 99 72 79 10 36 47 7 51 +159 +4564 +19 58 7 31 39 70 33 54 24 44 +160 +4171 +95 12 20 11 28 78 15 91 45 71 +161 +669 +39 66 78 36 39 59 36 89 20 32 +162 +4803 +71 81 6 10 70 32 47 59 35 66 +163 +5464 +34 51 71 20 72 20 83 39 61 49 +164 +6219 +89 75 48 26 70 12 24 52 97 8 +165 +2726 +63 71 39 67 38 98 71 91 69 7 +166 +6507 +85 46 58 13 48 18 7 21 78 44 +167 +6446 +60 88 7 60 57 12 6 90 13 1 +168 +3416 +91 58 17 50 11 57 55 58 53 15 +169 +918 +49 73 63 28 38 73 43 74 16 6 +170 +3139 +46 27 73 32 37 91 82 30 94 51 +171 +9351 +10 26 43 49 56 46 40 63 59 91 +172 +7171 +19 38 14 54 64 64 78 19 64 33 +173 +2127 +50 48 66 46 64 92 64 18 72 77 +174 +4461 +65 8 59 15 68 45 96 88 13 69 +175 +799 +41 14 75 49 27 86 27 22 47 28 +176 +6861 +58 58 96 94 36 84 99 43 22 8 +177 +9690 +62 89 28 63 94 15 11 60 9 8 +178 +3180 +45 44 12 96 65 99 91 20 68 48 +179 +2449 +67 16 99 43 89 8 78 32 4 7 +180 +8742 +64 20 63 73 23 87 97 67 67 55 +181 +4503 +6 69 19 19 93 61 23 1 92 51 +182 +10135 +77 67 26 19 14 42 48 42 49 89 +183 +8757 +94 80 8 81 57 25 20 95 23 61 +184 +1192 +24 81 72 82 93 35 99 84 37 82 +185 +8334 +38 82 55 69 60 64 39 37 16 39 +186 +9610 +73 27 67 13 82 74 53 30 39 89 +187 +8681 +59 5 1 85 16 40 3 12 47 47 +188 +8465 +61 44 23 32 69 89 65 87 94 24 +189 +8425 +14 38 35 34 57 4 81 13 71 79 +190 +3227 +59 53 6 57 8 43 47 60 36 86 +191 +4628 +83 16 89 69 52 12 25 92 72 60 +192 +1319 +3 48 93 63 98 28 36 52 67 67 +193 +9629 +46 16 88 49 67 68 44 51 78 10 +194 +4236 +16 31 86 56 19 46 29 91 13 61 +195 +5509 +56 79 37 37 56 23 85 76 68 60 +196 +9597 +40 75 53 54 38 3 26 32 36 68 +197 +8513 +7 14 45 60 75 70 4 81 69 72 +198 +2882 +79 67 32 97 69 81 9 57 28 9 +199 +7268 +55 70 69 44 14 14 59 71 69 47 diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/README b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/README new file mode 100644 index 000000000..7f3c69274 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/benchmarks/README @@ -0,0 +1 @@ +Further benchmarks for the bi-objective flow-shop scheduling problem are available at http://www.lifl.fr/~liefooga/benchmarks/ \ No newline at end of file diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/make_eval_FlowShop.h b/trunk/paradiseo-moeo/tutorials/lesson1/make_eval_FlowShop.h new file mode 100644 index 000000000..339ffec88 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/make_eval_FlowShop.h @@ -0,0 +1,76 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "make_eval_FlowShop.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _make_eval_FlowShop_h +#define _make_eval_FlowShop_h + +#include "FlowShop.h" +#include "FlowShopBenchmarkParser.h" +#include "FlowShopEval.h" +// also need the parser and param includes +#include +#include + + +/* + * This function creates an eoEvalFuncCounter that can later be used to evaluate an individual. + * @param eoParser& _parser to get user parameters + * @param eoState& _state to store the memory + */ +eoEvalFuncCounter < FlowShop > &do_make_eval (eoParser & _parser, + eoState & _state) +{ + + // benchmark file name + string benchmarkFileName = + _parser.getORcreateParam (string (), "BenchmarkFile", + "Benchmark file name (benchmarks are available at " + + BENCHMARKS_WEB_SITE + ")", 'B', + "Representation", true).value (); + if (benchmarkFileName == "") + { + std::string stmp = "*** Missing name of the benchmark file\n"; + stmp += + " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n"; + stmp += " Benchmarks files are available at " + BENCHMARKS_WEB_SITE; + throw std::runtime_error (stmp.c_str ()); + } + // reading of the parameters contained in the benchmark file + FlowShopBenchmarkParser fParser (benchmarkFileName); + unsigned M = fParser.getM (); + unsigned N = fParser.getN (); + std::vector < std::vector < unsigned > > p = fParser.getP (); + std::vector < unsigned >d = fParser.getD (); + + // build of the initializer (a pointer, stored in the eoState) + FlowShopEval *plainEval = new FlowShopEval (M, N, p, d); + // turn that object into an evaluation counter + eoEvalFuncCounter < FlowShop > *eval = + new eoEvalFuncCounter < FlowShop > (*plainEval); + // store in state + _state.storeFunctor (eval); + // and return a reference + return *eval; +} + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/make_genotype_FlowShop.h b/trunk/paradiseo-moeo/tutorials/lesson1/make_genotype_FlowShop.h new file mode 100644 index 000000000..33355f10e --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/make_genotype_FlowShop.h @@ -0,0 +1,69 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "make_genotype_FlowShop.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _make_genotype_FlowShop_h +#define _make_genotype_FlowShop_h + +#include "FlowShop.h" +#include "FlowShopInit.h" +#include "FlowShopBenchmarkParser.h" +// also need the parser and param includes +#include +#include + + +/* + * This function creates an eoInit that can later be used to initialize the population (see make_pop.h). + * @param eoParser& _parser to get user parameters + * @param eoState& _state to store the memory + */ +eoInit < FlowShop > &do_make_genotype (eoParser & _parser, eoState & _state) +{ + + // benchmark file name + string benchmarkFileName = + _parser.getORcreateParam (string (), "BenchmarkFile", + "Benchmark file name (benchmarks are available at " + + BENCHMARKS_WEB_SITE + ")", 'B', + "Representation", true).value (); + if (benchmarkFileName == "") + { + std::string stmp = "*** Missing name of the benchmark file\n"; + stmp += + " Type '-B=the_benchmark_file_name' or '--BenchmarkFile=the_benchmark_file_name'\n"; + stmp += " Benchmarks files are available at " + BENCHMARKS_WEB_SITE; + throw std::runtime_error (stmp.c_str ()); + } + // reading of number of jobs to schedule contained in the benchmark file + FlowShopBenchmarkParser fParser (benchmarkFileName); + unsigned N = fParser.getN (); + + // build of the initializer (a pointer, stored in the eoState) + eoInit < FlowShop > *init = new FlowShopInit (N); + // store in state + _state.storeFunctor (init); + // and return a reference + return *init; +} + +#endif diff --git a/trunk/paradiseo-moeo/tutorials/lesson1/make_op_FlowShop.h b/trunk/paradiseo-moeo/tutorials/lesson1/make_op_FlowShop.h new file mode 100644 index 000000000..be35884f3 --- /dev/null +++ b/trunk/paradiseo-moeo/tutorials/lesson1/make_op_FlowShop.h @@ -0,0 +1,142 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +// "make_op_FlowShop.h" + +// (c) OPAC Team, LIFL, March 2006 + +/* This library 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 2 of the License, or (at your option) any later version. + + This library 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 this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: Arnaud.Liefooghe@lifl.fr +*/ + +#ifndef _make_op_FlowShop_h +#define _make_op_FlowShop_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// definition of crossover +#include "FlowShopOpCrossoverQuad.h" +// definition of mutation +#include "FlowShopOpMutationShift.h" +#include "FlowShopOpMutationExchange.h" + +// also need the parser and state includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoFlowShop + * @param eoParameterLoader& _parser to get user parameters + * @param eoState& _state to store the memory + */ +eoGenOp < FlowShop > &do_make_op (eoParameterLoader & _parser, + eoState & _state) +{ + + ///////////////////////////// + // Variation operators + //////////////////////////// + + // the crossover + //////////////// + + // a first crossover + eoQuadOp < FlowShop > *cross = new FlowShopOpCrossoverQuad; + // store in the state + _state.storeFunctor (cross); + + // relative rate in the combination + double cross1Rate = _parser.createParam (1.0, "crossRate", + "Relative rate for the only crossover", + 0, + "Variation Operators").value (); + // creation of the combined operator with this one + eoPropCombinedQuadOp < FlowShop > *propXover = + new eoPropCombinedQuadOp < FlowShop > (*cross, cross1Rate); + // store in the state + _state.storeFunctor (propXover); + + + // the mutation + /////////////// + + // a first mutation : the shift mutation + eoMonOp < FlowShop > *mut = new FlowShopOpMutationShift; + _state.storeFunctor (mut); + // its relative rate in the combination + double mut1Rate = _parser.createParam (0.5, "shiftMutRate", + "Relative rate for shift mutation", + 0, + "Variation Operators").value (); + // creation of the combined operator with this one + eoPropCombinedMonOp < FlowShop > *propMutation = + new eoPropCombinedMonOp < FlowShop > (*mut, mut1Rate); + _state.storeFunctor (propMutation); + + // a second mutation : the exchange mutation + mut = new FlowShopOpMutationExchange; + _state.storeFunctor (mut); + // its relative rate in the combination + double mut2Rate = _parser.createParam (0.5, "exchangeMutRate", + "Relative rate for exchange mutation", + 0, + "Variation Operators").value (); + // addition of this one to the combined operator + propMutation->add (*mut, mut2Rate); + + // end of crossover and mutation definitions + //////////////////////////////////////////// + + // First read the individual level parameters + eoValueParam < double >&pCrossParam = + _parser.createParam (0.25, "pCross", "Probability of Crossover", 'c', + "Variation Operators"); + // minimum check + if ((pCrossParam.value () < 0) || (pCrossParam.value () > 1)) + throw runtime_error ("Invalid pCross"); + + eoValueParam < double >&pMutParam = + _parser.createParam (0.35, "pMut", "Probability of Mutation", 'm', + "Variation Operators"); + // minimum check + if ((pMutParam.value () < 0) || (pMutParam.value () > 1)) + throw runtime_error ("Invalid pMut"); + + // the crossover - with probability pCross + eoProportionalOp < FlowShop > *propOp = new eoProportionalOp < FlowShop >; + _state.storeFunctor (propOp); + eoQuadOp < FlowShop > *ptQuad = new eoQuadCloneOp < FlowShop >; + _state.storeFunctor (ptQuad); + propOp->add (*propXover, pCrossParam.value ()); // crossover, with proba pcross + propOp->add (*ptQuad, 1 - pCrossParam.value ()); // nothing, with proba 1-pcross + + // now the sequential + eoSequentialOp < FlowShop > *op = new eoSequentialOp < FlowShop >; + _state.storeFunctor (op); + op->add (*propOp, 1.0); // always do combined crossover + op->add (*propMutation, pMutParam.value ()); // then mutation, with proba pmut + + // return a reference + return *op; +} + +#endif