Your workaround is not really one that I would use. Rather, you should make sure that you use that same upper bound reference point during the optimization. This way, the hypervolume will always increase.

15 Apr 2013

Ant System TSP Solver
A demo of an Ant System algorithm solving classical Traveling Salesman Problems.
Author: Johannes

Hi Zhang, I incorporated the change that you suggested. This was a bug.

27 Feb 2012

Ant System TSP Solver
A demo of an Ant System algorithm solving classical Traveling Salesman Problems.
Author: Johannes

Hi Chetak, I don't have a point set for Portugal. However, you could construct it yourself using, e.g., the data from

It seems you have found a small bug. Change at line 106 b to ub and it should be fine. I updated the file in this file-exchange (takes a few hours to update, though).

function [lm] = lebesgue_2D(F, ub)
% Efficient method for 2D objective function values
L = sortrows(F',1)';
l = length(L(1,:));
orig=ub(2);
lm = 0;
for i = 1:l
lm = lm + (min((L(1,i) - ub(1)),0) * min((L(2,i) - ub(2)),0));
if L(2,i)<=orig
ub(2) = L(2,i);
end
end
end

Please let me know if there is something fundamentally wrong with my change.

I was using your Lebesgue measure for comparing a few algorithm, but when very few (less than 10) points fall below the reference point, the algorithm produces a negative value. Originally I thought the negative values might happen when no points fall below the reference points and that I could simply replace the negative values with zeroes, but that does not seem to be the case.

Your workaround is not really one that I would use. Rather, you should make sure that you use that same upper bound reference point during the optimization. This way, the hypervolume will always increase.

I suggest changing lebesgue_2D to this:
function [lm] = lebesgue_2D(F, ub)
% Efficient method for 2D objective function values
L = sortrows(F',1)';
l = length(L(1,:));
orig=ub(2);
lm = 0;
for i = 1:l
lm = lm + (min((L(1,i) - ub(1)),0) * min((L(2,i) - ub(2)),0));
if L(2,i)<=orig
ub(2) = L(2,i);
end
end
end
Please let me know if there is something fundamentally wrong with my change.

Hi Johannes
I was using your Lebesgue measure for comparing a few algorithm, but when very few (less than 10) points fall below the reference point, the algorithm produces a negative value. Originally I thought the negative values might happen when no points fall below the reference points and that I could simply replace the negative values with zeroes, but that does not seem to be the case.

Hi Esmond,
Your workaround is not really one that I would use. Rather, you should make sure that you use that same upper bound reference point during the optimization. This way, the hypervolume will always increase.

Comment only