git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@177 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
56388d43fa
commit
f3bf6dcb10
59 changed files with 5880 additions and 0 deletions
507
branches/paradiseo-moeo-1.0/.cdtproject
Normal file
507
branches/paradiseo-moeo-1.0/.cdtproject
Normal file
|
|
@ -0,0 +1,507 @@
|
|||
<?xml version="1.0"?>
|
||||
<?eclipse-cdt version="2.0"?>
|
||||
<cdtproject id="org.eclipse.cdt.make.core.make">
|
||||
<extension point="org.eclipse.cdt.core.BinaryParser" id="org.eclipse.cdt.core.ELF"/>
|
||||
<data>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item id="scannerConfiguration">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<autodiscovery enabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile" problemReportingEnabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<openAction enabled="true" filePath=""/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<scannerInfoProvider id="specsFile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<runAction useDefault="true" command="gcc" arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</scannerInfoProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</profile>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<openAction enabled="false" filePath=""/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<scannerInfoProvider id="makefileGenerator">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<runAction useDefault="true" command="make" arguments="-f ${project_name}_scd.mk"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="false"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</scannerInfoProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</profile>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<openAction enabled="false" filePath=""/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<scannerInfoProvider id="specsFile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<runAction useDefault="true" command="gcc" arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="false"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</scannerInfoProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</profile>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<openAction enabled="false" filePath=""/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="true"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</buildOutputProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<scannerInfoProvider id="specsFile">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<runAction useDefault="true" command="gcc" arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<parser enabled="false"/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</scannerInfoProvider>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</profile>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item id="org.eclipse.cdt.core.pathentry">
|
||||
<pathentry kind="inc" path="" include="/home/arnaud/workspace/eo/src" system="true"/>
|
||||
<pathentry kind="src" path="src"/>
|
||||
<pathentry kind="out" path=""/>
|
||||
<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
|
||||
<pathentry kind="lib" path="" library="/home/arnaud/workspace/eo/src/libeo.a"/>
|
||||
</item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</cdtproject>
|
||||
86
branches/paradiseo-moeo-1.0/.project
Normal file
86
branches/paradiseo-moeo-1.0/.project
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>paradiseo-moeo</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.make.core.makeBuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.command</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.auto</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.location</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.inc</key>
|
||||
<value>all</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.arguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.core.errorOutputParser</key>
|
||||
<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.environment</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.build.target.clean</key>
|
||||
<value>clean</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.make.core.makeNature</nature>
|
||||
<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#Fri Nov 24 13:29:51 GMT+01:00 2006
|
||||
eclipse.preferences.version=1
|
||||
indexerId=org.eclipse.cdt.core.fastIndexer
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#Fri Nov 24 13:33:38 GMT+01:00 2006
|
||||
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
|
||||
eclipse.preferences.version=1
|
||||
4
branches/paradiseo-moeo-1.0/AUTHORS
Normal file
4
branches/paradiseo-moeo-1.0/AUTHORS
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Arnaud Liefooghe
|
||||
Thomas Legrand
|
||||
Sébastien Cahon
|
||||
Abdelhakim Deneche
|
||||
0
branches/paradiseo-moeo-1.0/ChangeLog
Normal file
0
branches/paradiseo-moeo-1.0/ChangeLog
Normal file
16
branches/paradiseo-moeo-1.0/Makefile.am
Normal file
16
branches/paradiseo-moeo-1.0/Makefile.am
Normal file
|
|
@ -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)
|
||||
7
branches/paradiseo-moeo-1.0/NEWS
Normal file
7
branches/paradiseo-moeo-1.0/NEWS
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
* release 0.1
|
||||
|
||||
# Local Variables:
|
||||
# coding: iso-8859-1
|
||||
# mode: text
|
||||
# fill-column: 80
|
||||
# End:
|
||||
64
branches/paradiseo-moeo-1.0/README
Normal file
64
branches/paradiseo-moeo-1.0/README
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
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 were 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-MOEO 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.
|
||||
|
|
||||
|-- lesson2 Implement NSGA-II for the SCH1 problem.
|
||||
|
||||
===================================================================
|
||||
NOTES
|
||||
===================================================================
|
||||
|
||||
Mailing list : paradiseo-help@lists.gforge.inria.fr
|
||||
148
branches/paradiseo-moeo-1.0/autogen.sh
Normal file
148
branches/paradiseo-moeo-1.0/autogen.sh
Normal file
|
|
@ -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
|
||||
43
branches/paradiseo-moeo-1.0/configure.in
Normal file
43
branches/paradiseo-moeo-1.0/configure.in
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
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
|
||||
tutorials/lesson2/Makefile
|
||||
])
|
||||
5
branches/paradiseo-moeo-1.0/docs/Makefile.am
Normal file
5
branches/paradiseo-moeo-1.0/docs/Makefile.am
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
doc:
|
||||
-@doxygen moeo.doxyfile
|
||||
|
||||
clean-local:
|
||||
rm -rf html latex man
|
||||
53
branches/paradiseo-moeo-1.0/docs/index.h
Normal file
53
branches/paradiseo-moeo-1.0/docs/index.h
Normal file
|
|
@ -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 <a
|
||||
href="../../README">README</a> 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 <a href="http://paradiseo.gforge.inria.fr">ParadisEO website</a>.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** @page webpages Related webpages
|
||||
|
||||
- ParadisEO <a href="http://paradiseo.gforge.inria.fr">homepage</a>
|
||||
- INRIA GForge <a href="http://gforge.inria.fr/projects/paradiseo/">project page</a>
|
||||
- <a href="../../README">README</a>
|
||||
- <a href="../../NEWS">NEWS</a>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// coding: iso-8859-1
|
||||
// mode: C++
|
||||
// c-file-style: "Stroustrup"
|
||||
// fill-column: 80
|
||||
// End:
|
||||
237
branches/paradiseo-moeo-1.0/docs/moeo.doxyfile
Normal file
237
branches/paradiseo-moeo-1.0/docs/moeo.doxyfile
Normal file
|
|
@ -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 = ../../paradiseo-eo/doc/eo.doxytag=../../paradiseo-eo/doc/doc/html
|
||||
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
|
||||
280
branches/paradiseo-moeo-1.0/src/MOEO.h
Normal file
280
branches/paradiseo-moeo-1.0/src/MOEO.h
Normal file
|
|
@ -0,0 +1,280 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// MOEO.h
|
||||
// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
|
||||
/*
|
||||
This library...
|
||||
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MOEO_H_
|
||||
#define MOEO_H_
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <EO.h>
|
||||
|
||||
/**
|
||||
* Base class allowing to represent a solution (an individual) for multi-objective optimization.
|
||||
* The template argument MOEOObjectiveVector allows to represent the solution in the objective space (it can be a moeoObjectiveVector object).
|
||||
* The template argument MOEOFitness is an object reflecting the quality of the solution in term of convergence (the fitness of a solution is always to be maximized).
|
||||
* The template argument MOEODiversity is an object reflecting the quality of the solution in term of diversity (the diversity of a solution is always to be maximized).
|
||||
* All template arguments must have a void and a copy constructor.
|
||||
* Besides, note that, contrary to the mono-objective case (and to EO) where the fitness value of a solution is confused with its objective value,
|
||||
* the fitness value differs of the objectives values in the multi-objective case.
|
||||
*
|
||||
* !!!!!!!!!!!!!!!!! !!!!!
|
||||
* operator '<' et '>' ???
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
template < class MOEOObjectiveVector, class MOEOFitness, class MOEODiversity >
|
||||
class MOEO : public EO < MOEOFitness >
|
||||
{
|
||||
public:
|
||||
|
||||
/** the objective vector type of a solution */
|
||||
typedef MOEOObjectiveVector ObjectiveVector;
|
||||
|
||||
/** the fitness type of a solution */
|
||||
typedef MOEOFitness Fitness;
|
||||
|
||||
/** the diversity type of a solution */
|
||||
typedef MOEODiversity Diversity;
|
||||
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
*/
|
||||
MOEO()
|
||||
{
|
||||
// default values for every parameters
|
||||
objectiveVectorValue = ObjectiveVector();
|
||||
fitnessValue = Fitness();
|
||||
diversityValue = Diversity();
|
||||
// invalidate all
|
||||
invalidate();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Virtual dtor
|
||||
*/
|
||||
virtual ~MOEO() {};
|
||||
|
||||
|
||||
/**
|
||||
* Returns the objective vector of the current solution
|
||||
*/
|
||||
ObjectiveVector objectiveVector() const
|
||||
{
|
||||
if ( invalidObjectiveVector() )
|
||||
{
|
||||
throw std::runtime_error("invalid objective vector");
|
||||
}
|
||||
return objectiveVectorValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the objective vector of the current solution
|
||||
* @param _objectiveVectorValue the new objective vector
|
||||
*/
|
||||
void objectiveVector(const ObjectiveVector & _objectiveVectorValue)
|
||||
{
|
||||
objectiveVectorValue = _objectiveVectorValue;
|
||||
invalidObjectiveVectorValue = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the objective vector as invalid
|
||||
*/
|
||||
void invalidateObjectiveVector()
|
||||
{
|
||||
invalidObjectiveVectorValue = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the objective vector is invalid, false otherwise
|
||||
*/
|
||||
bool invalidObjectiveVector() const
|
||||
{
|
||||
return invalidObjectiveVectorValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the fitness value of the current solution
|
||||
*/
|
||||
Fitness fitness() const
|
||||
{
|
||||
if ( invalidFitness() )
|
||||
{
|
||||
throw std::runtime_error("invalid fitness");
|
||||
}
|
||||
return fitnessValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the fitness value of the current solution
|
||||
* @param _fitnessValue the new fitness value
|
||||
*/
|
||||
void fitness(const Fitness & _fitnessValue)
|
||||
{
|
||||
fitnessValue = _fitnessValue;
|
||||
invalidFitnessValue = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the fitness value as invalid
|
||||
*/
|
||||
void invalidateFitness()
|
||||
{
|
||||
invalidFitnessValue = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the fitness value is invalid, false otherwise
|
||||
*/
|
||||
bool invalidFitness() const
|
||||
{
|
||||
return invalidFitnessValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the diversity value of the current solution
|
||||
*/
|
||||
Diversity diversity() const
|
||||
{
|
||||
if ( invalidDiversity() )
|
||||
{
|
||||
throw std::runtime_error("invalid diversity");
|
||||
}
|
||||
return diversityValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the diversity value of the current solution
|
||||
* @param _diversityValue the new diversity value
|
||||
*/
|
||||
void diversity(const Diversity & _diversityValue)
|
||||
{
|
||||
diversityValue = _diversityValue;
|
||||
invalidDiversityValue = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the diversity value as invalid
|
||||
*/
|
||||
void invalidateDiversity()
|
||||
{
|
||||
invalidDiversityValue = true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the diversity value is invalid, false otherwise
|
||||
*/
|
||||
bool invalidDiversity() const
|
||||
{
|
||||
return invalidDiversityValue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the objective vector, the fitness value and the diversity value as invalid
|
||||
*/
|
||||
void invalidate()
|
||||
{
|
||||
invalidateObjectiveVector();
|
||||
invalidateFitness();
|
||||
invalidateDiversity();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the fitness value is invalid, false otherwise
|
||||
*/
|
||||
bool invalid() const
|
||||
{
|
||||
return invalidObjectiveVector();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the class id (the class name as a std::string)
|
||||
*/
|
||||
virtual std::string className() const
|
||||
{
|
||||
return "MOEO";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Writing object
|
||||
* @param _os output stream
|
||||
*/
|
||||
virtual void printOn(std::ostream & _os) const
|
||||
{
|
||||
if ( invalidObjectiveVector() )
|
||||
{
|
||||
_os << "INVALID\t";
|
||||
}
|
||||
else
|
||||
{
|
||||
_os << objectiveVectorValue << '\t';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reading object
|
||||
* @param _is input stream
|
||||
*/
|
||||
virtual void readFrom(std::istream & _is)
|
||||
{
|
||||
std::string objectiveVector_str;
|
||||
int pos = _is.tellg();
|
||||
_is >> objectiveVector_str;
|
||||
if (objectiveVector_str == "INVALID")
|
||||
{
|
||||
invalidateObjectiveVector();
|
||||
}
|
||||
else
|
||||
{
|
||||
invalidObjectiveVectorValue = false;
|
||||
_is.seekg(pos); // rewind
|
||||
_is >> objectiveVectorValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/** the objective vector of this solution */
|
||||
ObjectiveVector objectiveVectorValue;
|
||||
/** true if the objective vector is invalid */
|
||||
bool invalidObjectiveVectorValue;
|
||||
/** the fitness value of this solution */
|
||||
Fitness fitnessValue;
|
||||
/** true if the fitness value is invalid */
|
||||
bool invalidFitnessValue;
|
||||
/** the diversity value of this solution */
|
||||
Diversity diversityValue;
|
||||
/** true if the diversity value is invalid */
|
||||
bool invalidDiversityValue;
|
||||
|
||||
};
|
||||
|
||||
#endif /*MOEO_H_*/
|
||||
1
branches/paradiseo-moeo-1.0/src/Makefile.am
Normal file
1
branches/paradiseo-moeo-1.0/src/Makefile.am
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Nothing to compile !
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// moeoAdditiveEpsilonBinaryMetric.h
|
||||
// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007
|
||||
/*
|
||||
This library...
|
||||
|
||||
Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef MOEOADDITIVEEPSILONBINARYMETRIC_H_
|
||||
#define MOEOADDITIVEEPSILONBINARYMETRIC_H_
|
||||
|
||||
#include <metric/moeoMetric.h>
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
template < class MOEOT >
|
||||
class moeoAdditiveEpsilonBinaryMetric : public moeoSolutionVsSolutionBinaryMetric < MOEOT, double >
|
||||
{
|
||||
public:
|
||||
|
||||
/** the objective vector type of a solution */
|
||||
typedef typename MOEOT::ObjectiveVector ObjectiveVector;
|
||||
|
||||
moeoAdditiveEpsilonBinaryMetric();
|
||||
|
||||
|
||||
double operator()(const std::vector < ObjectiveVector > & _set1, const std::vector < ObjectiveVector > & _set2)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif /*MOEOADDITIVEEPSILONBINARYMETRIC_H_*/
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
// -*- 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 <fstream>
|
||||
#include <string>
|
||||
#include <eoPop.h>
|
||||
#include <utils/eoUpdater.h>
|
||||
#include <metric/moeoMetric.h>
|
||||
|
||||
/**
|
||||
* 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::ObjectiveVector ObjectiveVector;
|
||||
|
||||
/**
|
||||
* Ctor
|
||||
* @param _metric the binary metric comparing two Pareto sets
|
||||
* @param _pop the main population
|
||||
* @param _filename the target filename
|
||||
*/
|
||||
moeoBinaryMetricSavingUpdater (moeoPopVsPopBinaryMetric<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<ObjectiveVector> from;
|
||||
std::vector<ObjectiveVector> to;
|
||||
for (unsigned i=0; i<pop.size(); i++)
|
||||
from.push_back(pop[i].objectiveVector());
|
||||
for (unsigned i=0 ; i<oldPop.size(); i++)
|
||||
to.push_back(oldPop[i].objectiveVector());
|
||||
*/
|
||||
// writing the result into the file
|
||||
std::ofstream f (filename.c_str(), std::ios::app);
|
||||
f << counter++ << ' ' << metric(pop,oldPop) << std::endl;
|
||||
f.close();
|
||||
}
|
||||
oldPop = pop;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
/** binary metric comparing two Pareto sets */
|
||||
moeoPopVsPopBinaryMetric<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_*/
|
||||
111
branches/paradiseo-moeo-1.0/src/metric/moeoContributionMetric.h
Normal file
111
branches/paradiseo-moeo-1.0/src/metric/moeoContributionMetric.h
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
// -*- 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 <metric/moeoMetric.h>
|
||||
|
||||
/**
|
||||
* 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 MOEOT >
|
||||
class moeoContributionMetric : public moeoPopVsPopBinaryMetric < MOEOT, double >
|
||||
{
|
||||
public:
|
||||
|
||||
/** the objective vector type of a solution */
|
||||
typedef typename MOEOT::ObjectiveVector ObjectiveVector;
|
||||
|
||||
|
||||
/**
|
||||
* 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 eoPop < MOEOT > & _pop1, const eoPop < MOEOT > & _pop2) {
|
||||
/************/
|
||||
std::vector<ObjectiveVector> set1;
|
||||
std::vector<ObjectiveVector> set2;
|
||||
for (unsigned i=0; i<_pop1.size(); i++)
|
||||
set1.push_back(_pop1[i].objectiveVector());
|
||||
for (unsigned i=0 ; i<_pop2.size(); i++)
|
||||
set2.push_back(_pop2[i].objectiveVector());
|
||||
/****************/
|
||||
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 < ObjectiveVector > & _set1, const std::vector < ObjectiveVector > & _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 < ObjectiveVector > & _set1, const std::vector < ObjectiveVector > & _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 < ObjectiveVector > & _set1, const std::vector < ObjectiveVector > & _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_*/
|
||||
149
branches/paradiseo-moeo-1.0/src/metric/moeoEntropyMetric.h
Normal file
149
branches/paradiseo-moeo-1.0/src/metric/moeoEntropyMetric.h
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
// -*- 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 <metric/moeoMetric.h>
|
||||
|
||||
/**
|
||||
* 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 MOEOT >
|
||||
class moeoEntropyMetric : public moeoVectorVsVectorBinaryMetric < MOEOT, double >
|
||||
{
|
||||
public:
|
||||
|
||||
/** the objective vector type of a solution */
|
||||
typedef typename MOEOT::ObjectiveVector ObjectiveVector;
|
||||
|
||||
/**
|
||||
* 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 < ObjectiveVector > & _set1, const std::vector < ObjectiveVector > & _set2) {
|
||||
// normalization
|
||||
std::vector< ObjectiveVector > set1 = _set1;
|
||||
std::vector< ObjectiveVector > set2= _set2;
|
||||
removeDominated (set1);
|
||||
removeDominated (set2);
|
||||
prenormalize (set1);
|
||||
normalize (set1);
|
||||
normalize (set2);
|
||||
|
||||
// making of PO*
|
||||
std::vector< ObjectiveVector > star; // rotf :-)
|
||||
computeUnion (set1, set2, star);
|
||||
removeDominated (star);
|
||||
|
||||
// making of PO1 U PO*
|
||||
std::vector< ObjectiveVector > 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< ObjectiveVector > & _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< ObjectiveVector > & _f) {
|
||||
vect_min_val.clear();
|
||||
vect_max_val.clear();
|
||||
|
||||
for (unsigned char i=0 ; i<ObjectiveVector::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< ObjectiveVector > & _f) {
|
||||
for (unsigned i=0 ; i<ObjectiveVector::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< ObjectiveVector > & _f1, const std::vector< ObjectiveVector > & _f2, std::vector< ObjectiveVector > & _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< ObjectiveVector > & _f, const ObjectiveVector & _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 ObjectiveVector & _set1, const ObjectiveVector & _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_*/
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue