Skip to content
Snippets Groups Projects
Commit 342c5a44 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

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

Caused occasional crashes

(cherry picked from commit 97229177)
parent ef93d540
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment