simplex_optimization_routine.m: account for penalty indicator being third output, not fourth one
Caused occasional crashestime-shift
parent
932e5f946c
commit
97229177b4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue