Commit 97229177 authored by Johannes Pfeifer 's avatar Johannes Pfeifer

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

Caused occasional crashes
parent 932e5f94
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment