diff --git a/src/quadratic_approximations/epigraph.jl b/src/quadratic_approximations/epigraph.jl index a1f9c45..50bd449 100644 --- a/src/quadratic_approximations/epigraph.jl +++ b/src/quadratic_approximations/epigraph.jl @@ -111,9 +111,7 @@ function _add_epigraph_quadratic_approx!( meta, ) - # Precompute breakpoint values and upper bound (invariant across names and time steps) - step = delta / (n_breakpoints - 1) - breakpoints = [(x_min + (k - 1) * step) for k in 1:n_breakpoints] + # Precompute upper bound (invariant across names and time steps) z_ub = max(x_min^2, x_max^2) for name in names, t in time_steps diff --git a/test/test_dnmdt_approximations.jl b/test/test_dnmdt_approximations.jl index ad33ba2..ab1d72c 100644 --- a/test/test_dnmdt_approximations.jl +++ b/test/test_dnmdt_approximations.jl @@ -1,4 +1,5 @@ const DNMDT_META = "DNMDTTest" +const DNMDT_HYBS_META = "HybSTest" @testset "D-NMDT Univariate Approximation" begin @testset "Binary expansion correctness" begin @@ -445,11 +446,11 @@ end IOM._add_hybs_bilinear_approx!( setup_h.container, MockThermalGen, ["dev1"], 1:1, setup_h.x_var_container, setup_h.y_var_container, - 0.0, 1.0, 0.0, 1.0, depth, HYBS_META, + 0.0, 1.0, 0.0, 1.0, depth, DNMDT_HYBS_META, ) expr_h = IOM.get_expression( - setup_h.container, IOM.HybSProductExpression(), - MockThermalGen, HYBS_META, + setup_h.container, IOM.BilinearProductExpression(), + MockThermalGen, DNMDT_HYBS_META, ) JuMP.@objective(setup_h.jump_model, Max, expr_h["dev1", 1])