Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new release is probably warranted - is_valid() is broken in v0.11.14 #283

Open
LebedevRI opened this issue Jan 19, 2024 · 0 comments
Open

Comments

@LebedevRI
Copy link

(@v1.10) pkg> add SCIP
   Resolving package versions...
    Updating `~/.julia/environments/v1.10/Project.toml`
  [82193955] + SCIP v0.11.14
    Updating `~/.julia/environments/v1.10/Manifest.toml`
  [82193955] + SCIP v0.11.14
  [68e3532b] + Ncurses_jll v6.4.1+0
  [05236dd9] + Readline_jll v8.2.1+0
⌃ [fc9abe76] + SCIP_PaPILO_jll v800.0.301+0
⌃ [e5ac4fe4] + SCIP_jll v800.0.301+0
  [508c9074] + bliss_jll v0.77.0+1
⌅ [28df3c45] + boost_jll v1.76.0+1
  [1317d2d5] + oneTBB_jll v2021.9.0+0
  [781609d7] + GMP_jll v6.2.1+6
        Info Packages marked with ⌃ and ⌅ have new versions available. Those with ⌃ may be upgradable, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use `status --outdated -m`

julia> exit
exit (generic function with 2 methods)

julia> exit()
$ julia-dbg 
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0 (2023-12-25)
 _/ |\__'_|_|_|\__'_|  |  
|__/                   |

julia> using JuMP, SCIP


julia> model = Model(SCIP.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: SCIP

julia> @variable(model, 0 >= x >= 0, Int)
x

julia> @variable(model, 0 >= y >= 0, Int)
y

julia> @constraint(model, [x; y] in MOI.AllDifferent(2))
x ≠ y

julia> optimize!(model)
ERROR: KeyError: key (MathOptInterface.VariableIndex, MathOptInterface.ZeroOne) not found
Stacktrace:
  [1] getindex(h::Dict{Tuple{DataType, DataType}, Set{SCIP.ConsRef}}, key::Tuple{DataType, DataType})
    @ Base ./dict.jl:498
  [2] getindex(::Dict{Tuple{DataType, DataType}, Set{SCIP.ConsRef}}, ::Type, ::Type)
    @ Base ./abstractdict.jl:549
  [3] is_valid(o::SCIP.Optimizer, ci::MathOptInterface.ConstraintIndex{MathOptInterface.VariableIndex, MathOptInterface.ZeroOne})
    @ SCIP ~/.julia/packages/SCIP/S9mBb/src/MOI_wrapper/variable.jl:316
  [4] is_valid(b::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, ci::MathOptInterface.ConstraintIndex{MathOptInterface.VariableIndex, MathOptInterface.ZeroOne})
    @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/bridge_optimizer.jl:494
  [5] get_bounds(model::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, bounds_cache::Dict{MathOptInterface.VariableIndex, Tuple{Float64, Float64}}, x::MathOptInterface.VariableIndex)
    @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/3JqTJ/src/Utilities/variables.jl:119
  [6] final_touch(bridge::MathOptInterface.Bridges.Constraint.CountDistinctToMILPBridge{Float64, MathOptInterface.VectorOfVariables}, model::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer})
    @ MathOptInterface.Bridges.Constraint ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/Constraint/bridges/count_distinct.jl:240
  [7] _final_touch(bridges::OrderedCollections.OrderedSet{MathOptInterface.Bridges.Constraint.CountDistinctToMILPBridge{Float64, MathOptInterface.VectorOfVariables}}, model::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer})
    @ MathOptInterface.Bridges.Constraint ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/Constraint/map.jl:347
  [8] final_touch(map::MathOptInterface.Bridges.Constraint.Map, model::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer})
    @ MathOptInterface.Bridges.Constraint ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/Constraint/map.jl:354
  [9] final_touch(b::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer})
    @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/bridge_optimizer.jl:463
 [10] final_touch(b::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, index_map::MathOptInterface.Utilities.IndexMap)
    @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/bridge_optimizer.jl:468
 [11] default_copy_to(dest::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, src::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}})
    @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/3JqTJ/src/Utilities/copy.jl:509
 [12] copy_to(dest::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, src::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}})
    @ MathOptInterface.Bridges ~/.julia/packages/MathOptInterface/3JqTJ/src/Bridges/bridge_optimizer.jl:455
 [13] optimize!(dest::MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, src::MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}})
    @ MathOptInterface ~/.julia/packages/MathOptInterface/3JqTJ/src/MathOptInterface.jl:84
 [14] optimize!(m::MathOptInterface.Utilities.CachingOptimizer{MathOptInterface.Bridges.LazyBridgeOptimizer{SCIP.Optimizer}, MathOptInterface.Utilities.UniversalFallback{MathOptInterface.Utilities.Model{Float64}}})
    @ MathOptInterface.Utilities ~/.julia/packages/MathOptInterface/3JqTJ/src/Utilities/cachingoptimizer.jl:316
 [15] optimize!(model::Model; ignore_optimize_hook::Bool, _differentiation_backend::MathOptInterface.Nonlinear.SparseReverseMode, kwargs::@Kwargs{})
    @ JuMP ~/.julia/packages/JuMP/3EgBE/src/optimizer_interface.jl:448
 [16] optimize!(model::Model)
    @ JuMP ~/.julia/packages/JuMP/3EgBE/src/optimizer_interface.jl:409
 [17] top-level scope
    @ REPL[6]:1

julia> 


With master:

julia> using JuMP, SCIP

julia> model = Model(SCIP.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: SCIP

julia> @variable(model, 0 >= x >= 0, Int)
x

julia> @variable(model, 0 >= y >= 0, Int)
y

julia> @constraint(model, [x; y] in MOI.AllDifferent(2))
x ≠ y

julia> optimize!(model)
presolving:
presolving (1 rounds: 1 fast, 0 medium, 0 exhaustive):
 6 deleted vars, 6 deleted constraints, 0 added constraints, 3 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
presolving detected infeasibility
Presolving Time: 0.00

SCIP Status        : problem is solved [infeasible]
Solving Time (sec) : 0.00
Solving Nodes      : 0
Primal Bound       : +1.00000000000000e+20 (0 solutions)
Dual Bound         : +1.00000000000000e+20
Gap                : 0.00 %


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant