Skip to content

Commit

Permalink
Fixes #445
Browse files Browse the repository at this point in the history
  • Loading branch information
johanlofberg committed Sep 18, 2017
1 parent 28fea7b commit 678fc23
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions extras/bisection_core.m
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
disp(['Selected solver: ' options.solver]);
disp('Iteration Lower bound Test Upper bound Gap Status at test');
end
working_sol = [];
while upper - lower > options.bisection.absgaptol
test = (upper + lower)/2;
solvertime = tic;
Expand Down Expand Up @@ -163,6 +164,10 @@
if options.bisection.switchedsign
optimal = -optimal;
end
% Assign computed solution
assign(x,working_sol);
assign(Objective,optimal);
if isempty(working_sol)
diagnostic.problem = 1;
else
% Assign computed solution
assign(x,working_sol);
assign(Objective,optimal);
end

0 comments on commit 678fc23

Please sign in to comment.