<div dir="ltr"><font color="#000000" face="Times New Roman" size="3">
</font><font color="#000000" face="Times New Roman" size="3">





<div style="margin:0cm 0cm 8pt"><font face="Calibri">Dear <em><font face="Tahoma">Flávio</font></em></font></div><div style="margin:0cm 0cm 8pt"><font face="Calibri">Actually, I’m going to learn saving results in a data file
as well as linking C++ libs &amp; programs and GAlib.</font></div>

<p style="margin:0cm 0cm 8pt"><font face="Calibri">Assume, I’d like to obtain minimum of a two-variable
function by GA. <span style="mso-spacerun: yes;"> </span>The expression for this
function is f(x,y)=x sin (4x) +1.1 y sin (2y); that 0≤x≤10 and 0≤y≤10.<span style="mso-spacerun: yes;">  </span>My program is consisted of two parts as
follows:</font></p>

<ol style="list-style-type:decimal;direction:ltr"><li style="color:rgb(0,0,0);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt;font-style:normal;font-weight:normal"><p style="color:rgb(0,0,0);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt;font-style:normal;font-weight:normal;margin-top:0cm;margin-bottom:0pt">A GAlib core program.</p></li><li style="color:rgb(0,0,0);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt;font-style:normal;font-weight:normal"><p style="color:rgb(0,0,0);font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;font-size:11pt;font-style:normal;font-weight:normal;margin-top:0cm;margin-bottom:8pt">An executable C++-source
code called calculation.c calculating f(x,y) for different x,y values. </p></li></ol>



<p style="margin:0cm 0cm 8pt"><font face="Calibri">I present my questions as follows:</font></p>

<p style="margin:0cm 0cm 8pt"><font face="Calibri">1-I want to obtain x,y value in which f(x,y) is minimized by
GA and then saving (x,y) into a txt file as output result.</font></p>

<p style="margin:0cm 0cm 8pt"><font face="Calibri">2-How can I link two C++ program (GAlib and calculation.c)
code together by bash scripting in Ubuntu?</font></p>

<p style="margin:0cm 0cm 8pt"><font face="Calibri">My first question is same in my previous thread.</font></p>

<p style="margin:0cm 0cm 8pt"><font face="Calibri">Thanks again for any help &amp; consideration.</font></p>

</font><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 16, 2015 at 6:20 PM, Flávio Grassi <span dir="ltr">&lt;<a href="mailto:flaviograssi.fg@gmail.com" target="_blank">flaviograssi.fg@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr">Hello Mehdi.<div><br></div><div>I&#39;m a novice in GAlib too but, as far as I know, you just need to insert an &quot;getchar();&quot; instruction into the &quot;main&quot; function, at the very bottom of it:</div><div><br></div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap"><i>int
main(int argc, char **argv)
{</i></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><i>...</i></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><i>...</i></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><i>...</i></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><i><span style="color:rgb(34,34,34);font-family:arial,sans-serif;white-space:normal"><b>getchar();</b></span><br></i></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;white-space:normal"><i>}</i></span></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;white-space:normal"><i><br></i></span></pre><pre style="color:rgb(0,0,0);white-space:pre-wrap"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;white-space:normal"><i>Regards.</i></span></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-08-16 2:49 GMT-03:00 Mehdi Asghari <span dir="ltr">&lt;<a href="mailto:mehdiasgh@gmail.com" target="_blank">mehdiasgh@gmail.com</a>&gt;</span>:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div><div class="h5"><div dir="ltr"><div><div>Hi .<br></div>I&#39;m new in GAlib.  Excuse me in advance if my first question is simple. How Can I observe output of an example after compiling it.<br></div>Thanks for any help.<br></div>
<br></div></div>_______________________________________________<br>
galib mailing list<br>
<a href="mailto:galib@mit.edu" target="_blank">galib@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/galib" target="_blank" rel="noreferrer">http://mailman.mit.edu/mailman/listinfo/galib</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><font face="tahoma,sans-serif"><em>Flávio Grassi</em></font></div>
</font></span></div>
</blockquote></div><br></div></div>