1

I am new to using or-tools and I have been tasked with minimizing a quadratic objective function with lots of IntVar variables. I don't know where to start breaking down what the problem could be concerning an infeasable model and welcome any tips to begin.

I've watched several videos about using or tools and experimented in a test file with a smaller scale but my main problem results in the infeasable model. The videos/experiments I've done have less variables which I am thinking is the issue but, again, this is my first time using OR-tools.

here is the output from when I run the model:

Starting CP-SAT solver v9.6.2534 Parameters: log_search_progress: true enumerate_all_solutions: true Setting number of workers to 1

Initial optimization model '': (model_fingerprint: 0x8f376cd881ed44f1) #Variables: 214 (#ints:1 in objective)

  • 126 Booleans in [0,1]
  • 2 in [-100000,100000]
  • 84 in [0,96]
  • 2 in [0,2000000] #kIntProd: 4004

Starting presolve at 0.00s Unsat after presolving constraint #1142 (warning, dump might be inconsistent): int_prod { target { vars: 214 coeffs: 3249 offset: 3249 } exprs { vars: 212 coeffs: 570 offset: -102 } exprs { vars: 212 coeffs: 570 offset: -102 } }

Presolve summary:

  • 2 affine relations were detected.
  • rule 'affine: new relation' was applied 2 times.
  • rule 'int_prod: divide product by constant factor' was applied 2 times.
  • rule 'int_prod: linearize product by constant.' was applied 1140 times.
  • rule 'int_prod: removed constant expressions.' was applied 1140 times.
  • rule 'int_square: reduced target domain.' was applied 2 times.
  • rule 'linear: remapped using affine relations' was applied 1 time.
  • rule 'presolve: iteration' was applied 1 time.
  • rule 'variables: canonicalize affine domain' was applied 2 times. Problem closed by presolve.

CpSolverResponse summary: status: INFEASIBLE objective: NA best_bound: NA integers: 0 booleans: 0 conflicts: 0 branches: 0 propagations: 0 integer_propagations: 0 restarts: 0 lp_iterations: 0 walltime: 0.007945 usertime: 0.007945 deterministic_time: 0 gap_integral: 0

Laurent Perron
  • 8,594
  • 1
  • 8
  • 22
Tejas
  • 11
  • 1

1 Answers1

3

I only have simple advices:

  • reduce the model size if this is a parameter
  • remove all constraints while keeping the problem infeasible
  • look at the square constraints and the corresponding domains
  • add assumptions to check the soundness of your data (capacity is >= 0, no crazy ranges of values, ...)
  • play with the domain of the variables to enlarge them
  • inject a known feasible solution and try to find where it breaks
Laurent Perron
  • 8,594
  • 1
  • 8
  • 22