⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tester.htm

📁 遗传算法GPE_release_v1.0.tar
💻 HTM
📖 第 1 页 / 共 5 页
字号:
    sets the GenerationHistory containing all the names of IIndividuals in the 
    generation.</font></p>
	<div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber5">
        <tr>
          <td width="100%"><font SIZE="2">
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">public</font><font SIZE="2"><font face="Courier New"> 
          GenerationHistory GenerationHistory {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">get</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">return</font><font SIZE="2"><font face="Courier New"> 
          m_GenerationHistory;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">set</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">if( value == null</font><font SIZE="2"><font face="Courier New"> 
          ) {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">throw new</font><font face="Courier New" SIZE="2"> 
          ArgumentNullException( &quot;value&quot;, &quot;The value passed to</font></p>
          <p style="margin-top: 0; margin-bottom: 0">
          <font face="Courier New" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font><font SIZE="2"><font face="Courier New">&nbsp;Tester.GenerationHistory_set 
          was null.&quot; );</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          m_GenerationHistory = </font></font><font SIZE="2" face="Courier New">
          value</font><font SIZE="2"><font face="Courier New">;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">}</font></p>
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">private</font><font SIZE="2"><font face="Courier New"> 
          GenerationHistory m_GenerationHistory;</font></font></td>
        </tr>
      </table>
      </center>
    </div>
	<p class="dtH4"><font face="Arial">The Environments method gets the 
    IEnvironments to test the IIndividuals.&nbsp; </font></p>
	<div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber6">
        <tr>
          <td width="100%"><font SIZE="2">
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">public</font><font SIZE="2"><font face="Courier New"> 
          EnvironmentReferenceCollection Environments {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">get</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">return</font><font SIZE="2"><font face="Courier New"> 
          m_Environments;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">}</font></p>
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">private 
          EnvironmentReferenceCollection m_Environments = new</font><font SIZE="2"><font face="Courier New"> 
          EnvironmentReferenceCollection();</font></font></td>
        </tr>
      </table>
      </center>
    </div>
	<p class="dtH4"><font face="Arial">The BaseClassNamespace method gets and 
    sets the namespace of the IIndividual <i>Base Class</i>.</font></p>
	<div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber7">
        <tr>
          <td width="100%"><font SIZE="2">
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">public string</font><font SIZE="2"><font face="Courier New"> 
          BaseClassNamespace {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">get</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">return</font><font SIZE="2"><font face="Courier New"> 
          m_BaseClassNamespace;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">set</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">if( value == null</font><font SIZE="2"><font face="Courier New"> 
          ) {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">throw new</font><font face="Courier New" SIZE="2"> 
          ArgumentNullException( &quot;value&quot;, &quot;The value passed to</font></p>
          <p style="margin-top: 0; margin-bottom: 0">
          <font face="Courier New" SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font><font SIZE="2"><font face="Courier New">&nbsp;Tester.BaseClassNamespace_set 
          was null.&quot; );</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          m_BaseClassNamespace = </font></font>
          <font SIZE="2" face="Courier New">value</font><font SIZE="2"><font face="Courier New">;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">}</font></p>
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">private string m_BaseClassNamespace;</font></td>
        </tr>
      </table>
      </center>
    </div>
	<h4 class="dtH4"><span style="font-weight: 400"><font face="Arial">The 
    TestLimit method gets and sets the TestLimit for the GPEngine as specified 
    in the EngineOptions.</font></span></h4>
	<div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber8">
        <tr>
          <td width="100%"><font SIZE="2">
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">public int</font><font SIZE="2"><font face="Courier New"> 
          TestLimit {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">get</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">return</font><font SIZE="2"><font face="Courier New"> 
          m_TestLimit; </font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">set</font><font SIZE="2"><font face="Courier New"> 
          {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">if ( value</font><font SIZE="2"><font face="Courier New"> 
          &lt;= 0 ) {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font></font><font SIZE="2" face="Courier New">throw new 
          ArgumentOutOfRangeException( &quot;value&quot;, value, &quot;The value passed to</font></p>
          <p style="margin-top: 0; margin-bottom: 0">
          <font face="Courier New" SIZE="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </font><font SIZE="2"><font face="Courier New">&nbsp;Tester.TestLimit 
          was less than or equal to zero.&quot; );</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          m_TestLimit = </font></font><font SIZE="2" face="Courier New">value</font><font SIZE="2"><font face="Courier New">;</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp; 
          }</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">}</font></p>
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">private int m_TestLimit = 1000;</font></td>
        </tr>
      </table>
      </center>
    </div>
	<p class="dtH4"><font face="Arial">The CompileAndTest method compiles the 
    specified CodeFile and tests each IIndividual found in the specified 
    GenerationHistory.&nbsp; GenerationHistory will be updated with the results 
    of this test.&nbsp; The first step is to ensure that the BaseClassNamespace 
    and GenerationHistory are not null.&nbsp; Then the Environment(s) are 
    instantiated.&nbsp; Next, the Population code file is compiled and any 
    errors are outputted.&nbsp; Afterwards, each individual is instantiated and 
    tested in each environment.&nbsp; Finally, GenerationHistory is updated and 
    cleanup is performed.</font></p>
	<div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="90%" id="AutoNumber9">
        <tr>
          <td width="100%"><font SIZE="2">
          <p style="margin-top: 0; margin-bottom: 0"></font>
          <font SIZE="2" face="Courier New">public void</font><font SIZE="2"><font face="Courier New"> 
          CompileAndTest() {</font></p>
          <p style="margin-top: 0; margin-bottom: 0"><font face="Courier New">&nbsp;&nbsp;&nbsp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -