added good doc files

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@683 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2007-10-08 14:49:10 +00:00
commit 04b12455d0
152 changed files with 14307 additions and 0 deletions

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;stdexcept&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;FlowShopBenchmarkParser.h&gt;</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&lt; std::vector&lt;unsigned int&gt; &gt; <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&lt;unsigned int&gt; <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 &amp; _os)<span class="keyword"> const</span>
<a name="l00047"></a>00047 <span class="keyword"></span>{
<a name="l00048"></a>00048 _os &lt;&lt; <span class="stringliteral">"M="</span> &lt;&lt; <a class="code" href="classFlowShopBenchmarkParser.html#4cc02556c751afe32e8800544160c7c7">M</a> &lt;&lt; <span class="stringliteral">" N="</span> &lt;&lt; <a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a> &lt;&lt; std::endl;
<a name="l00049"></a>00049 _os &lt;&lt; <span class="stringliteral">"*** processing times"</span> &lt;&lt; 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&lt;<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&lt;<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>; j++) {
<a name="l00052"></a>00052 _os &lt;&lt; <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>[i][j] &lt;&lt; <span class="stringliteral">" "</span>;
<a name="l00053"></a>00053 }
<a name="l00054"></a>00054 _os &lt;&lt; std::endl;
<a name="l00055"></a>00055 }
<a name="l00056"></a>00056 _os &lt;&lt; <span class="stringliteral">"*** due-dates"</span> &lt;&lt; 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&lt;<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a>; j++) {
<a name="l00058"></a>00058 _os &lt;&lt; <a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">d</a>[j] &lt;&lt; <span class="stringliteral">" "</span>;
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060 _os &lt;&lt; std::endl &lt;&lt; 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&lt; std::vector&lt;unsigned int&gt; &gt; (<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&lt;unsigned int&gt; (<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&lt;<a class="code" href="classFlowShopBenchmarkParser.html#fb220e40e9f94e3c1d3a7eb437aeffce">N</a> ; j++) {
<a name="l00085"></a>00085 <span class="comment">// index of the job (&lt;=&gt; 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&lt;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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;fstream&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;vector&gt;</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 &lt; std::vector &lt; unsigned int &gt; &gt; <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 &lt; unsigned int &gt; <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 &amp; _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 &lt; std::vector &lt; unsigned int &gt; &gt; <a class="code" href="classFlowShopBenchmarkParser.html#4c1ce3d710b6605ddcc723101b808de5">p</a>;
<a name="l00073"></a><a class="code" href="classFlowShopBenchmarkParser.html#8898519f54465b2d23a846053363bf4b">00073</a> std::vector &lt; unsigned int &gt; <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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;moeo&gt;</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 &lt;make_eval_FlowShop.h&gt;</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 &lt;make_genotype_FlowShop.h&gt;</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 &lt;make_op_FlowShop.h&gt;</span>
<a name="l00022"></a>00022 <span class="comment">// how to initialize the population</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;do/make_pop.h&gt;</span>
<a name="l00024"></a>00024 <span class="comment">// the stopping criterion</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &lt;do/make_continue_moeo.h&gt;</span>
<a name="l00026"></a>00026 <span class="comment">// outputs (stats, population dumps, ...)</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;do/make_checkpoint_moeo.h&gt;</span>
<a name="l00028"></a>00028 <span class="comment">// evolution engine (selection and replacement)</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;do/make_ea_moeo.h&gt;</span>
<a name="l00030"></a>00030 <span class="comment">// simple call to the algo</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;do/make_run.h&gt;</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> &amp; _parser);
<a name="l00034"></a>00034 <span class="comment">// definition of the representation</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;FlowShop.h&gt;</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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;</a>&amp; 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&lt;FlowShop&gt;(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 &lt;&lt; <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 &lt;&lt; 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 &lt;&lt; <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 &lt;&lt; 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 &lt;&lt; <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 &lt;&lt; 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&amp; e)
<a name="l00103"></a>00103 {
<a name="l00104"></a>00104 cout &lt;&lt; e.what() &lt;&lt; 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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopEval.h&gt;</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&lt; std::vector&lt;unsigned int&gt; &gt; &amp; _p, <span class="keyword">const</span> std::vector&lt;unsigned int&gt; &amp; _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> &amp; _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> &amp; _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&lt; std::vector&lt;unsigned int&gt; &gt; 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> &amp; _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&lt; std::vector&lt;unsigned int&gt; &gt; 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&lt;<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&lt; std::vector&lt;unsigned int&gt; &gt; <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">FlowShopEval::completionTime</a>(<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _flowshop) {
<a name="l00054"></a>00054 std::vector&lt; std::vector&lt;unsigned int&gt; &gt; 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&lt;<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&lt;<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&lt;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&lt;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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;vector&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;core/moeoEvalFunc.h&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;FlowShop.h&gt;</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>&lt;FlowShop&gt;
<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&lt; std::vector&lt;unsigned int&gt; &gt; &amp; _p, <span class="keyword">const</span> std::vector&lt;unsigned int&gt; &amp; _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> &amp; _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&lt; std::vector &lt; unsigned int &gt; &gt; <a class="code" href="classFlowShopEval.html#f4152ec0542e13cbc8f4c4ece284a2b4">p</a>;
<a name="l00053"></a><a class="code" href="classFlowShopEval.html#a283f1bfd433ec1bd3a45c46bd6e3ba4">00053</a> std::vector &lt; unsigned int &gt; <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> &amp; _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> &amp; _flowshop);
<a name="l00068"></a>00068
<a name="l00069"></a>00069
<a name="l00075"></a>00075 std::vector&lt; std::vector&lt;unsigned int&gt; &gt; <a class="code" href="classFlowShopEval.html#84cfc6f7bee1c0e4b1a29ca99e3c129b">completionTime</a> (<span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopInit.h&gt;</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> &amp; _flowshop)
<a name="l00021"></a>00021 {
<a name="l00022"></a>00022 <span class="comment">// scheduling vector</span>
<a name="l00023"></a>00023 std::vector&lt;unsigned int&gt; 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&lt;unsigned int&gt; 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&lt;<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&lt;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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;eoInit.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShop.h&gt;</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>&lt;FlowShop&gt;
<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> &amp; _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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopObjectiveVectorTraits.h&gt;</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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;core/moeoObjectiveVectorTraits.h&gt;</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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;core/moeoRealObjectiveVector.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShopObjectiveVectorTraits.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00022"></a>00022 <span class="keyword">typedef</span> moeoRealObjectiveVector &lt; FlowShopObjectiveVectorTraits &gt; <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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopOpCrossoverQuad.h&gt;</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> &amp; _flowshop1, <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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) &lt;= 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> &amp; _parent1, <span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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&lt;bool&gt; taken_values(result.size(), <span class="keyword">false</span>);
<a name="l00058"></a>00058 <span class="keywordflow">if</span> (_point1 &gt; _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&lt;=_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&lt;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&lt;_point2 &amp;&amp; j&lt;_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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;eoOp.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShop.h&gt;</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> &lt; FlowShop &gt;
<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> &amp; _flowshop1, <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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> &amp; _parent1, <span class="keyword">const</span> <a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopOpMutationExchange.h&gt;</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> &amp; _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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;eoOp.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShop.h&gt;</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>&lt;FlowShop&gt;
<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> &amp; _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&nbsp;
<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>

View file

@ -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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</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 &lt;FlowShopOpMutationShift.h&gt;</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> &amp; _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 &lt; 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&nbsp;
<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>

View file

@ -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: FlowShopOpMutationShift.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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>FlowShopOpMutationShift.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">// FlowShopOpMutationShift.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 FLOWSHOPOPMUTATIONSHIFT_H_</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOPOPMUTATIONSHIFT_H_</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;eoOp.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShop.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00022"></a><a class="code" href="classFlowShopOpMutationShift.html">00022</a> <span class="keyword">class </span><a class="code" href="classFlowShopOpMutationShift.html">FlowShopOpMutationShift</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> &lt; FlowShop &gt;
<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="classFlowShopOpMutationShift.html#dd1d710568978d1d4bb8c6f3925da4c6">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="classFlowShopOpMutationShift.html#c000b017e75ddee3b6fe9db8ea5ddd5b">operator()</a>(<a class="code" href="classFlowShop.html">FlowShop</a> &amp; _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">/*FLOWSHOPOPMUTATIONSHIFT_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&nbsp;
<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>

View file

@ -0,0 +1,46 @@
<!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: FlowShop.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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>FlowShop.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">// FlowShop.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 &lt;FlowShop.h&gt;</span>
<a name="l00014"></a>00014
<a name="l00015"></a><a class="code" href="classFlowShop.html#eaab263664f0078082e723a905d430f3">00015</a> std::string <a class="code" href="classFlowShop.html#eaab263664f0078082e723a905d430f3">FlowShop::className</a>()<span class="keyword"> const</span>
<a name="l00016"></a>00016 <span class="keyword"></span>{
<a name="l00017"></a>00017 <span class="keywordflow">return</span> <span class="stringliteral">"FlowShop"</span>;
<a name="l00018"></a>00018 }
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:51 2007 for ParadisEO-MOEOMovingObjects by&nbsp;
<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>

View file

@ -0,0 +1,55 @@
<!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: FlowShop.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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>FlowShop.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">// FlowShop.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 FLOWSHOP_H_</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define FLOWSHOP_H_</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;core/moeoVector.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;FlowShopObjectiveVector.h&gt;</span>
<a name="l00018"></a>00018
<a name="l00022"></a><a class="code" href="classFlowShop.html">00022</a> <span class="keyword">class </span><a class="code" href="classFlowShop.html">FlowShop</a>: <span class="keyword">public</span> <a class="code" href="classmoeoVector.html">moeoVector</a> &lt; FlowShopObjectiveVector , double , double , unsigned int &gt;
<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="classFlowShop.html#eaab263664f0078082e723a905d430f3">className</a>() <span class="keyword">const</span>;
<a name="l00030"></a>00030
<a name="l00031"></a>00031 };
<a name="l00032"></a>00032
<a name="l00033"></a>00033 <span class="preprocessor">#endif </span><span class="comment">/*FLOWSHOP_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&nbsp;
<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>

View file

@ -0,0 +1,108 @@
<!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: README 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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>README</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 PARADISEO-<a class="code" href="classMOEO.html">MOEO</a> README FILE
<a name="l00002"></a>00002 =======================================================================
<a name="l00003"></a>00003 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/namespacedominance.html#01ead7419cb41bd6a8d7ea265dce1ce3">check</a> latest news at http:<span class="comment">//paradiseo.gforge.inria.fr/</span>
<a name="l00004"></a>00004 =======================================================================
<a name="l00005"></a>00005
<a name="l00006"></a>00006 Welcome to ParadisEO-<a class="code" href="classMOEO.html">MOEO</a>, the Multi-Objective Evolving Objects library.
<a name="l00007"></a>00007 The latest news about ParadisEO-<a class="code" href="classMOEO.html">MOEO</a> can be found on the gforge repository at
<a name="l00008"></a>00008 http:<span class="comment">//paradiseo.gforge.inria.fr/</span>
<a name="l00009"></a>00009 In <span class="keywordflow">case</span> of any problem, please e-mail us at
<a name="l00010"></a>00010 paradiseo-help@lists.gforge.inria.fr
<a name="l00011"></a>00011
<a name="l00012"></a>00012
<a name="l00013"></a>00013 =======================================================================
<a name="l00014"></a>00014 BUILDING PARADISEO-<a class="code" href="classMOEO.html">MOEO</a>
<a name="l00015"></a>00015 =======================================================================
<a name="l00016"></a>00016 The basic installation procedure goes the following.
<a name="l00017"></a>00017
<a name="l00018"></a>00018 To compile paradiseo-moeo in the <span class="keywordflow">default</span> directory,
<a name="l00019"></a>00019 go to paradiseo-moeo/build/ and run:
<a name="l00020"></a>00020 &gt; cmake ../ -Dconfig=&lt;path to the install.cmake file&gt;
<a name="l00021"></a>00021 &gt; make
<a name="l00022"></a>00022 <span class="comment">// for an easy-use of the provided lessons</span>
<a name="l00023"></a>00023 &gt; make install
<a name="l00024"></a>00024 <span class="comment">// optional (if the documentation is not already available)</span>
<a name="l00025"></a>00025 &gt; make doc
<a name="l00026"></a>00026
<a name="l00027"></a>00027 To compile paradiseo-moeo anywhere <span class="keywordflow">else</span>, simply run:
<a name="l00028"></a>00028 &gt; cmake $(<a class="code" href="classMOEO.html">MOEO</a>) -Dconfig=&lt;path to the install.cmake file&gt;
<a name="l00029"></a>00029 &gt; make
<a name="l00030"></a>00030 <span class="comment">// for an easy-use of the provided lessons</span>
<a name="l00031"></a>00031 &gt; make install
<a name="l00032"></a>00032 <span class="comment">// optional (if the documentation is not already available)</span>
<a name="l00033"></a>00033 &gt; make doc
<a name="l00034"></a>00034
<a name="l00035"></a>00035 where $(<a class="code" href="classMOEO.html">MOEO</a>) is the top-level directory of PARADISEO-<a class="code" href="classMOEO.html">MOEO</a>.
<a name="l00036"></a>00036
<a name="l00037"></a>00037 To clean everything, simply run
<a name="l00038"></a>00038 &gt; make clean
<a name="l00039"></a>00039
<a name="l00040"></a>00040 =======================================================================
<a name="l00041"></a>00041 DIRECTORY STRUCTURE
<a name="l00042"></a>00042 =======================================================================
<a name="l00043"></a>00043 After unpacking the archive file, you should end up with the following
<a name="l00044"></a>00044 structure:
<a name="l00045"></a>00045
<a name="l00046"></a>00046 .../ The main PARADISEO-<a class="code" href="classMOEO.html">MOEO</a> directory, created when unpacking.
<a name="l00047"></a>00047 |
<a name="l00048"></a>00048 |
<a name="l00049"></a>00049 +-- build BUILD directory that contains libraries and executable files.
<a name="l00050"></a>00050 |
<a name="l00051"></a>00051 |
<a name="l00052"></a>00052 +-- src SOURCE directory that contains PARADISEO-<a class="code" href="classMOEO.html">MOEO</a> source files.
<a name="l00053"></a>00053 |
<a name="l00054"></a>00054 |
<a name="l00055"></a>00055 +-- doc DOCUMENTATION directory (generated by Doxygen).
<a name="l00056"></a>00056 | |
<a name="l00057"></a>00057 | +-- html HTML files - start at index.html.
<a name="l00058"></a>00058 | |
<a name="l00059"></a>00059 | +-- latex latex files - use to generate Postcript doc.
<a name="l00060"></a>00060 | |
<a name="l00061"></a>00061 | +-- man Unix man format documentation.
<a name="l00062"></a>00062 |
<a name="l00063"></a>00063 |
<a name="l00064"></a>00064 +-- tutorial TUTORIAL directory that contains with lessons.
<a name="l00065"></a>00065 |
<a name="l00066"></a>00066 +-- examples APPLICATIONS - one directory per separate application.
<a name="l00067"></a>00067 | |
<a name="l00068"></a>00068 | +-- flowshop Flow-shop scheduling problem example source files.
<a name="l00069"></a>00069 | |
<a name="l00070"></a>00070 | +-- benchs Benchmark suites <span class="keywordflow">for</span> the flow-shop.
<a name="l00071"></a>00071 |
<a name="l00072"></a>00072 +-- Lesson1 A bi-objective flow-shop problem example solved <span class="keyword">using</span> main MOEAs.
<a name="l00073"></a>00073 |
<a name="l00074"></a>00074 +-- Lesson2 NSGA-II to solve the SCH1 problem.
<a name="l00075"></a>00075
<a name="l00076"></a>00076 =======================================================================
<a name="l00077"></a>00077 NOTES
<a name="l00078"></a>00078 =======================================================================
<a name="l00079"></a>00079
<a name="l00080"></a>00080 Mailing list : paradiseo-help@lists.gforge.inria.fr
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 8 10:35:52 2007 for ParadisEO-MOEOMovingObjects by&nbsp;
<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>

View file

@ -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: Sch1.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&nbsp;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>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul></div>
<h1>Sch1.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">// Sch1.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 &lt;stdio.h&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;moeo&gt;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;es/eoRealInitBounded.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;es/eoRealOp.h&gt;</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="keyword">using namespace </span>std;
<a name="l00019"></a>00019
<a name="l00020"></a>00020 <span class="comment">// the moeoObjectiveVectorTraits : minimizing 2 objectives</span>
<a name="l00021"></a><a class="code" href="classSch1ObjectiveVectorTraits.html">00021</a> <span class="keyword">class </span><a class="code" href="classSch1ObjectiveVectorTraits.html">Sch1ObjectiveVectorTraits</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><a class="code" href="classSch1ObjectiveVectorTraits.html#455ac35e419ad21c0a4ba4bbd2768ca5">00024</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classSch1ObjectiveVectorTraits.html#455ac35e419ad21c0a4ba4bbd2768ca5">minimizing</a> (<span class="keywordtype">int</span> i)
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00027"></a>00027 }
<a name="l00028"></a><a class="code" href="classSch1ObjectiveVectorTraits.html#a7de212f3346dde550757e8a412baa4d">00028</a> <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classSch1ObjectiveVectorTraits.html#a7de212f3346dde550757e8a412baa4d">maximizing</a> (<span class="keywordtype">int</span> i)
<a name="l00029"></a>00029 {
<a name="l00030"></a>00030 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00031"></a>00031 }
<a name="l00032"></a><a class="code" href="classSch1ObjectiveVectorTraits.html#54ae04aa8eb052223778ecae175be95b">00032</a> <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classSch1ObjectiveVectorTraits.html#54ae04aa8eb052223778ecae175be95b">nObjectives</a> ()
<a name="l00033"></a>00033 {
<a name="l00034"></a>00034 <span class="keywordflow">return</span> 2;
<a name="l00035"></a>00035 }
<a name="l00036"></a>00036 };
<a name="l00037"></a>00037
<a name="l00038"></a>00038
<a name="l00039"></a>00039 <span class="comment">// objective vector of real values</span>
<a name="l00040"></a>00040 <span class="keyword">typedef</span> moeoRealObjectiveVector &lt; Sch1ObjectiveVectorTraits &gt; <a class="code" href="classmoeoRealObjectiveVector.html">Sch1ObjectiveVector</a>;
<a name="l00041"></a>00041
<a name="l00042"></a>00042
<a name="l00043"></a>00043 <span class="comment">// multi-objective evolving object for the Sch1 problem</span>
<a name="l00044"></a><a class="code" href="classSch1.html">00044</a> <span class="keyword">class </span><a class="code" href="classSch1.html">Sch1</a> : <span class="keyword">public</span> <a class="code" href="classmoeoRealVector.html">moeoRealVector</a> &lt; Sch1ObjectiveVector, double, double &gt;
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046 <span class="keyword">public</span>:
<a name="l00047"></a><a class="code" href="classSch1.html#3ddc72f40539bfe0d5bb8d977b6655c0">00047</a> <a class="code" href="classSch1.html#3ddc72f40539bfe0d5bb8d977b6655c0">Sch1</a>() : <a class="code" href="classmoeoRealVector.html">moeoRealVector</a> &lt; <a class="code" href="classmoeoRealObjectiveVector.html">Sch1ObjectiveVector</a>, double, double &gt; (1) {}
<a name="l00048"></a>00048 };
<a name="l00049"></a>00049
<a name="l00050"></a>00050
<a name="l00051"></a>00051 <span class="comment">// evaluation of objective functions</span>
<a name="l00052"></a><a class="code" href="classSch1Eval.html">00052</a> <span class="keyword">class </span><a class="code" href="classSch1Eval.html">Sch1Eval</a> : <span class="keyword">public</span> <a class="code" href="classmoeoEvalFunc.html">moeoEvalFunc</a> &lt; Sch1 &gt;
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054 <span class="keyword">public</span>:
<a name="l00055"></a><a class="code" href="classSch1Eval.html#4f806a964f7bafa9e4fcca45da458c98">00055</a> <span class="keywordtype">void</span> <a class="code" href="classSch1Eval.html#4f806a964f7bafa9e4fcca45da458c98">operator () </a>(<a class="code" href="classSch1.html">Sch1</a> &amp; _sch1)
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="keywordflow">if</span> (_sch1.<a class="code" href="classMOEO.html#c8e93beabdab8c2f79f17c7e39efdd05">invalidObjectiveVector</a>())
<a name="l00058"></a>00058 {
<a name="l00059"></a>00059 <a class="code" href="classmoeoRealObjectiveVector.html">Sch1ObjectiveVector</a> objVec;
<a name="l00060"></a>00060 <span class="keywordtype">double</span> x = _sch1[0];
<a name="l00061"></a>00061 objVec[0] = x * x;
<a name="l00062"></a>00062 objVec[1] = (x - 2.0) * (x - 2.0);
<a name="l00063"></a>00063 _sch1.<a class="code" href="classMOEO.html#7509143b0f18644e7d3183a039cece7b">objectiveVector</a>(objVec);
<a name="l00064"></a>00064 }
<a name="l00065"></a>00065 }
<a name="l00066"></a>00066 };
<a name="l00067"></a>00067
<a name="l00068"></a>00068
<a name="l00069"></a>00069 <span class="comment">// main</span>
<a name="l00070"></a>00070 <span class="keywordtype">int</span> main (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])
<a name="l00071"></a>00071 {
<a name="l00072"></a>00072 <span class="comment">// parameters</span>
<a name="l00073"></a>00073 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> POP_SIZE = 20;
<a name="l00074"></a>00074 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> MAX_GEN = 100;
<a name="l00075"></a>00075 <span class="keywordtype">double</span> M_EPSILON = 0.01;
<a name="l00076"></a>00076 <span class="keywordtype">double</span> P_CROSS = 0.25;
<a name="l00077"></a>00077 <span class="keywordtype">double</span> P_MUT = 0.35;
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="comment">// objective functions evaluation</span>
<a name="l00080"></a>00080 <a class="code" href="classSch1Eval.html">Sch1Eval</a> eval;
<a name="l00081"></a>00081
<a name="l00082"></a>00082 <span class="comment">// crossover and mutation</span>
<a name="l00083"></a>00083 eoQuadCloneOp &lt; Sch1 &gt; xover;
<a name="l00084"></a>00084 eoUniformMutation &lt; Sch1 &gt; mutation (M_EPSILON);
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="comment">// generate initial population</span>
<a name="l00087"></a>00087 <a class="codeRef" doxygen="eo.doxytag:http://eodev.sourceforge.net/eo/doc/html/" href="http://eodev.sourceforge.net/eo/doc/html/classeo_real_vector_bounds.html">eoRealVectorBounds</a> bounds (1, 0.0, 2.0); <span class="comment">// [0, 2]</span>
<a name="l00088"></a>00088 eoRealInitBounded &lt; Sch1 &gt; init (bounds);
<a name="l00089"></a>00089 eoPop &lt; Sch1 &gt; pop (POP_SIZE, init);
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="comment">// build NSGA-II</span>
<a name="l00092"></a>00092 moeoNSGAII &lt; Sch1 &gt; nsgaII (MAX_GEN, eval, xover, P_CROSS, mutation, P_MUT);
<a name="l00093"></a>00093
<a name="l00094"></a>00094 <span class="comment">// run the algo</span>
<a name="l00095"></a>00095 nsgaII (pop);
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="comment">// extract first front of the final population using an moeoArchive (this is the output of nsgaII)</span>
<a name="l00098"></a>00098 moeoArchive &lt; Sch1 &gt; arch;
<a name="l00099"></a>00099 arch.<a class="code" href="classmoeoArchive.html#6df0acd84cab4cb53682f2e6ca850e9a">update</a> (pop);
<a name="l00100"></a>00100
<a name="l00101"></a>00101 <span class="comment">// printing of the final archive</span>
<a name="l00102"></a>00102 cout &lt;&lt; <span class="stringliteral">"Final Archive"</span> &lt;&lt; endl;
<a name="l00103"></a>00103 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="l00104"></a>00104 cout &lt;&lt; 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:52 2007 for ParadisEO-MOEOMovingObjects by&nbsp;
<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