<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/234971</link>
    <title>MATLAB Central Newsreader - GA outputs</title>
    <description>Feed for thread: GA outputs</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 21 Aug 2008 20:43:02 -0400</pubDate>
      <title>GA outputs</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/234971#596821</link>
      <author>Dave Brackett</author>
      <description>Does anyone know how I can pass variables back from a &lt;br&gt;
genetic algorithm (GA) optimisation function to the m file &lt;br&gt;
that initiated the GA?&lt;br&gt;
&lt;br&gt;
I am using anonymous functions to pass variables to the GA, &lt;br&gt;
but cannot work out how to get variables back from the GA. &lt;br&gt;
It appears that the only allowable outputs are &lt;br&gt;
[x,fval,exitflag,output,population,scores].&lt;br&gt;
&lt;br&gt;
One way could be to write each variable to file and then &lt;br&gt;
read them back from that file, but that is very &lt;br&gt;
inefficient. I am trying to avoid using global variables as &lt;br&gt;
I run into problems with these when running the GA in &lt;br&gt;
parallel using the parallel computing toolbox. &lt;br&gt;
&lt;br&gt;
Hopefully someone can point me in the right direction. &lt;br&gt;
Thanks!</description>
    </item>
    <item>
      <pubDate>Tue, 26 Aug 2008 13:27:01 -0400</pubDate>
      <title>Re: GA outputs</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/234971#597404</link>
      <author>Dave Brackett</author>
      <description>&quot;Dave Brackett&quot; &amp;lt;davebrackett@hotmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;g8kk0m$fa6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Does anyone know how I can pass variables back from a &lt;br&gt;
&amp;gt; genetic algorithm (GA) optimisation function to the m &lt;br&gt;
file &lt;br&gt;
&amp;gt; that initiated the GA?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am using anonymous functions to pass variables to the &lt;br&gt;
GA, &lt;br&gt;
&amp;gt; but cannot work out how to get variables back from the &lt;br&gt;
GA. &lt;br&gt;
&amp;gt; It appears that the only allowable outputs are &lt;br&gt;
&amp;gt; [x,fval,exitflag,output,population,scores].&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; One way could be to write each variable to file and then &lt;br&gt;
&amp;gt; read them back from that file, but that is very &lt;br&gt;
&amp;gt; inefficient. I am trying to avoid using global variables &lt;br&gt;
as &lt;br&gt;
&amp;gt; I run into problems with these when running the GA in &lt;br&gt;
&amp;gt; parallel using the parallel computing toolbox. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hopefully someone can point me in the right direction. &lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
I have found a workaround for this by recalculating based &lt;br&gt;
on the GA output x. This only adds minor overhead as it is &lt;br&gt;
recalculated only once at the very end of the optimisation &lt;br&gt;
run. This then eliminates the need to pass any other &lt;br&gt;
outputs from the GA to the initiating function.</description>
    </item>
  </channel>
</rss>

