MOEO 1.1 tagged
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1112 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
71d392d030
commit
3214c45067
298 changed files with 30236 additions and 0 deletions
4
tags/paradiseo-ix86-1.1/paradiseo-moeo/AUTHORS
Normal file
4
tags/paradiseo-ix86-1.1/paradiseo-moeo/AUTHORS
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Sébastien Cahon
|
||||
Arnaud Liefooghe
|
||||
Thomas Legrand
|
||||
Abdelhakim Deneche
|
||||
40
tags/paradiseo-ix86-1.1/paradiseo-moeo/CMakeLists.txt
Normal file
40
tags/paradiseo-ix86-1.1/paradiseo-moeo/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
##########################################################################################################################################
|
||||
### 0) If you want to set your own variables in moeo-conf.cmake and avoid the cmd line
|
||||
##########################################################################################################################################
|
||||
|
||||
INCLUDE(moeo-conf.cmake OPTIONAL)
|
||||
|
||||
##########################################################################################################################################
|
||||
|
||||
|
||||
##########################################################################################################################################
|
||||
### 1) Project properties
|
||||
##########################################################################################################################################
|
||||
|
||||
# set the project name
|
||||
PROJECT(ParadisEO-MOEO)
|
||||
|
||||
SET(PACKAGE_BUGREPORT "paradiseo-help@lists.gforge.inria.fr" CACHE STRING "Package bug report" FORCE)
|
||||
SET(PACKAGE_NAME "ParadisEO-MOEO - Multi Objective Evolving Objects" CACHE STRING "Package name" FORCE)
|
||||
SET(PACKAGE_STRING "ParadisEO-MOEO 1.1" CACHE STRING "MOEO Package string full name" FORCE)
|
||||
SET(PACKAGE_VERSION "1.1" CACHE STRING "Package version" FORCE)
|
||||
SET(GLOBAL_VERSION "1.1" CACHE STRING "Global version" FORCE)
|
||||
SET(VERSION "1.1" CACHE STRING "Version" FORCE)
|
||||
##########################################################################################################################################
|
||||
|
||||
|
||||
##########################################################################################################################################
|
||||
### 2) Include the common CMake configuration
|
||||
##########################################################################################################################################
|
||||
|
||||
# The "config" variable must be provided on the command line
|
||||
IF(NOT DEFINED config OR NOT config)
|
||||
MESSAGE(FATAL_ERROR "The \"config\" variable must be set on the command line to
|
||||
give the path of the install configuration file. ")
|
||||
ENDIF(NOT DEFINED config OR NOT config)
|
||||
|
||||
# Need the config file whose full path is given thanks to the "config" variable
|
||||
INCLUDE(${config})
|
||||
##########################################################################################################################################
|
||||
|
||||
10
tags/paradiseo-ix86-1.1/paradiseo-moeo/DartConfig.cmake
Normal file
10
tags/paradiseo-ix86-1.1/paradiseo-moeo/DartConfig.cmake
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
#############################################################################
|
||||
# Dart config for report submission
|
||||
#############################################################################
|
||||
|
||||
SET (DROP_METHOD "xmlrpc")
|
||||
SET (DROP_SITE "http://dart-test.irisa.fr")
|
||||
SET (DROP_LOCATION "ParadisEO")
|
||||
SET (NIGHTLY_START_TIME "23:00:00 WEST")
|
||||
#############################################################################
|
||||
82
tags/paradiseo-ix86-1.1/paradiseo-moeo/README
Normal file
82
tags/paradiseo-ix86-1.1/paradiseo-moeo/README
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
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.
|
||||
|
||||
To compile paradiseo-moeo in the default directory,
|
||||
go to paradiseo-moeo/build/ and run:
|
||||
> cmake ../ -Dconfig=<path to the install.cmake file>
|
||||
> make
|
||||
// for an easy-use of the provided lessons
|
||||
> make install
|
||||
// optional (if the documentation is not already available)
|
||||
> make doc
|
||||
|
||||
To compile paradiseo-moeo anywhere else, simply run:
|
||||
> cmake $(MOEO) -Dconfig=<path to the install.cmake file>
|
||||
> make
|
||||
// for an easy-use of the provided lessons
|
||||
> make install
|
||||
// optional (if the documentation is not already available)
|
||||
> make doc
|
||||
|
||||
where $(MOEO) is the top-level directory of PARADISEO-MOEO.
|
||||
|
||||
To clean everything, simply run
|
||||
> make clean
|
||||
|
||||
=======================================================================
|
||||
DIRECTORY STRUCTURE
|
||||
=======================================================================
|
||||
After unpacking the archive file, you should end up with the following
|
||||
structure:
|
||||
|
||||
.../ The main PARADISEO-MOEO directory, created when unpacking.
|
||||
|
|
||||
|
|
||||
+-- build BUILD directory that contains libraries and executable files.
|
||||
|
|
||||
|
|
||||
+-- src SOURCE directory that contains PARADISEO-MOEO source files.
|
||||
|
|
||||
|
|
||||
+-- doc 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.
|
||||
|
|
||||
|
|
||||
+-- tutorial TUTORIAL directory that contains with lessons.
|
||||
|
|
||||
+-- examples APPLICATIONS - one directory per separate application.
|
||||
| |
|
||||
| +-- flowshop Flow-shop scheduling problem example source files.
|
||||
| |
|
||||
| +-- benchs Benchmark suites for the flow-shop.
|
||||
|
|
||||
+-- Lesson1 NSGA-II to solve the SCH1 problem.
|
||||
|
|
||||
+-- Lesson2 A bi-objective flow-shop scheduling problem solved using main MOEAs.
|
||||
|
|
||||
+-- Lesson3 A bi-objective flow-shop scheduling problem solved using main MOEAs thanks to a parameter file.
|
||||
|
||||
=======================================================================
|
||||
NOTES
|
||||
=======================================================================
|
||||
|
||||
Mailing list : paradiseo-help@lists.gforge.inria.fr
|
||||
26
tags/paradiseo-ix86-1.1/paradiseo-moeo/doc/CMakeLists.txt
Normal file
26
tags/paradiseo-ix86-1.1/paradiseo-moeo/doc/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
##########################################################################################
|
||||
### MOEO Doc generation using Doxygen
|
||||
##########################################################################################
|
||||
|
||||
IF (DOXYGEN_FOUND)
|
||||
|
||||
SET(DOC_DIR ${CMAKE_BINARY_DIR}/doc CACHE PATH "MOEO documentation directory")
|
||||
SET(MOEO_DOC_CONFIG_FILE "moeo.doxyfile" CACHE PATH "MOEO documentation configuration file")
|
||||
# define the doc target
|
||||
IF (DOXYGEN_EXECUTABLE)
|
||||
ADD_CUSTOM_TARGET(doc
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${MOEO_DOC_CONFIG_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
ENDIF (DOXYGEN_EXECUTABLE)
|
||||
|
||||
# configure doxyfile file
|
||||
CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/doc/${MOEO_DOC_CONFIG_FILE}.cmake"
|
||||
"${CMAKE_BINARY_DIR}/doc/${MOEO_DOC_CONFIG_FILE}")
|
||||
|
||||
ELSE (DOXYGEN_FOUND)
|
||||
MESSAGE(STATUS "Unable to generate the documentation, Doxygen package not found")
|
||||
ENDIF (DOXYGEN_FOUND)
|
||||
|
||||
##########################################################################################
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopBenchmarkParser.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopBenchmarkParser.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopBenchmarkParser.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <stdexcept></span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor">#include <FlowShopBenchmarkParser.h></span>
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopBenchmarkParser.html#2787b88a1be9d4d37438c557bf32f137">00016</a> <a class="code" href="classFlowShopBenchmarkParser.html#2787b88a1be9d4d37438c557bf32f137">FlowShopBenchmarkParser::FlowShopBenchmarkParser</a>(<span class="keyword">const</span> std::string _benchmarkFileName)
|
||||
<a name="l00017"></a>00017 {
|
||||
<a name="l00018"></a>00018 <a class="code" href="classFlowShopBenchmarkParser.html#4e6de6a0ec2859e1a2fb758fb06dc915">init</a>(_benchmarkFileName);
|
||||
<a name="l00019"></a>00019 }
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopBenchmarkParser.html#8d5042c2f8727e235f94c947b2ba00a5">00022</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#8d5042c2f8727e235f94c947b2ba00a5">FlowShopBenchmarkParser::getM</a>()
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keywordflow">return</span> <a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a>;
|
||||
<a name="l00025"></a>00025 }
|
||||
<a name="l00026"></a>00026
|
||||
<a name="l00027"></a>00027
|
||||
<a name="l00028"></a><a class="code" href="classFlowShopBenchmarkParser.html#fe16df4df5104aee3d792e60bb32a66d">00028</a> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#fe16df4df5104aee3d792e60bb32a66d">FlowShopBenchmarkParser::getN</a>()
|
||||
<a name="l00029"></a>00029 {
|
||||
<a name="l00030"></a>00030 <span class="keywordflow">return</span> <a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>;
|
||||
<a name="l00031"></a>00031 }
|
||||
<a name="l00032"></a>00032
|
||||
<a name="l00033"></a>00033
|
||||
<a name="l00034"></a><a class="code" href="classFlowShopBenchmarkParser.html#2df87bf8a18a55266729ab105955d7bf">00034</a> <span class="keyword">const</span> std::vector< std::vector<unsigned int> > <a class="code" href="classFlowShopBenchmarkParser.html#2df87bf8a18a55266729ab105955d7bf">FlowShopBenchmarkParser::getP</a>()
|
||||
<a name="l00035"></a>00035 {
|
||||
<a name="l00036"></a>00036 <span class="keywordflow">return</span> <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>;
|
||||
<a name="l00037"></a>00037 }
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a><a class="code" href="classFlowShopBenchmarkParser.html#b362d0042273be436c55637828d8582d">00040</a> <span class="keyword">const</span> std::vector<unsigned int> <a class="code" href="classFlowShopBenchmarkParser.html#b362d0042273be436c55637828d8582d">FlowShopBenchmarkParser::getD</a>()
|
||||
<a name="l00041"></a>00041 {
|
||||
<a name="l00042"></a>00042 <span class="keywordflow">return</span> <a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">d</a>;
|
||||
<a name="l00043"></a>00043 }
|
||||
<a name="l00044"></a>00044
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00046"></a><a class="code" href="classFlowShopBenchmarkParser.html#69c9ba47e774da4b06424a724573265d">00046</a> <span class="keywordtype">void</span> <a class="code" href="classFlowShopBenchmarkParser.html#69c9ba47e774da4b06424a724573265d">FlowShopBenchmarkParser::printOn</a>(std::ostream & _os)<span class="keyword"> const</span>
|
||||
<a name="l00047"></a>00047 <span class="keyword"></span>{
|
||||
<a name="l00048"></a>00048 _os << <span class="stringliteral">"M="</span> << <a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a> << <span class="stringliteral">" N="</span> << <a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a> << std::endl;
|
||||
<a name="l00049"></a>00049 _os << <span class="stringliteral">"*** processing times"</span> << std::endl;
|
||||
<a name="l00050"></a>00050 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i<<a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a>; i++) {
|
||||
<a name="l00051"></a>00051 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0; j<<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>; j++) {
|
||||
<a name="l00052"></a>00052 _os << <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>[i][j] << <span class="stringliteral">" "</span>;
|
||||
<a name="l00053"></a>00053 }
|
||||
<a name="l00054"></a>00054 _os << std::endl;
|
||||
<a name="l00055"></a>00055 }
|
||||
<a name="l00056"></a>00056 _os << <span class="stringliteral">"*** due-dates"</span> << std::endl;
|
||||
<a name="l00057"></a>00057 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0; j<<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>; j++) {
|
||||
<a name="l00058"></a>00058 _os << <a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">d</a>[j] << <span class="stringliteral">" "</span>;
|
||||
<a name="l00059"></a>00059 }
|
||||
<a name="l00060"></a>00060 _os << std::endl << std::endl;
|
||||
<a name="l00061"></a>00061 }
|
||||
<a name="l00062"></a>00062
|
||||
<a name="l00063"></a>00063
|
||||
<a name="l00064"></a><a class="code" href="classFlowShopBenchmarkParser.html#4e6de6a0ec2859e1a2fb758fb06dc915">00064</a> <span class="keywordtype">void</span> <a class="code" href="classFlowShopBenchmarkParser.html#4e6de6a0ec2859e1a2fb758fb06dc915">FlowShopBenchmarkParser::init</a>(<span class="keyword">const</span> std::string _benchmarkFileName)
|
||||
<a name="l00065"></a>00065 {
|
||||
<a name="l00066"></a>00066 std::string buffer;
|
||||
<a name="l00067"></a>00067 std::string::size_type start, end;
|
||||
<a name="l00068"></a>00068 std::ifstream inputFile(_benchmarkFileName.data(), std::ios::in);
|
||||
<a name="l00069"></a>00069 <span class="comment">// opening of the benchmark file</span>
|
||||
<a name="l00070"></a>00070 <span class="keywordflow">if</span> (! inputFile)
|
||||
<a name="l00071"></a>00071 <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"*** ERROR : Unable to open the benchmark file"</span>);
|
||||
<a name="l00072"></a>00072 <span class="comment">// number of jobs (N)</span>
|
||||
<a name="l00073"></a>00073 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00074"></a>00074 <a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a> = atoi(buffer.data());
|
||||
<a name="l00075"></a>00075 <span class="comment">// number of machines M</span>
|
||||
<a name="l00076"></a>00076 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00077"></a>00077 <a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a> = atoi(buffer.data());
|
||||
<a name="l00078"></a>00078 <span class="comment">// initial and current seeds (not used)</span>
|
||||
<a name="l00079"></a>00079 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00080"></a>00080 <span class="comment">// processing times and due-dates</span>
|
||||
<a name="l00081"></a>00081 <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a> = std::vector< std::vector<unsigned int> > (<a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a>,<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>);
|
||||
<a name="l00082"></a>00082 <a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">d</a> = std::vector<unsigned int> (<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>);
|
||||
<a name="l00083"></a>00083 <span class="comment">// for each job...</span>
|
||||
<a name="l00084"></a>00084 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0 ; j<<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a> ; j++) {
|
||||
<a name="l00085"></a>00085 <span class="comment">// index of the job (<=> j)</span>
|
||||
<a name="l00086"></a>00086 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00087"></a>00087 <span class="comment">// due-date of the job j</span>
|
||||
<a name="l00088"></a>00088 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00089"></a>00089 d[j] = atoi(buffer.data());
|
||||
<a name="l00090"></a>00090 <span class="comment">// processing times of the job j on each machine</span>
|
||||
<a name="l00091"></a>00091 getline(inputFile, buffer, <span class="charliteral">'\n'</span>);
|
||||
<a name="l00092"></a>00092 start = buffer.find_first_not_of(<span class="stringliteral">" "</span>);
|
||||
<a name="l00093"></a>00093 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0 ; i<M ; i++) {
|
||||
<a name="l00094"></a>00094 end = buffer.find_first_of(<span class="stringliteral">" "</span>, start);
|
||||
<a name="l00095"></a>00095 <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>[i][j] = atoi(buffer.substr(start, end-start).data());
|
||||
<a name="l00096"></a>00096 start = buffer.find_first_not_of(<span class="stringliteral">" "</span>, end);
|
||||
<a name="l00097"></a>00097 }
|
||||
<a name="l00098"></a>00098 }
|
||||
<a name="l00099"></a>00099 <span class="comment">// closing of the input file</span>
|
||||
<a name="l00100"></a>00100 inputFile.close();
|
||||
<a name="l00101"></a>00101 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopBenchmarkParser.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopBenchmarkParser.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopBenchmarkParser.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPBENCHMARKPARSER_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPBENCHMARKPARSER_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <fstream></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <string></span>
|
||||
<a name="l00018"></a>00018 <span class="preprocessor">#include <vector></span>
|
||||
<a name="l00019"></a>00019
|
||||
<a name="l00023"></a><a class="code" href="classFlowShopBenchmarkParser.html">00023</a> <span class="keyword">class </span><a class="code" href="classFlowShopBenchmarkParser.html">FlowShopBenchmarkParser</a>
|
||||
<a name="l00024"></a>00024 {
|
||||
<a name="l00025"></a>00025 <span class="keyword">public</span>:
|
||||
<a name="l00026"></a>00026
|
||||
<a name="l00031"></a>00031 <a class="code" href="classFlowShopBenchmarkParser.html#2787b88a1be9d4d37438c557bf32f137">FlowShopBenchmarkParser</a>(<span class="keyword">const</span> std::string _benchmarkFileName);
|
||||
<a name="l00032"></a>00032
|
||||
<a name="l00033"></a>00033
|
||||
<a name="l00037"></a>00037 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#8d5042c2f8727e235f94c947b2ba00a5">getM</a>();
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00043"></a>00043 <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#fe16df4df5104aee3d792e60bb32a66d">getN</a>();
|
||||
<a name="l00044"></a>00044
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00049"></a>00049 <span class="keyword">const</span> std::vector < std::vector < unsigned int > > <a class="code" href="classFlowShopBenchmarkParser.html#2df87bf8a18a55266729ab105955d7bf">getP</a>();
|
||||
<a name="l00050"></a>00050
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00055"></a>00055 <span class="keyword">const</span> std::vector < unsigned int > <a class="code" href="classFlowShopBenchmarkParser.html#b362d0042273be436c55637828d8582d">getD</a>();
|
||||
<a name="l00056"></a>00056
|
||||
<a name="l00057"></a>00057
|
||||
<a name="l00061"></a>00061 <span class="keywordtype">void</span> <a class="code" href="classFlowShopBenchmarkParser.html#69c9ba47e774da4b06424a724573265d">printOn</a>(std::ostream & _os) <span class="keyword">const</span>;
|
||||
<a name="l00062"></a>00062
|
||||
<a name="l00063"></a>00063
|
||||
<a name="l00064"></a>00064 <span class="keyword">private</span>:
|
||||
<a name="l00065"></a>00065
|
||||
<a name="l00067"></a><a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">00067</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a>;
|
||||
<a name="l00069"></a><a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">00069</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>;
|
||||
<a name="l00071"></a><a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">00071</a> std::vector < std::vector < unsigned int > > <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>;
|
||||
<a name="l00073"></a><a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">00073</a> std::vector < unsigned int > <a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">d</a>;
|
||||
<a name="l00074"></a>00074
|
||||
<a name="l00075"></a>00075
|
||||
<a name="l00080"></a>00080 <span class="keywordtype">void</span> <a class="code" href="classFlowShopBenchmarkParser.html#4e6de6a0ec2859e1a2fb758fb06dc915">init</a>(<span class="keyword">const</span> std::string _benchmarkFileName);
|
||||
<a name="l00081"></a>00081
|
||||
<a name="l00082"></a>00082 };
|
||||
<a name="l00083"></a>00083
|
||||
<a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPBENCHMARKPARSER_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopEA.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopEA.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopEA.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013
|
||||
<a name="l00014"></a>00014 <span class="comment">// moeo general include</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor">#include <moeo></span>
|
||||
<a name="l00016"></a>00016 <span class="comment">// for the creation of an evaluator</span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <make_eval_FlowShop.h></span>
|
||||
<a name="l00018"></a>00018 <span class="comment">// for the creation of an initializer</span>
|
||||
<a name="l00019"></a>00019 <span class="preprocessor">#include <make_genotype_FlowShop.h></span>
|
||||
<a name="l00020"></a>00020 <span class="comment">// for the creation of the variation operators</span>
|
||||
<a name="l00021"></a>00021 <span class="preprocessor">#include <make_op_FlowShop.h></span>
|
||||
<a name="l00022"></a>00022 <span class="comment">// how to initialize the population</span>
|
||||
<a name="l00023"></a>00023 <span class="preprocessor">#include <do/make_pop.h></span>
|
||||
<a name="l00024"></a>00024 <span class="comment">// the stopping criterion</span>
|
||||
<a name="l00025"></a>00025 <span class="preprocessor">#include <do/make_continue_moeo.h></span>
|
||||
<a name="l00026"></a>00026 <span class="comment">// outputs (stats, population dumps, ...)</span>
|
||||
<a name="l00027"></a>00027 <span class="preprocessor">#include <do/make_checkpoint_moeo.h></span>
|
||||
<a name="l00028"></a>00028 <span class="comment">// evolution engine (selection and replacement)</span>
|
||||
<a name="l00029"></a>00029 <span class="preprocessor">#include <do/make_ea_moeo.h></span>
|
||||
<a name="l00030"></a>00030 <span class="comment">// simple call to the algo</span>
|
||||
<a name="l00031"></a>00031 <span class="preprocessor">#include <do/make_run.h></span>
|
||||
<a name="l00032"></a>00032 <span class="comment">// checks for help demand, and writes the status file and make_help; in libutils</span>
|
||||
<a name="l00033"></a>00033 <span class="keywordtype">void</span> make_help(<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_parser.html">eoParser</a> & _parser);
|
||||
<a name="l00034"></a>00034 <span class="comment">// definition of the representation</span>
|
||||
<a name="l00035"></a>00035 <span class="preprocessor">#include <FlowShop.h></span>
|
||||
<a name="l00036"></a>00036
|
||||
<a name="l00037"></a>00037
|
||||
<a name="l00038"></a>00038 <span class="keyword">using namespace </span>std;
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a>00040
|
||||
<a name="l00041"></a>00041 <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[])
|
||||
<a name="l00042"></a>00042 {
|
||||
<a name="l00043"></a>00043 <span class="keywordflow">try</span>
|
||||
<a name="l00044"></a>00044 {
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00046"></a>00046 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_parser.html">eoParser</a> parser(argc, argv); <span class="comment">// for user-parameter reading</span>
|
||||
<a name="l00047"></a>00047 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_state.html">eoState</a> state; <span class="comment">// to keep all things allocated</span>
|
||||
<a name="l00048"></a>00048
|
||||
<a name="l00049"></a>00049
|
||||
<a name="l00050"></a>00050 <span class="comment">/*** the representation-dependent things ***/</span>
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00052"></a>00052 <span class="comment">// The fitness evaluation</span>
|
||||
<a name="l00053"></a>00053 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_eval_func_counter.html">eoEvalFuncCounter<FlowShop></a>& eval = do_make_eval(parser, state);
|
||||
<a name="l00054"></a>00054 <span class="comment">// the genotype (through a genotype initializer)</span>
|
||||
<a name="l00055"></a>00055 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_init.html">eoInit<FlowShop></a>& init = do_make_genotype(parser, state);
|
||||
<a name="l00056"></a>00056 <span class="comment">// the variation operators</span>
|
||||
<a name="l00057"></a>00057 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_gen_op.html">eoGenOp<FlowShop></a>& op = do_make_op(parser, state);
|
||||
<a name="l00058"></a>00058
|
||||
<a name="l00059"></a>00059
|
||||
<a name="l00060"></a>00060 <span class="comment">/*** the representation-independent things ***/</span>
|
||||
<a name="l00061"></a>00061
|
||||
<a name="l00062"></a>00062 <span class="comment">// initialization of the population</span>
|
||||
<a name="l00063"></a>00063 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html">eoPop<FlowShop></a>& pop = do_make_pop(parser, state, init);
|
||||
<a name="l00064"></a>00064 <span class="comment">// definition of the archive</span>
|
||||
<a name="l00065"></a>00065 <a class="code" href="classmoeoArchive.html">moeoArchive<FlowShop></a> arch;
|
||||
<a name="l00066"></a>00066 <span class="comment">// stopping criteria</span>
|
||||
<a name="l00067"></a>00067 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_continue.html">eoContinue<FlowShop></a>& term = do_make_continue_moeo(parser, state, eval);
|
||||
<a name="l00068"></a>00068 <span class="comment">// output</span>
|
||||
<a name="l00069"></a>00069 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_check_point.html">eoCheckPoint<FlowShop></a>& checkpoint = do_make_checkpoint_moeo(parser, state, eval, term, pop, arch);
|
||||
<a name="l00070"></a>00070 <span class="comment">// algorithm</span>
|
||||
<a name="l00071"></a>00071 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_algo.html">eoAlgo<FlowShop></a>& algo = do_make_ea_moeo(parser, state, eval, checkpoint, op, arch);
|
||||
<a name="l00072"></a>00072
|
||||
<a name="l00073"></a>00073
|
||||
<a name="l00074"></a>00074 <span class="comment">/*** Go ! ***/</span>
|
||||
<a name="l00075"></a>00075
|
||||
<a name="l00076"></a>00076 <span class="comment">// help ?</span>
|
||||
<a name="l00077"></a>00077 make_help(parser);
|
||||
<a name="l00078"></a>00078
|
||||
<a name="l00079"></a>00079 <span class="comment">// first evalution</span>
|
||||
<a name="l00080"></a>00080 apply<FlowShop>(eval, pop);
|
||||
<a name="l00081"></a>00081
|
||||
<a name="l00082"></a>00082 <span class="comment">// printing of the initial population</span>
|
||||
<a name="l00083"></a>00083 cout << <span class="stringliteral">"Initial Population\n"</span>;
|
||||
<a name="l00084"></a>00084 pop.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html#b6572898562eebe5bab105c4475a9a64">sortedPrintOn</a>(cout);
|
||||
<a name="l00085"></a>00085 cout << endl;
|
||||
<a name="l00086"></a>00086
|
||||
<a name="l00087"></a>00087 <span class="comment">// run the algo</span>
|
||||
<a name="l00088"></a>00088 do_run(algo, pop);
|
||||
<a name="l00089"></a>00089
|
||||
<a name="l00090"></a>00090 <span class="comment">// printing of the final population</span>
|
||||
<a name="l00091"></a>00091 cout << <span class="stringliteral">"Final Population\n"</span>;
|
||||
<a name="l00092"></a>00092 pop.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html#b6572898562eebe5bab105c4475a9a64">sortedPrintOn</a>(cout);
|
||||
<a name="l00093"></a>00093 cout << endl;
|
||||
<a name="l00094"></a>00094
|
||||
<a name="l00095"></a>00095 <span class="comment">// printing of the final archive</span>
|
||||
<a name="l00096"></a>00096 cout << <span class="stringliteral">"Final Archive\n"</span>;
|
||||
<a name="l00097"></a>00097 arch.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_pop.html#b6572898562eebe5bab105c4475a9a64">sortedPrintOn</a>(cout);
|
||||
<a name="l00098"></a>00098 cout << endl;
|
||||
<a name="l00099"></a>00099
|
||||
<a name="l00100"></a>00100
|
||||
<a name="l00101"></a>00101 }
|
||||
<a name="l00102"></a>00102 <span class="keywordflow">catch</span> (exception& e)
|
||||
<a name="l00103"></a>00103 {
|
||||
<a name="l00104"></a>00104 cout << e.what() << endl;
|
||||
<a name="l00105"></a>00105 }
|
||||
<a name="l00106"></a>00106 <span class="keywordflow">return</span> EXIT_SUCCESS;
|
||||
<a name="l00107"></a>00107 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopEval.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopEval.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopEval.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopEval.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopEval.html#f830293ad66a253a4008937fd6d68fce">00016</a> <a class="code" href="classFlowShopEval.html#f830293ad66a253a4008937fd6d68fce">FlowShopEval::FlowShopEval</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _M, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _N, <span class="keyword">const</span> std::vector< std::vector<unsigned int> > & _p, <span class="keyword">const</span> std::vector<unsigned int> & _d) :
|
||||
<a name="l00017"></a>00017 M(_M), N (_N), p(_p), d(_d)
|
||||
<a name="l00018"></a>00018 {}
|
||||
<a name="l00019"></a>00019
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a><a class="code" href="classFlowShopEval.html#d6ea74de6e62c2b104b52aa68b5da3a5">00021</a> <span class="keywordtype">void</span> <a class="code" href="classFlowShopEval.html#d6ea74de6e62c2b104b52aa68b5da3a5">FlowShopEval::operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00022"></a>00022 {
|
||||
<a name="l00023"></a>00023 <a class="code" href="classmoeoRealObjectiveVector.html">FlowShopObjectiveVector</a> objVector;
|
||||
<a name="l00024"></a>00024 objVector[0] = <a class="code" href="classFlowShopEval.html#8b383e0c6cfd68fdf61e987b5fc91cf3">makespan</a>(_flowshop);
|
||||
<a name="l00025"></a>00025 objVector[1] = <a class="code" href="classFlowShopEval.html#25d04be8fd17b5589fdac732accaaf9e">tardiness</a>(_flowshop);
|
||||
<a name="l00026"></a>00026 _flowshop.<a class="code" href="classMOEO.html#7509143b0f18644e7d3183a039cece7b">objectiveVector</a>(objVector);
|
||||
<a name="l00027"></a>00027 }
|
||||
<a name="l00028"></a>00028
|
||||
<a name="l00029"></a>00029
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a><a class="code" href="classFlowShopEval.html#8b383e0c6cfd68fdf61e987b5fc91cf3">00031</a> <span class="keywordtype">double</span> <a class="code" href="classFlowShopEval.html#8b383e0c6cfd68fdf61e987b5fc91cf3">FlowShopEval::makespan</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00032"></a>00032 {
|
||||
<a name="l00033"></a>00033 <span class="comment">// completion times computation for each job on each machine</span>
|
||||
<a name="l00034"></a>00034 <span class="comment">// C[i][j] = completion of the jth job of the scheduling on the ith machine</span>
|
||||
<a name="l00035"></a>00035 std::vector< std::vector<unsigned int> > C = <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">completionTime</a>(_flowshop);
|
||||
<a name="l00036"></a>00036 <span class="keywordflow">return</span> C[<a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">M</a>-1][_flowshop[<a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">N</a>-1]];
|
||||
<a name="l00037"></a>00037 }
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a><a class="code" href="classFlowShopEval.html#25d04be8fd17b5589fdac732accaaf9e">00040</a> <span class="keywordtype">double</span> <a class="code" href="classFlowShopEval.html#25d04be8fd17b5589fdac732accaaf9e">FlowShopEval::tardiness</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00041"></a>00041 {
|
||||
<a name="l00042"></a>00042 <span class="comment">// completion times computation for each job on each machine</span>
|
||||
<a name="l00043"></a>00043 <span class="comment">// C[i][j] = completion of the jth job of the scheduling on the ith machine</span>
|
||||
<a name="l00044"></a>00044 std::vector< std::vector<unsigned int> > C = <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">completionTime</a>(_flowshop);
|
||||
<a name="l00045"></a>00045 <span class="comment">// tardiness computation</span>
|
||||
<a name="l00046"></a>00046 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="keywordtype">long</span> sum = 0;
|
||||
<a name="l00047"></a>00047 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=0 ; j<<a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">N</a> ; j++)
|
||||
<a name="l00048"></a>00048 sum += (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) std::max (0, (<span class="keywordtype">int</span>) (C[<a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">M</a>-1][_flowshop[j]] - <a class="code" href="classFlowShopEval.html#a283f1bfd433ec1bd3a45c46bd6e3ba4">d</a>[_flowshop[j]]));
|
||||
<a name="l00049"></a>00049 <span class="keywordflow">return</span> sum;
|
||||
<a name="l00050"></a>00050 }
|
||||
<a name="l00051"></a>00051
|
||||
<a name="l00052"></a>00052
|
||||
<a name="l00053"></a><a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">00053</a> std::vector< std::vector<unsigned int> > <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">FlowShopEval::completionTime</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop) {
|
||||
<a name="l00054"></a>00054 std::vector< std::vector<unsigned int> > C(<a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">M</a>,<a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">N</a>);
|
||||
<a name="l00055"></a>00055 C[0][_flowshop[0]] = <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>[0][_flowshop[0]];
|
||||
<a name="l00056"></a>00056 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=1; j<<a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">N</a>; j++)
|
||||
<a name="l00057"></a>00057 C[0][_flowshop[j]] = C[0][_flowshop[j-1]] + <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>[0][_flowshop[j]];
|
||||
<a name="l00058"></a>00058 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=1; i<<a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">M</a>; i++)
|
||||
<a name="l00059"></a>00059 C[i][_flowshop[0]] = C[i-1][_flowshop[0]] + <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>[i][_flowshop[0]];
|
||||
<a name="l00060"></a>00060 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=1; i<M; i++)
|
||||
<a name="l00061"></a>00061 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j=1; j<N; j++)
|
||||
<a name="l00062"></a>00062 C[i][_flowshop[j]] = std::max(C[i][_flowshop[j-1]], C[i-1][_flowshop[j]]) + <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>[i][_flowshop[j]];
|
||||
<a name="l00063"></a>00063 <span class="keywordflow">return</span> C;
|
||||
<a name="l00064"></a>00064 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopEval.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopEval.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopEval.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPEVAL_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPEVAL_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <vector></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <core/moeoEvalFunc.h></span>
|
||||
<a name="l00018"></a>00018 <span class="preprocessor">#include <FlowShop.h></span>
|
||||
<a name="l00019"></a>00019
|
||||
<a name="l00023"></a><a class="code" href="classFlowShopEval.html">00023</a> <span class="keyword">class </span><a class="code" href="classFlowShopEval.html">FlowShopEval</a> : <span class="keyword">public</span> <a class="code" href="classmoeoEvalFunc.html">moeoEvalFunc</a><FlowShop>
|
||||
<a name="l00024"></a>00024 {
|
||||
<a name="l00025"></a>00025 <span class="keyword">public</span>:
|
||||
<a name="l00026"></a>00026
|
||||
<a name="l00034"></a>00034 <a class="code" href="classFlowShopEval.html#f830293ad66a253a4008937fd6d68fce">FlowShopEval</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _M, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _N, <span class="keyword">const</span> std::vector< std::vector<unsigned int> > & _p, <span class="keyword">const</span> std::vector<unsigned int> & _d);
|
||||
<a name="l00035"></a>00035
|
||||
<a name="l00036"></a>00036
|
||||
<a name="l00041"></a>00041 <span class="keywordtype">void</span> <a class="code" href="classFlowShopEval.html#d6ea74de6e62c2b104b52aa68b5da3a5">operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00042"></a>00042
|
||||
<a name="l00043"></a>00043
|
||||
<a name="l00044"></a>00044 <span class="keyword">private</span>:
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00047"></a><a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">00047</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopEval.html#9c7c7263d8c04d18d66729f4875d46cd">M</a>;
|
||||
<a name="l00049"></a><a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">00049</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopEval.html#48c4a108b54c2c949cb649e470c9e8c4">N</a>;
|
||||
<a name="l00051"></a><a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">00051</a> std::vector< std::vector < unsigned int > > <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>;
|
||||
<a name="l00053"></a><a class="code" href="classFlowShopEval.html#a283f1bfd433ec1bd3a45c46bd6e3ba4">00053</a> std::vector < unsigned int > <a class="code" href="classFlowShopEval.html#a283f1bfd433ec1bd3a45c46bd6e3ba4">d</a>;
|
||||
<a name="l00054"></a>00054
|
||||
<a name="l00055"></a>00055
|
||||
<a name="l00060"></a>00060 <span class="keywordtype">double</span> <a class="code" href="classFlowShopEval.html#8b383e0c6cfd68fdf61e987b5fc91cf3">makespan</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00061"></a>00061
|
||||
<a name="l00062"></a>00062
|
||||
<a name="l00067"></a>00067 <span class="keywordtype">double</span> <a class="code" href="classFlowShopEval.html#25d04be8fd17b5589fdac732accaaf9e">tardiness</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00068"></a>00068
|
||||
<a name="l00069"></a>00069
|
||||
<a name="l00075"></a>00075 std::vector< std::vector<unsigned int> > <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">completionTime</a> (<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00076"></a>00076
|
||||
<a name="l00077"></a>00077 };
|
||||
<a name="l00078"></a>00078
|
||||
<a name="l00079"></a>00079 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPEVAL_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopInit.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopInit.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopInit.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopInit.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopInit.html#8ede459984d5de13c6a181c72cf4551e">00016</a> <a class="code" href="classFlowShopInit.html#8ede459984d5de13c6a181c72cf4551e">FlowShopInit::FlowShopInit</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _N) : N(_N)
|
||||
<a name="l00017"></a>00017 {}
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00019"></a>00019
|
||||
<a name="l00020"></a><a class="code" href="classFlowShopInit.html#3df0d9e3834cdfa494683df7e8646025">00020</a> <span class="keywordtype">void</span> <a class="code" href="classFlowShopInit.html#3df0d9e3834cdfa494683df7e8646025">FlowShopInit::operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00021"></a>00021 {
|
||||
<a name="l00022"></a>00022 <span class="comment">// scheduling vector</span>
|
||||
<a name="l00023"></a>00023 std::vector<unsigned int> scheduling(<a class="code" href="classFlowShopInit.html#3bf7c402441e5bba3397377630e6ff4c">N</a>);
|
||||
<a name="l00024"></a>00024 <span class="comment">// initialisation of possible values</span>
|
||||
<a name="l00025"></a>00025 std::vector<unsigned int> possibles(<a class="code" href="classFlowShopInit.html#3bf7c402441e5bba3397377630e6ff4c">N</a>);
|
||||
<a name="l00026"></a>00026 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0 ; i<<a class="code" href="classFlowShopInit.html#3bf7c402441e5bba3397377630e6ff4c">N</a> ; i++)
|
||||
<a name="l00027"></a>00027 possibles[i] = i;
|
||||
<a name="l00028"></a>00028 <span class="comment">// random initialization</span>
|
||||
<a name="l00029"></a>00029 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rInd; <span class="comment">// random index</span>
|
||||
<a name="l00030"></a>00030 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0; i<N; i++)
|
||||
<a name="l00031"></a>00031 {
|
||||
<a name="l00032"></a>00032 rInd = (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#50dfb052f11ae50326e552cb223d88e4">uniform</a>(N-i);
|
||||
<a name="l00033"></a>00033 scheduling[i] = possibles[rInd];
|
||||
<a name="l00034"></a>00034 possibles[rInd] = possibles[N-i-1];
|
||||
<a name="l00035"></a>00035 }
|
||||
<a name="l00036"></a>00036 _flowshop.resize(N);
|
||||
<a name="l00037"></a>00037 _flowshop.<a class="code" href="classmoeoVector.html#a7fadd876fe492717815510f68a921c5">value</a>(scheduling);
|
||||
<a name="l00038"></a>00038 _flowshop.<a class="code" href="classMOEO.html#1069501a40e07071d78c067c46b696ee">invalidate</a>(); <span class="comment">// IMPORTANT in case the _genotype is old</span>
|
||||
<a name="l00039"></a>00039 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopInit.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopInit.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopInit.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPINIT_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPINIT_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <eoInit.h></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <FlowShop.h></span>
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopInit.html">00022</a> <span class="keyword">class </span><a class="code" href="classFlowShopInit.html">FlowShopInit</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_init.html">eoInit</a><FlowShop>
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keyword">public</span>:
|
||||
<a name="l00025"></a>00025
|
||||
<a name="l00030"></a>00030 <a class="code" href="classFlowShopInit.html#8ede459984d5de13c6a181c72cf4551e">FlowShopInit</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _N);
|
||||
<a name="l00031"></a>00031
|
||||
<a name="l00032"></a>00032
|
||||
<a name="l00037"></a>00037 <span class="keywordtype">void</span> <a class="code" href="classFlowShopInit.html#3df0d9e3834cdfa494683df7e8646025">operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a>00040 <span class="keyword">private</span>:
|
||||
<a name="l00041"></a>00041
|
||||
<a name="l00043"></a><a class="code" href="classFlowShopInit.html#3bf7c402441e5bba3397377630e6ff4c">00043</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopInit.html#3bf7c402441e5bba3397377630e6ff4c">N</a>;
|
||||
<a name="l00044"></a>00044
|
||||
<a name="l00045"></a>00045 };
|
||||
<a name="l00046"></a>00046
|
||||
<a name="l00047"></a>00047 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPINIT_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopObjectiveVectorTraits.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopObjectiveVectorTraits.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopObjectiveVectorTraits.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopObjectiveVectorTraits.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopObjectiveVectorTraits.html#e1a0f5be1782b9f9ce08128a404a1fa8">00016</a> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#e1a0f5be1782b9f9ce08128a404a1fa8">FlowShopObjectiveVectorTraits::minimizing</a> (<span class="keywordtype">int</span> _i)
|
||||
<a name="l00017"></a>00017 {
|
||||
<a name="l00018"></a>00018 <span class="comment">// minimizing both</span>
|
||||
<a name="l00019"></a>00019 <span class="keywordflow">return</span> <span class="keyword">true</span>;
|
||||
<a name="l00020"></a>00020 }
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopObjectiveVectorTraits.html#229fbb4cc19d289637891c1b49f3eaba">00022</a> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#229fbb4cc19d289637891c1b49f3eaba">FlowShopObjectiveVectorTraits::maximizing</a> (<span class="keywordtype">int</span> _i)
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="comment">// minimizing both</span>
|
||||
<a name="l00025"></a>00025 <span class="keywordflow">return</span> <span class="keyword">false</span>;
|
||||
<a name="l00026"></a>00026 }
|
||||
<a name="l00027"></a>00027
|
||||
<a name="l00028"></a><a class="code" href="classFlowShopObjectiveVectorTraits.html#76ebe7639b502980bc683ab404b69c10">00028</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#76ebe7639b502980bc683ab404b69c10">FlowShopObjectiveVectorTraits::nObjectives</a> ()
|
||||
<a name="l00029"></a>00029 {
|
||||
<a name="l00030"></a>00030 <span class="comment">// 2 objectives</span>
|
||||
<a name="l00031"></a>00031 <span class="keywordflow">return</span> 2;
|
||||
<a name="l00032"></a>00032 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopObjectiveVectorTraits.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopObjectiveVectorTraits.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopObjectiveVectorTraits.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPOBJECTIVEVECTORTRAITS_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPOBJECTIVEVECTORTRAITS_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <core/moeoObjectiveVectorTraits.h></span>
|
||||
<a name="l00017"></a>00017
|
||||
<a name="l00021"></a><a class="code" href="classFlowShopObjectiveVectorTraits.html">00021</a> <span class="keyword">class </span><a class="code" href="classFlowShopObjectiveVectorTraits.html">FlowShopObjectiveVectorTraits</a> : <span class="keyword">public</span> <a class="code" href="classmoeoObjectiveVectorTraits.html">moeoObjectiveVectorTraits</a>
|
||||
<a name="l00022"></a>00022 {
|
||||
<a name="l00023"></a>00023 <span class="keyword">public</span>:
|
||||
<a name="l00024"></a>00024
|
||||
<a name="l00029"></a>00029 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#e1a0f5be1782b9f9ce08128a404a1fa8">minimizing</a> (<span class="keywordtype">int</span> _i);
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a>00031
|
||||
<a name="l00036"></a>00036 <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#229fbb4cc19d289637891c1b49f3eaba">maximizing</a> (<span class="keywordtype">int</span> _i);
|
||||
<a name="l00037"></a>00037
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00042"></a>00042 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classFlowShopObjectiveVectorTraits.html#76ebe7639b502980bc683ab404b69c10">nObjectives</a> ();
|
||||
<a name="l00043"></a>00043
|
||||
<a name="l00044"></a>00044 };
|
||||
<a name="l00045"></a>00045
|
||||
<a name="l00046"></a>00046 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPOBJECTIVEVECTORTRAITS_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopObjectiveVector.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopObjectiveVector.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopObjectiveVector.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPOBJECTIVEVECTOR_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPOBJECTIVEVECTOR_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <core/moeoRealObjectiveVector.h></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <FlowShopObjectiveVectorTraits.h></span>
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00022"></a>00022 <span class="keyword">typedef</span> moeoRealObjectiveVector < FlowShopObjectiveVectorTraits > <a class="code" href="classmoeoRealObjectiveVector.html">FlowShopObjectiveVector</a>;
|
||||
<a name="l00023"></a>00023
|
||||
<a name="l00024"></a>00024 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPOBJECTIVEVECTOR_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopOpCrossoverQuad.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopOpCrossoverQuad.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopOpCrossoverQuad.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopOpCrossoverQuad.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopOpCrossoverQuad.html#60ac69b87970b7000980f65aa6ead44a">00016</a> std::string <a class="code" href="classFlowShopOpCrossoverQuad.html#60ac69b87970b7000980f65aa6ead44a">FlowShopOpCrossoverQuad::className</a>()<span class="keyword"> const</span>
|
||||
<a name="l00017"></a>00017 <span class="keyword"></span>{
|
||||
<a name="l00018"></a>00018 <span class="keywordflow">return</span> <span class="stringliteral">"FlowShopOpCrossoverQuad"</span>;
|
||||
<a name="l00019"></a>00019 }
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopOpCrossoverQuad.html#92f70807bea24d3c233af580e2c55e3a">00022</a> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopOpCrossoverQuad.html#92f70807bea24d3c233af580e2c55e3a">FlowShopOpCrossoverQuad::operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop1, <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop2)
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keywordtype">bool</span> oneAtLeastIsModified;
|
||||
<a name="l00025"></a>00025 <span class="comment">// computation of the 2 random points</span>
|
||||
<a name="l00026"></a>00026 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> point1, point2;
|
||||
<a name="l00027"></a>00027 <span class="keywordflow">do</span>
|
||||
<a name="l00028"></a>00028 {
|
||||
<a name="l00029"></a>00029 point1 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(std::min(_flowshop1.size(), _flowshop2.size()));
|
||||
<a name="l00030"></a>00030 point2 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(std::min(_flowshop1.size(), _flowshop2.size()));
|
||||
<a name="l00031"></a>00031 } <span class="keywordflow">while</span> (fabs((<span class="keywordtype">double</span>) point1-point2) <= 2);
|
||||
<a name="l00032"></a>00032 <span class="comment">// computation of the offspring</span>
|
||||
<a name="l00033"></a>00033 <a class="code" href="classFlowShop.html">FlowShop</a> offspring1 = <a class="code" href="classFlowShopOpCrossoverQuad.html#cbc2f344a0a29861900f4846597564c3">generateOffspring</a>(_flowshop1, _flowshop2, point1, point2);
|
||||
<a name="l00034"></a>00034 <a class="code" href="classFlowShop.html">FlowShop</a> offspring2 = <a class="code" href="classFlowShopOpCrossoverQuad.html#cbc2f344a0a29861900f4846597564c3">generateOffspring</a>(_flowshop2, _flowshop1, point1, point2);
|
||||
<a name="l00035"></a>00035 <span class="comment">// does at least one genotype has been modified ?</span>
|
||||
<a name="l00036"></a>00036 <span class="keywordflow">if</span> ((_flowshop1 != offspring1) || (_flowshop2 != offspring2))
|
||||
<a name="l00037"></a>00037 {
|
||||
<a name="l00038"></a>00038 <span class="comment">// update</span>
|
||||
<a name="l00039"></a>00039 _flowshop1.<a class="code" href="classmoeoVector.html#a7fadd876fe492717815510f68a921c5">value</a>(offspring1);
|
||||
<a name="l00040"></a>00040 _flowshop2.<a class="code" href="classmoeoVector.html#a7fadd876fe492717815510f68a921c5">value</a>(offspring2);
|
||||
<a name="l00041"></a>00041 <span class="comment">// at least one genotype has been modified</span>
|
||||
<a name="l00042"></a>00042 oneAtLeastIsModified = <span class="keyword">true</span>;
|
||||
<a name="l00043"></a>00043 }
|
||||
<a name="l00044"></a>00044 <span class="keywordflow">else</span>
|
||||
<a name="l00045"></a>00045 {
|
||||
<a name="l00046"></a>00046 <span class="comment">// no genotype has been modified</span>
|
||||
<a name="l00047"></a>00047 oneAtLeastIsModified = <span class="keyword">false</span>;
|
||||
<a name="l00048"></a>00048 }
|
||||
<a name="l00049"></a>00049 <span class="comment">// return 'true' if at least one genotype has been modified</span>
|
||||
<a name="l00050"></a>00050 <span class="keywordflow">return</span> oneAtLeastIsModified;
|
||||
<a name="l00051"></a>00051 }
|
||||
<a name="l00052"></a>00052
|
||||
<a name="l00053"></a>00053
|
||||
<a name="l00054"></a><a class="code" href="classFlowShopOpCrossoverQuad.html#cbc2f344a0a29861900f4846597564c3">00054</a> <a class="code" href="classFlowShop.html">FlowShop</a> <a class="code" href="classFlowShopOpCrossoverQuad.html#cbc2f344a0a29861900f4846597564c3">FlowShopOpCrossoverQuad::generateOffspring</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _parent1, <span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _parent2, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _point1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _point2)
|
||||
<a name="l00055"></a>00055 {
|
||||
<a name="l00056"></a>00056 <a class="code" href="classFlowShop.html">FlowShop</a> result = _parent1;
|
||||
<a name="l00057"></a>00057 std::vector<bool> taken_values(result.size(), <span class="keyword">false</span>);
|
||||
<a name="l00058"></a>00058 <span class="keywordflow">if</span> (_point1 > _point2)
|
||||
<a name="l00059"></a>00059 std::swap(_point1, _point2);
|
||||
<a name="l00060"></a>00060 <span class="comment">/* first parent */</span>
|
||||
<a name="l00061"></a>00061 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=0 ; i<=_point1 ; i++)
|
||||
<a name="l00062"></a>00062 {
|
||||
<a name="l00063"></a>00063 <span class="comment">// result[i] == _parent1[i]</span>
|
||||
<a name="l00064"></a>00064 taken_values[_parent1[i]] = <span class="keyword">true</span>;
|
||||
<a name="l00065"></a>00065 }
|
||||
<a name="l00066"></a>00066 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=_point2 ; i<result.size() ; i++)
|
||||
<a name="l00067"></a>00067 {
|
||||
<a name="l00068"></a>00068 <span class="comment">// result[i] == _parent1[i]</span>
|
||||
<a name="l00069"></a>00069 taken_values[_parent1[i]] = <span class="keyword">true</span>;
|
||||
<a name="l00070"></a>00070 }
|
||||
<a name="l00071"></a>00071 <span class="comment">/* second parent */</span>
|
||||
<a name="l00072"></a>00072 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = _point1+1;
|
||||
<a name="l00073"></a>00073 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0;
|
||||
<a name="l00074"></a>00074 <span class="keywordflow">while</span> (i<_point2 && j<_parent2.size())
|
||||
<a name="l00075"></a>00075 {
|
||||
<a name="l00076"></a>00076 <span class="keywordflow">if</span> (! taken_values[_parent2[j]])
|
||||
<a name="l00077"></a>00077 {
|
||||
<a name="l00078"></a>00078 result[i] = _parent2[j];
|
||||
<a name="l00079"></a>00079 i++;
|
||||
<a name="l00080"></a>00080 }
|
||||
<a name="l00081"></a>00081 j++;
|
||||
<a name="l00082"></a>00082 }
|
||||
<a name="l00083"></a>00083 <span class="keywordflow">return</span> result;
|
||||
<a name="l00084"></a>00084 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopOpCrossoverQuad.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopOpCrossoverQuad.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopOpCrossoverQuad.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPOPCROSSOVERQUAD_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPOPCROSSOVERQUAD_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <eoOp.h></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <FlowShop.h></span>
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopOpCrossoverQuad.html">00022</a> <span class="keyword">class </span><a class="code" href="classFlowShopOpCrossoverQuad.html">FlowShopOpCrossoverQuad</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_quad_op.html">eoQuadOp</a> < FlowShop >
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keyword">public</span>:
|
||||
<a name="l00025"></a>00025
|
||||
<a name="l00029"></a>00029 std::string <a class="code" href="classFlowShopOpCrossoverQuad.html#60ac69b87970b7000980f65aa6ead44a">className</a>() <span class="keyword">const</span>;
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a>00031
|
||||
<a name="l00037"></a>00037 <span class="keywordtype">bool</span> <a class="code" href="classFlowShopOpCrossoverQuad.html#92f70807bea24d3c233af580e2c55e3a">operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop1, <a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop2);
|
||||
<a name="l00038"></a>00038
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a>00040 <span class="keyword">private</span>:
|
||||
<a name="l00041"></a>00041
|
||||
<a name="l00049"></a>00049 <a class="code" href="classFlowShop.html">FlowShop</a> <a class="code" href="classFlowShopOpCrossoverQuad.html#cbc2f344a0a29861900f4846597564c3">generateOffspring</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _parent1, <span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> & _parent2, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _point1, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> _point2);
|
||||
<a name="l00050"></a>00050
|
||||
<a name="l00051"></a>00051 };
|
||||
<a name="l00052"></a>00052
|
||||
<a name="l00053"></a>00053 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPOPCROSSOVERQUAD_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopOpMutationExchange.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopOpMutationExchange.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopOpCrossoverQuad.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopOpMutationExchange.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopOpMutationExchange.html#36a926c9fe21346db26fadf1d50c1c7a">00016</a> std::string <a class="code" href="classFlowShopOpMutationExchange.html#36a926c9fe21346db26fadf1d50c1c7a">FlowShopOpMutationExchange::className</a>()<span class="keyword"> const</span>
|
||||
<a name="l00017"></a>00017 <span class="keyword"></span>{
|
||||
<a name="l00018"></a>00018 <span class="keywordflow">return</span> <span class="stringliteral">"FlowShopOpMutationExchange"</span>;
|
||||
<a name="l00019"></a>00019 }
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopOpMutationExchange.html#bdb2e1d937d788c50f04226265c848bd">00022</a> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopOpMutationExchange.html#bdb2e1d937d788c50f04226265c848bd">FlowShopOpMutationExchange::operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keywordtype">bool</span> isModified;
|
||||
<a name="l00025"></a>00025 <a class="code" href="classFlowShop.html">FlowShop</a> result = _flowshop;
|
||||
<a name="l00026"></a>00026 <span class="comment">// computation of the 2 random points</span>
|
||||
<a name="l00027"></a>00027 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> point1, point2;
|
||||
<a name="l00028"></a>00028 <span class="keywordflow">do</span>
|
||||
<a name="l00029"></a>00029 {
|
||||
<a name="l00030"></a>00030 point1 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(result.size());
|
||||
<a name="l00031"></a>00031 point2 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(result.size());
|
||||
<a name="l00032"></a>00032 } <span class="keywordflow">while</span> (point1 == point2);
|
||||
<a name="l00033"></a>00033 <span class="comment">// swap</span>
|
||||
<a name="l00034"></a>00034 std::swap (result[point1], result[point2]);
|
||||
<a name="l00035"></a>00035 <span class="comment">// update (if necessary)</span>
|
||||
<a name="l00036"></a>00036 <span class="keywordflow">if</span> (result != _flowshop)
|
||||
<a name="l00037"></a>00037 {
|
||||
<a name="l00038"></a>00038 <span class="comment">// update</span>
|
||||
<a name="l00039"></a>00039 _flowshop.<a class="code" href="classmoeoVector.html#a7fadd876fe492717815510f68a921c5">value</a>(result);
|
||||
<a name="l00040"></a>00040 <span class="comment">// the genotype has been modified</span>
|
||||
<a name="l00041"></a>00041 isModified = <span class="keyword">true</span>;
|
||||
<a name="l00042"></a>00042 }
|
||||
<a name="l00043"></a>00043 <span class="keywordflow">else</span>
|
||||
<a name="l00044"></a>00044 {
|
||||
<a name="l00045"></a>00045 <span class="comment">// the genotype has not been modified</span>
|
||||
<a name="l00046"></a>00046 isModified = <span class="keyword">false</span>;
|
||||
<a name="l00047"></a>00047 }
|
||||
<a name="l00048"></a>00048 <span class="comment">// return 'true' if the genotype has been modified</span>
|
||||
<a name="l00049"></a>00049 <span class="keywordflow">return</span> isModified;
|
||||
<a name="l00050"></a>00050 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopOpMutationExchange.h Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopOpMutationExchange.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopOpCrossoverQuad.h</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#ifndef FLOWSHOPOPMUTATIONEXCHANGE_H_</span>
|
||||
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPOPMUTATIONEXCHANGE_H_</span>
|
||||
<a name="l00015"></a>00015 <span class="preprocessor"></span>
|
||||
<a name="l00016"></a>00016 <span class="preprocessor">#include <eoOp.h></span>
|
||||
<a name="l00017"></a>00017 <span class="preprocessor">#include <FlowShop.h></span>
|
||||
<a name="l00018"></a>00018
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopOpMutationExchange.html">00022</a> <span class="keyword">class </span><a class="code" href="classFlowShopOpMutationExchange.html">FlowShopOpMutationExchange</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_mon_op.html">eoMonOp</a><FlowShop>
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keyword">public</span>:
|
||||
<a name="l00025"></a>00025
|
||||
<a name="l00029"></a>00029 std::string <a class="code" href="classFlowShopOpMutationExchange.html#36a926c9fe21346db26fadf1d50c1c7a">className</a>() <span class="keyword">const</span>;
|
||||
<a name="l00030"></a>00030
|
||||
<a name="l00031"></a>00031
|
||||
<a name="l00036"></a>00036 <span class="keywordtype">bool</span> <a class="code" href="classFlowShopOpMutationExchange.html#bdb2e1d937d788c50f04226265c848bd">operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop);
|
||||
<a name="l00037"></a>00037
|
||||
<a name="l00038"></a>00038 };
|
||||
<a name="l00039"></a>00039
|
||||
<a name="l00040"></a>00040 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOPOPMUTATIONEXCHANGE_H_*/</span>
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||||
<title>ParadisEO-MOEOMovingObjects: FlowShopOpMutationShift.cpp Source File</title>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css">
|
||||
</head><body>
|
||||
<!-- Generated by Doxygen 1.4.7 -->
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li><a href="main.html"><span>Main Page</span></a></li>
|
||||
<li><a href="classes.html"><span>Classes</span></a></li>
|
||||
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||||
<li>
|
||||
<form action="search.php" method="get">
|
||||
<table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<td><label> <u>S</u>earch for </label></td>
|
||||
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</li>
|
||||
</ul></div>
|
||||
<h1>FlowShopOpMutationShift.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-</span>
|
||||
<a name="l00002"></a>00002
|
||||
<a name="l00003"></a>00003 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00004"></a>00004 <span class="comment">// FlowShopOpMutationShift.cpp</span>
|
||||
<a name="l00005"></a>00005 <span class="comment">// (c) OPAC Team (LIFL), Dolphin Project (INRIA), 2007</span>
|
||||
<a name="l00006"></a>00006 <span class="comment">/*</span>
|
||||
<a name="l00007"></a>00007 <span class="comment"> This library...</span>
|
||||
<a name="l00008"></a>00008 <span class="comment"></span>
|
||||
<a name="l00009"></a>00009 <span class="comment"> Contact: paradiseo-help@lists.gforge.inria.fr, http://paradiseo.gforge.inria.fr</span>
|
||||
<a name="l00010"></a>00010 <span class="comment"> */</span>
|
||||
<a name="l00011"></a>00011 <span class="comment">//-----------------------------------------------------------------------------</span>
|
||||
<a name="l00012"></a>00012
|
||||
<a name="l00013"></a>00013 <span class="preprocessor">#include <FlowShopOpMutationShift.h></span>
|
||||
<a name="l00014"></a>00014
|
||||
<a name="l00015"></a>00015
|
||||
<a name="l00016"></a><a class="code" href="classFlowShopOpMutationShift.html#dd1d710568978d1d4bb8c6f3925da4c6">00016</a> std::string <a class="code" href="classFlowShopOpMutationShift.html#dd1d710568978d1d4bb8c6f3925da4c6">FlowShopOpMutationShift::className</a>()<span class="keyword"> const</span>
|
||||
<a name="l00017"></a>00017 <span class="keyword"></span>{
|
||||
<a name="l00018"></a>00018 <span class="keywordflow">return</span> <span class="stringliteral">"FlowShopOpMutationShift"</span>;
|
||||
<a name="l00019"></a>00019 }
|
||||
<a name="l00020"></a>00020
|
||||
<a name="l00021"></a>00021
|
||||
<a name="l00022"></a><a class="code" href="classFlowShopOpMutationShift.html#c000b017e75ddee3b6fe9db8ea5ddd5b">00022</a> <span class="keywordtype">bool</span> <a class="code" href="classFlowShopOpMutationShift.html#c000b017e75ddee3b6fe9db8ea5ddd5b">FlowShopOpMutationShift::operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> & _flowshop)
|
||||
<a name="l00023"></a>00023 {
|
||||
<a name="l00024"></a>00024 <span class="keywordtype">bool</span> isModified;
|
||||
<a name="l00025"></a>00025 <span class="keywordtype">int</span> direction;
|
||||
<a name="l00026"></a>00026 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> tmp;
|
||||
<a name="l00027"></a>00027 <a class="code" href="classFlowShop.html">FlowShop</a> result = _flowshop;
|
||||
<a name="l00028"></a>00028 <span class="comment">// computation of the 2 random points</span>
|
||||
<a name="l00029"></a>00029 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> point1, point2;
|
||||
<a name="l00030"></a>00030 <span class="keywordflow">do</span>
|
||||
<a name="l00031"></a>00031 {
|
||||
<a name="l00032"></a>00032 point1 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(result.size());
|
||||
<a name="l00033"></a>00033 point2 = rng.<a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_rng.html#f0829d258c74cdc3a8f6cd72c0287cb4">random</a>(result.size());
|
||||
<a name="l00034"></a>00034 } <span class="keywordflow">while</span> (point1 == point2);
|
||||
<a name="l00035"></a>00035 <span class="comment">// direction</span>
|
||||
<a name="l00036"></a>00036 <span class="keywordflow">if</span> (point1 < point2)
|
||||
<a name="l00037"></a>00037 direction = 1;
|
||||
<a name="l00038"></a>00038 <span class="keywordflow">else</span>
|
||||
<a name="l00039"></a>00039 direction = -1;
|
||||
<a name="l00040"></a>00040 <span class="comment">// mutation</span>
|
||||
<a name="l00041"></a>00041 tmp = result[point1];
|
||||
<a name="l00042"></a>00042 <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i=point1 ; i!=point2 ; i+=direction)
|
||||
<a name="l00043"></a>00043 result[i] = result[i+direction];
|
||||
<a name="l00044"></a>00044 result[point2] = tmp;
|
||||
<a name="l00045"></a>00045 <span class="comment">// update (if necessary)</span>
|
||||
<a name="l00046"></a>00046 <span class="keywordflow">if</span> (result != _flowshop)
|
||||
<a name="l00047"></a>00047 {
|
||||
<a name="l00048"></a>00048 <span class="comment">// update</span>
|
||||
<a name="l00049"></a>00049 _flowshop.<a class="code" href="classmoeoVector.html#a7fadd876fe492717815510f68a921c5">value</a>(result);
|
||||
<a name="l00050"></a>00050 <span class="comment">// the genotype has been modified</span>
|
||||
<a name="l00051"></a>00051 isModified = <span class="keyword">true</span>;
|
||||
<a name="l00052"></a>00052 }
|
||||
<a name="l00053"></a>00053 <span class="keywordflow">else</span>
|
||||
<a name="l00054"></a>00054 {
|
||||
<a name="l00055"></a>00055 <span class="comment">// the genotype has not been modified</span>
|
||||
<a name="l00056"></a>00056 isModified = <span class="keyword">false</span>;
|
||||
<a name="l00057"></a>00057 }
|
||||
<a name="l00058"></a>00058 <span class="comment">// return 'true' if the genotype has been modified</span>
|
||||
<a name="l00059"></a>00059 <span class="keywordflow">return</span> isModified;
|
||||
<a name="l00060"></a>00060 }
|
||||
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by
|
||||
<a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue