Skip to content

Commit

Permalink
Merge pull request ZIB-IOL#95 from ZIB-IOL/portfolio-fix
Browse files Browse the repository at this point in the history
Portfolio fix
  • Loading branch information
dhendryc authored Aug 31, 2022
2 parents 4f37e1a + 3157734 commit d6f8400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/portfolio.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ using Distributions
import MathOptInterface
const MOI = MathOptInterface

n = 15

n = 30
const ri = rand(n)
const ai = rand(n)
const Ωi = rand(Float64)
Expand Down
3 changes: 2 additions & 1 deletion src/problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ function is_linear_feasible_subroutine(o::MOI.ModelLike, ::Type{F}, ::Type{S}, v
set = MOI.get(o, MOI.ConstraintSet(), c_idx)
@debug("Constraint: $(F)-$(S) $(func) = $(val) in $(set)")
dist = MOD.distance_to_set(MOD.DefaultDistance(), val, set)
if dist > 1e-6
scip_tol = MOI.get(o, MOI.RawOptimizerAttribute("numerics/feastol"))
if dist > 20.0 * scip_tol
return false
end
end
Expand Down

0 comments on commit d6f8400

Please sign in to comment.