diff --git a/Project.toml b/Project.toml index b49bfdc7..e6dbf238 100644 --- a/Project.toml +++ b/Project.toml @@ -41,7 +41,7 @@ MINLPTests = "0.5.2" MathOptInterface = "~1" McCormick = "0.13" NaNMath = "0.3.5, 1.0" -PrettyTables = "~1" +PrettyTables = "~2" Reexport = "~0.2, ~1" Requires = "~1" SpecialFunctions = "~1, ~2" diff --git a/src/eago_optimizer/functions/nonlinear/apriori_relax/affine_arithmetic.jl b/src/eago_optimizer/functions/nonlinear/apriori_relax/affine_arithmetic.jl index 93882618..238c5cd0 100644 --- a/src/eago_optimizer/functions/nonlinear/apriori_relax/affine_arithmetic.jl +++ b/src/eago_optimizer/functions/nonlinear/apriori_relax/affine_arithmetic.jl @@ -248,7 +248,7 @@ end MC(x::MCAffPnt{N,T}) where {N,T<:RelaxTag} = x.v MC(x::MC{N,T}) where {N, T<:RelaxTag} = x -relax_info(s::RelaxAA, n::Int, t::T) where {N,T} = MCAffPnt{n,T} +relax_info(s::RelaxAA, n::Int, t::T) where T = MCAffPnt{n,T} zero(::Type{MCAffPnt{N,T}}) where {N,T} = MCAffPnt{N,T}(zero(MC{N,T}), zero(AffineEAGO{N})) zero(x::MCAffPnt{N,T}) where {N,T} = MCAffPnt{N,T}(zero(x.v), zero(x.box)) @@ -297,7 +297,7 @@ function cut(x::MC{N,T}, z::MCAffPnt{N,T}, v::VariableValues, ϵ::Float64, s::Ve return x end -function varset(::Type{MCAffPnt{N,T}}, i, x_cv, x_cc, l, u) where {V,N,T<:RelaxTag} +function varset(::Type{MCAffPnt{N,T}}, i, x_cv, x_cc, l, u) where {N,T<:RelaxTag} v = seed_gradient(i, Val(N)) v_Intv = Interval{Float64}(l, u) v_mc = MC{N,T}(x_cv, x_cc, v_Intv, v, v, false) diff --git a/src/eago_optimizer/functions/nonlinear/composite_relax/composite_relax.jl b/src/eago_optimizer/functions/nonlinear/composite_relax/composite_relax.jl index 5daf617c..88c20336 100644 --- a/src/eago_optimizer/functions/nonlinear/composite_relax/composite_relax.jl +++ b/src/eago_optimizer/functions/nonlinear/composite_relax/composite_relax.jl @@ -284,5 +284,5 @@ function display_table!(g::DAT, b::RelaxCache{V,N,T}) where {V,N,T<:RelaxTag} val = [b._is_num[i] ? b._num[i] : b._set[i] for i in 1:nc] exr = [display_expr(g, i) for i in 1:nc] data = hcat(exr, b._is_num, val) - show(pretty_table(data, header = ["Expr", "Is Num", "Val"]; show_row_number = true)) + pretty_table(data, header = ["Expr", "Is Num", "Val"]; show_row_number = true) end \ No newline at end of file diff --git a/src/eago_optimizer/functions/nonlinear/composite_relax/forward_propagation.jl b/src/eago_optimizer/functions/nonlinear/composite_relax/forward_propagation.jl index 07ebf685..b1a0a1c7 100644 --- a/src/eago_optimizer/functions/nonlinear/composite_relax/forward_propagation.jl +++ b/src/eago_optimizer/functions/nonlinear/composite_relax/forward_propagation.jl @@ -15,7 +15,7 @@ xset_ynum(b, x, y) = !is_num(b, x) && is_num(b, y) xy_num(b, x, y) = is_num(b, x) && is_num(b, y) xyset(b, x, y) = !(is_num(b, x) || is_num(b, y)) -function varset(::Type{MC{N,T}}, i, x_cv, x_cc, l, u) where {V,N,T<:RelaxTag} +function varset(::Type{MC{N,T}}, i, x_cv, x_cc, l, u) where {N,T<:RelaxTag} v = seed_gradient(i, Val(N)) return MC{N,T}(x_cv, x_cc, Interval{Float64}(l, u), v, v, false) end diff --git a/src/eago_optimizer/functions/nonlinear/composite_relax/utilities.jl b/src/eago_optimizer/functions/nonlinear/composite_relax/utilities.jl index 66619ef3..c8787844 100644 --- a/src/eago_optimizer/functions/nonlinear/composite_relax/utilities.jl +++ b/src/eago_optimizer/functions/nonlinear/composite_relax/utilities.jl @@ -57,7 +57,7 @@ function expand_set(::Type{MC{N2,T}}, x::MC{N1,T}, fsparse::Vector{Int}, subspar return MC{N2,T}(x.cv, x.cc, x.Intv, cv_grad, cc_grad, x.cnst) end -function set_value_post(z::MC{N,T}, v::VariableValues{Float64}, s::Vector{Int}, ϵ::Float64) where {V,N,T<:RelaxTag} +function set_value_post(z::MC{N,T}, v::VariableValues{Float64}, s::Vector{Int}, ϵ::Float64) where {N,T<:RelaxTag} l = z.cv u = z.cc lower_refinement = true diff --git a/src/eago_optimizer/optimize/nonconvex/display.jl b/src/eago_optimizer/optimize/nonconvex/display.jl index 4c5835f6..45d72ef0 100644 --- a/src/eago_optimizer/optimize/nonconvex/display.jl +++ b/src/eago_optimizer/optimize/nonconvex/display.jl @@ -7,7 +7,7 @@ ############################################################################# # src/eago_optimizer/display.jl # Functions used to print information about solution routine to console. -# Printing is done with reference to the input problem is there is any +# Printing is done with reference to the input problem if there is any # ambiguity. ############################################################################# diff --git a/src/eago_optimizer/optimize/nonconvex/relax.jl b/src/eago_optimizer/optimize/nonconvex/relax.jl index 64e34085..0f5e8fdd 100644 --- a/src/eago_optimizer/optimize/nonconvex/relax.jl +++ b/src/eago_optimizer/optimize/nonconvex/relax.jl @@ -73,7 +73,7 @@ Default routine for relaxing quadratic constraint `func < 0.0` on node `n`. Takes affine bounds of convex part at point `x0` and secant line bounds on concave parts. """ -function affine_relax_quadratic!(m::GlobalOptimizer, func::SQF, buffer::Dict{Int,Float64}, saf::SAF) where {R,S,Q<:ExtensionType} +function affine_relax_quadratic!(m::GlobalOptimizer, func::SQF, buffer::Dict{Int,Float64}, saf::SAF) quadratic_constant = func.constant