<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2722.2800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>In the current project I'm working on, we wanted to 
be able to seed the population with a previous or artificial population from a 
file.&nbsp; The file was created using:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>for(int i=0; i&lt;ga.populationSize(); 
i++)//.size(); i++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;for(int j=0; j&lt;num_param; 
j++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;genname&lt;&lt;((GABin2DecGenome&amp;)(ga.population().individual(i))).phenotype(j);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;genname 
&lt;&lt; "\t";<BR>&nbsp;&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>where genname is the ofstream... pretty straight 
forward.&nbsp; The problem is when reopening the file and reseeding the 
population with this code:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>for(int i=0; i&lt;ga.populationSize(); 
i++)//.size(); 
i++)<BR>&nbsp;&nbsp;&nbsp;{&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;for(int j=0; 
j&lt;num_param; j++)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;double 
temp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;genname&gt;&gt;temp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((GABin2DecGenome&amp;)(ga.population().individual(i))).phenotype(j,temp);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I get a whole monster amount of debug output 
of:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>GACheckEncoding:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;specified value cannot be exactly represented 
with these bits.</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;desired: -4.569390&nbsp;&nbsp;&nbsp; actual: 
-4.569390&nbsp;&nbsp;&nbsp; discretization: 0.000153&nbsp;&nbsp;&nbsp; nbits: 
16&nbsp;&nbsp;&nbsp; min: -5.00000&nbsp;&nbsp;&nbsp; max: 5.00000</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Now I'm not doing this in an Initializer (which I 
probably should) but I didn't think that it was exactly necessary especially 
since filling the population this way wasn't going to be mandatory.&nbsp; 
Anyway.&nbsp; Any suggestions to cut out all of this extra output?&nbsp; And 
does this point to any detrimental effect that this may have?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks for your time,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>John Schloman</FONT></DIV></BODY></HTML>