Skip to content

Commit

Permalink
Extended Div Simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Mar 25, 2018
1 parent 9900740 commit 0d6163d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
20 changes: 14 additions & 6 deletions src/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,28 @@ function solveBnB!(x::BnBSolver,y::BnBModel)
feas_Post::Bool = true
if (k_int == 0)
#println("pre-check")
x.Preprocess(feas_Pre,nsBox,y.UBDg,k_int,pos,x.opt)
nsBox1 = copy(nsBox)
yUBDg1 = copy(y.UBDg)
yLBDg1 = copy(y.LBDg)
kint1 = copy(k_int)
pos1 = copy(pos)
xopt1 = copy(x.opt)
x.Preprocess(feas_Pre,nsBox1,yUBDg1,kint1,pos1,xopt1,LBDn,UBDn,x,y)
#println("preprocess-check")
LBD_valt, LBD_solt, LBD_feast, temp_objtL = x.Lower_Prob(nsBox,k_int,pos,x.opt,y.UBDg)
LBD_valt, LBD_solt, LBD_feast, temp_objtL = x.Lower_Prob(nsBox1,kint1,pos1,xopt1,yUBDg1)
#println("lower-check")
UBD_valt, UBD_solt, UBD_feast, temp_objtU = x.Upper_Prob(nsBox,k_int,pos,x.opt,y.UBDg)
UBD_valt, UBD_solt, UBD_feast, temp_objtU = x.Upper_Prob(nsBox1,kint1,pos1,xopt1,yUBDg1)
#println("upper-check")
x.Postprocess(feas_Post,nsBox,k_int,pos,x.opt,
temp_objtL,temp_objtU,y.LBDg,y.UBDg)
x.Postprocess(feas_Post,nsBox1,kint1,pos1,xopt1,
temp_objtL,temp_objtU,yLBDg1,yUBDg1)
#println("postprocess-check")
end
feas_Pre = true
feas_Post = true

# performs prepocessing and times
tic()
feas_Pre,nsBox = x.Preprocess(feas_Pre,nsBox,y.UBDg,k_int,pos,x.opt)
feas_Pre,nsBox = x.Preprocess(feas_Pre,nsBox,y.UBDg,k_int,pos,x.opt,LBDn,UBDn,x,y)
push!(y.Pretime,y.Pretime[end]+toq())

UBD_feas = false
Expand Down
3 changes: 2 additions & 1 deletion src/src/utils/Processing.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function default_pre(feas::Bool,X::Vector{Interval{Float64}},UBD::Float64,
k::Int64,pos::Int64,opt)
k::Int64,pos::Int64,opt,LBDn::Float64,UBDn::Float64,x::BnBSolver,
y::BnBModel)
return feas,X
end

Expand Down

0 comments on commit 0d6163d

Please sign in to comment.