<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>help with allele set bounds</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks for a terrific resource!</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I'm using the Steady State GA with a</FONT> <FONT SIZE=2 FACE="Courier New">GARealAlleleSetArray genome.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">here is a code snippet from GARealGenome.cpp from</FONT> <FONT SIZE=2 FACE="Courier New">GARealBlendCrossover():</FONT>

<BR><FONT SIZE=2 FACE="Courier New">[...]</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">float</FONT><FONT SIZE=2 FACE="Courier New"> lo = (GAMin(mom.gene(i), dad.gene(i))) - 0.5*dist;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">float</FONT><FONT SIZE=2 FACE="Courier New"> hi = (GAMax(mom.gene(i), dad.gene(i))) + 0.5*dist;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sis.gene(i, GARandomFloat(lo, hi));</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bro.gene(i, GARandomFloat(lo, hi));</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">[...]</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">In my experience, the above code allows sis.gene(i) and bro.gene(i) to </FONT>

<BR><FONT SIZE=2 FACE="Courier New">take on values that are not within the defined allele set for these genes</FONT>

<BR><FONT SIZE=2 FACE="Courier New">because lo and hi are allowed to exceed the set bounds.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">In my application, a particular gene is defined as an set [10,2000]. If </FONT>

<BR><FONT SIZE=2 FACE="Courier New">mom and dad differ by 500, for example, and the min of mom and dad is 100, </FONT>

<BR><FONT SIZE=2 FACE="Courier New">lo will be -250 and sis and bro have the potential to assign negative values </FONT>

<BR><FONT SIZE=2 FACE="Courier New">to this gene, which are outside the defined range of [10, 2000].</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">I'm not sure of the best way to address this problem.</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Is there an easy way to know the allele bounds in this subroutine?</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Any suggestions would be much appreciated!</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">Lorena</FONT>
</P>

</BODY>
</HTML>