Maybe you can try to implement http://www.mathworks.nl/matlabcentral/fileexchange/45490-generate-k-random-numbers-which-sum-m inside the godlike algortihm when the new population is created.

Best regards.

15 Nov 2012

Pareto Front
Two efficient algorithms to find Pareto Front
Author: Yi Cao

Hello

Something strange happened I'm working on Matlab 7.11 under Win 7 (32b). On hp intel i5.

Then i used the mex file given and the example works really fine. But then i decided to follow what is stated in other requirements. It compiles and runs properly no errors. The issue is that the reported CPU times after recompiling are double. Isn't that odd? Obviously i'll use the original file from the posts, but the new compilations shouldn't be more efficient?. What am i missing here?

I have to use this optimization algorithm to minimizing a objective function like this:
error = ((((a./(a+b))-mean).^2)./(mean.^2))+(((((a.*b)./((a+b+1).*((a+b).^2)))-variance).^2)./(variance.^2))+(((((2.*(b-a).*(sqrt(a+b+1)))./((a+b+2).*(sqrt(a.*b))))-skewness).^2)./(skewness.^2))
This is a function beta with parameters a and b. I want to calculate a and b minimizing this fuction error.
I dont know how I can impose the limits of a and b in the algorithm. The limits are, a>0,b>0 and b>0.
Thanks all

Hello again,
Just a comment: in addition to the modification I made below, I also require that a significant portions of the individual parameters be zero (which I call MAXNUMPAR), i.e. pop{1}.individuals = [ 0 0.2 0 0 0.5 0 0.3 ];. I initially included this change in the line before my previous modification.
This seems to cause problems with the genetic algorithm, as it returns NANs in some of the individuals.
I correct this by moving my MAXNUMPAR to before pop{i}.iterate;.
I'm not sure why the genetic algorithm does this (possibly combinations of the individuals results in an individual of all zeros), and isn't in need of a fix. Just an FYI in case someone else ever tries to do the same thing.
Again, this download is awesome.

Thank you, Mario.
Thank you, Rody.
I managed to get the modification I wanted to GODLIKE, which makes me very glad, because this program seems very awesome.
To do it, I went to line 198 of GODLIKE and inserted the following code
X = size(pop{i}.individuals,1);
for j = 1:X
pop{i}.individuals(j,:) = ...
NORMTOTOTAL(pop{i}.individuals(j,:)));
end
clear X
where NORMTOTOTAL is a simple function I wrote to normalize each number in a row vector to the sum of the entire vector.
Thank you!

@Joshua,
No, there is no easy way in GODLIKE to implement linear constraints like the one you have; GODLIKE is restricted to problems with bound-constraints only. It is fairly easy to devise a workaround (as suggested by Mario Castro Gama), however, if your problem is not too large, it might be easier to give a try to my minimize() function (just search my author page here on the FEX). This function also supports (non)linear constraints, and has global optimization capability (albeit rudimentary compared to GODLIKE).
Hope this helps, Rody Oldenhuis

Hello Joshua
Maybe you can try to implement http://www.mathworks.nl/matlabcentral/fileexchange/45490-generate-k-random-numbers-which-sum-m inside the godlike algortihm when the new population is created.
Best regards.

Comment only