Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/branchandbound.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ end
function _branch_bound(bab::BranchAndBoundEnclosure, f::Function, X::Interval_or_IntervalBox, df;
initial=emptyinterval(first(X)),
cnt=1)
dfX = df(X)
range_extrema, flag = _monotonicity_check(f, X, dfX)
flag && return hull(range_extrema, initial)
if !isnothing(df)
dfX = df(X)
range_extrema, flag = _monotonicity_check(f, X, dfX)
flag && return hull(range_extrema, initial)
end

fX = f(X) # TODO: allow user to choose how to evaluate this (mean value, natural enclosure)
# if tolerance or maximum number of iteration is met, return current enclosure
Expand Down