simplex_optimization_routine.m: account for penalty indicator being third output, not fourth one

Caused occasional crashes
time-shift
Johannes Pfeifer 2018-07-19 09:25:27 +02:00
parent 932e5f946c
commit 97229177b4
1 changed files with 3 additions and 3 deletions

View File

@ -186,7 +186,7 @@ if verbose
skipline()
end
initial_point = x;
[initial_score,junk1,junk2,nopenalty] = feval(objective_function,x,varargin{:});
[initial_score,junk1,nopenalty] = feval(objective_function,x,varargin{:});
if ~nopenalty
error('simplex_optimization_routine:: Initial condition is wrong!')
else
@ -537,7 +537,7 @@ for j = 1:n
end
v(:,j+1) = y;
x = y;
[fv(j+1),junk1,junk2,nopenalty_flag] = feval(objective_function,x,varargin{:});
[fv(j+1),junk1,nopenalty_flag] = feval(objective_function,x,varargin{:});
if check_delta
while ~nopenalty_flag
if y(j)~=0
@ -553,7 +553,7 @@ for j = 1:n
end
v(:,j+1) = y;
x = y;
[fv(j+1),junk1,junk2,nopenalty_flag] = feval(objective_function,x,varargin{:});
[fv(j+1),junk1,nopenalty_flag] = feval(objective_function,x,varargin{:});
end
end
end