Skip to content

Binary variables with bounds are incorrect #171

@odow

Description

@odow

See https://discourse.julialang.org/t/xpress-julia-api-has-bug-with-fixing-variables/82895/4

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

julia> @variable(model, x, Bin)
x

julia> @objective(model, Max, x)
x

julia> fix(x, 0; force = true)

julia> optimize!(model)
FICO Xpress v8.13.3, Hyper, solve started 0:09:54, Jun 17, 2022
Heap usage: 74KB (peak 74KB, 360KB system)
Maximizing MILP  using up to 8 threads, with these control settings:
OUTPUTLOG = 1
MPSNAMELENGTH = 64
CALLBACKFROMMASTERTHREAD = 1
Original problem has:
         0 rows            1 cols            0 elements         1 globals
Presolved problem has:
         0 rows            1 cols            0 elements         1 globals
Presolve finished in 0 seconds
Heap usage: 75KB (peak 89KB, 362KB system)

Coefficient range                    original                 solved
  Coefficients   [min,max] : [      0.0,       0.0] / [      0.0,       0.0]
  RHS and bounds [min,max] : [ 1.00e+00,  1.00e+00] / [ 1.00e+00,  1.00e+00]
  Objective      [min,max] : [ 1.00e+00,  1.00e+00] / [ 1.00e+00,  1.00e+00]
Autoscaling applied standard scaling

Will try to keep branch and bound tree memory usage below 10.7GB
 *** Solution found:      .000000   Time:   0    Heuristic: T ***
 *** Solution found:     1.000000   Time:   0    Heuristic: T ***
STOPPING - MIPRELSTOP target reached (MIPRELSTOP=0.0001  gap=-0).
 *** Search completed ***
Uncrunching matrix
Final MIP objective                   : 1.000000000000000e+00
Final MIP bound                       : 1.000000000000000e+00
  Solution time / primaldual integral :         0s/ 92.741939%
  Number of solutions found / nodes   :         2 /         0
  Max primal violation      (abs/rel) :       0.0 /       0.0
  Max integer violation     (abs    ) :       0.0

julia> value(x)
1.0

There are tests for this in MOI.
https://github.com/jump-dev/MathOptInterface.jl/blob/b7600485d29d6cc72e5904d03a4fd47b50cac783/src/Test/test_variable.jl#L395-L419
Is it not being run for some reason?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions