[Clp] question on strange behavior of barrier method

Ivo Stefanov istefanov87 at abv.bg
Sun Oct 25 16:46:50 EDT 2020


Hello, 
  I am trying to solve a relatively simple quadratic problem with the barrier method, but I seem to be hitting some really strange behavior. The problem itself consists of diagonal matrix for the quadratic part and has a number of linear constraints that may vary between different instances of the problem.  I have tried the following 2 ways of calling the solver:  
  1. Variant 1:  ClpSolve options;  options.setSolveType(ClpSolve::SolveType::useBarrier);  options.setPresolveType(ClpSolve::PresolveType::presolveOn);  
  ClpSimplex model;  // ... do some loading of the model, from file or from externally provided arrays  
   model.setPrimalTolerance(1e-6);  model.setDualTolerance(1e-6);   model.initialSolve(options);  
  
  2. Variant 2:  
ClpSimplex model;  // ... do some loading of the model, from file or from externally provided arrays  
   model.setPrimalTolerance(1e-6);  model.setDualTolerance(1e-6);   model.barrier(true);  
  
  I encountered an instance of the problem for which variant 1 returns a solution that violates the constraints (with status 0) while variant 2 correctly identifies it as infeasible (status 1). What is interesting here is that in case of variant 1 there is a line in the log that states the problem is infeasible, however the solver keeps working on it and eventually returns status 0 and a solution.  
  I have also encountered another instance of the problem for which variant 1 returns the correct solution while variant 2 returns a solution that violates the constraints (with status 0).  
  At this point I am pretty confident I am missing something in the way I am invoking the solver, but I do not seem to be able to figure out what.  Thanks in advance for any help.  
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20201025/3fe18c3e/attachment.html>


More information about the Clp mailing list