Minor update to the matlab interface
This commit is contained in:
parent
de35b3438b
commit
649f8e6390
@ -1,18 +1,23 @@
|
||||
function [sols, fits] = getMultipleResults(int)
|
||||
% If a post processing step was performed: return a set of
|
||||
% optimization solutions if the run has been finished, or
|
||||
% After optimization or post processing: return a set of
|
||||
% optimization solutions if the run has been finished. Returns
|
||||
% a single intermediate solution if the run has not finished yet or an
|
||||
% empty array if there is no intermediate solution yet.
|
||||
|
||||
if (isFinished(int))
|
||||
sols = int.resultArr;
|
||||
sArr = int.resultArr;
|
||||
else
|
||||
sols = int.mp.getIntermediateResult();
|
||||
sArr(1) = int.mp.getIntermediateResult();
|
||||
end
|
||||
|
||||
fits=zeros(size(sols,1),1);
|
||||
fits=zeros(size(sArr,1),1);
|
||||
|
||||
for i=1:size(sols,1)
|
||||
for i=1:size(sArr,1)
|
||||
if (isempty(int.range)) % binary case
|
||||
sols(i,:)=convertUnsignedJE(int, sArr(i));
|
||||
else
|
||||
sols(i,:)=sArr(i,:);
|
||||
end;
|
||||
%disp(sols(i,:));
|
||||
if (isempty(int.args))
|
||||
fits(i) = feval(int.f, sols(i,:));
|
||||
|
@ -5,9 +5,9 @@ function [sol, fit] = getResult(int)
|
||||
% [sol, fit] = getResult(int)
|
||||
|
||||
if (isFinished(int))
|
||||
sol = int.result;
|
||||
sol = int.result';
|
||||
else
|
||||
sol = int.mp.getIntermediateResult();
|
||||
sol = int.mp.getIntermediateResult()';
|
||||
end
|
||||
|
||||
if (isempty(sol))
|
||||
|
Loading…
x
Reference in New Issue
Block a user