Skip to content
Snippets Groups Projects
Commit 97229177 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

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

Caused occasional crashes
parent 932e5f94
Branches
No related tags found
1 merge request!1624simplex_optimization_routine.m: account for penalty indicator being t…
...@@ -186,7 +186,7 @@ if verbose ...@@ -186,7 +186,7 @@ if verbose
skipline() skipline()
end end
initial_point = x; initial_point = x;
[initial_score,junk1,junk2,nopenalty] = feval(objective_function,x,varargin{:}); [initial_score,junk1,nopenalty] = feval(objective_function,x,varargin{:});
if ~nopenalty if ~nopenalty
error('simplex_optimization_routine:: Initial condition is wrong!') error('simplex_optimization_routine:: Initial condition is wrong!')
else else
...@@ -537,7 +537,7 @@ for j = 1:n ...@@ -537,7 +537,7 @@ for j = 1:n
end end
v(:,j+1) = y; v(:,j+1) = y;
x = 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 if check_delta
while ~nopenalty_flag while ~nopenalty_flag
if y(j)~=0 if y(j)~=0
...@@ -553,7 +553,7 @@ for j = 1:n ...@@ -553,7 +553,7 @@ for j = 1:n
end end
v(:,j+1) = y; v(:,j+1) = y;
x = 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 end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment