scipopt / scip

SCIP - Solving Constraint Integer Programs
Other
392 stars 63 forks source link

Assertion failed with minimal quadratic model #70

Closed lperron closed 10 months ago

lperron commented 10 months ago

The model is in proto format. But it is small and readable, so it should be easy to rewrite. Note I use SCIP 8.0.4 with Soplex 6.0.4 without anything else (papilo, gmp, ...).

variable {
  name: "x"
  lower_bound: 0
  upper_bound: 10
  objective_coefficient: -6.28
  is_integer: true
}
variable {
  name: "y"
  lower_bound: -10
  upper_bound: 10
  objective_coefficient: 0.2
  is_integer: true
}
objective_offset: 9.8596
quadratic_objective {
  qvar1_index: [ 0 ]
  qvar2_index: [ 0 ]
  coefficient: [ 1 ]
}

Here is the CIP file:

STATISTICS
  Problem name     : 
  Variables        : 3 (0 binary, 2 integer, 0 implicit integer, 1 continuous)
  Constraints      : 0 initial, 1 maximal
OBJECTIVE
  Sense            : minimize
  Offset           : +9.8596
VARIABLES
  [integer] <x0>: obj=-6.28, original bounds=[0,10]
  [integer] <x1>: obj=0.2, original bounds=[-10,10]
  [continuous] <x2>: obj=1, original bounds=[-inf,+inf]
CONSTRAINTS
  [nonlinear] <c0>: (<x0>)^2-<x2> == 0;
END

Running this in debug mode outputs:

feasible solution found by trivial heuristic after 0.0 seconds, objective value 9.859600e+00
presolving:
(round 1, fast)       1 del vars, 0 del conss, 0 add conss, 2 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 2, fast)       1 del vars, 0 del conss, 0 add conss, 4 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 3, fast)       1 del vars, 0 del conss, 0 add conss, 7 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
(round 4, fast)       1 del vars, 0 del conss, 0 add conss, 10 chg bounds, 0 chg sides, 0 chg coeffs, 0 upgd conss, 0 impls, 0 clqs
Assertion failed: (SCIPisRelEQ(scip, exprhdlrinterval.inf, SCIPexprGetActivity(expr).inf)), function forwardPropExpr, file cons_nonlinear.c, line 2402.
svigerske commented 10 months ago

I know what is happening here. It is harmless. I have a proper fix to prevent the assert to come up, but it will still need time to get here. In the meanwhile, you can take out the assert as a workaround.