Skip to content

Commit 9a063c5

Browse files
Merge pull request #947 from SciML/fix-integer-bounds
Fix integer bounds error in OptimizationMOI
2 parents 2327311 + 428ed32 commit 9a063c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/OptimizationMOI/src/nlp.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,10 @@ function _add_moi_variables!(opt_setup, evaluator::MOIOptimizationNLPEvaluator)
491491

492492
for i in 1:num_variables
493493
if evaluator.lb !== nothing && evaluator.lb[i] > -Inf
494-
MOI.add_constraint(opt_setup, θ[i], MOI.GreaterThan(evaluator.lb[i]))
494+
MOI.add_constraint(opt_setup, θ[i], MOI.GreaterThan(Float64(evaluator.lb[i])))
495495
end
496496
if evaluator.ub !== nothing && evaluator.ub[i] < Inf
497-
MOI.add_constraint(opt_setup, θ[i], MOI.LessThan(evaluator.ub[i]))
497+
MOI.add_constraint(opt_setup, θ[i], MOI.LessThan(Float64(evaluator.ub[i])))
498498
end
499499
if evaluator.int !== nothing && evaluator.int[i]
500500
if evaluator.lb !== nothing && evaluator.lb[i] == 0 &&

0 commit comments

Comments
 (0)