Skip to content

Commit

Permalink
Test Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Mar 21, 2018
1 parent 5489b22 commit 9900740
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/D1_Interval_Test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@ solveBnB!(solver,model3)
c2 = getobjval(model3)
@test c2 == Inf

solver.Lower_Prob = (X,k,p,opt,temp) -> [opt[1](X).lo,mid.(X),true,[]]
solver.Upper_Prob = (X,k,p,opt,temp) -> [opt[1](X).hi,mid.(X),true,[]]
function test_check(S,M,X1,X2)
return (M.lbcnt == 2)
end
solver.Repeat_Chk = test_check
model5 = BnBModel(X)
solveBnB!(solver,model5)
c5 = getobjval(model5)
@test c5 == 1.5625

solver.Preprocess = (feas_Pre,nsBox,UBDg,k_int,pos,opt) -> (false,nsBox)
solver.Lower_Prob = (X,k,p,opt,temp) -> [opt[1](X).lo,mid.(X),true,[]]
solver.Upper_Prob = (X,k,p,opt,temp) -> [((k==2) ? opt[1](X).hi : Inf),mid.(X),false,[]]
model4 = BnBModel(X)
solveBnB!(solver,model4)
c3 = getobjval(model4)
@test c3 == Inf

solver.Lower_Prob = (X,k,p,opt,temp) -> [opt[1](X).lo,mid.(X),true,[]]
solver.Upper_Prob = (X,k,p,opt,temp) -> [opt[1](X).hi,mid.(X),true,[]]
solver.Repeat_Chk = (S,M,X1,X2) -> (M.lbcnt == 3)
model5 = BnBModel(X)
solveBnB!(solver,model5)
c5 = getobjval(model5)
@test c5 == 1.265625
end

0 comments on commit 9900740

Please sign in to comment.