<HTML><BODY>
<div>Hi John,</div><div><br></div><div>thank you very much.</div><div><br></div><div>First, this is the full code that I am using to test those:</div><div>    ClpSimplex model;</div><div>    ClpSolve options;</div><div>    options.setSolveType(ClpSolve::SolveType::useBarrier);</div><div>    options.setPresolveType(ClpSolve::PresolveType::presolveOn);</div><div><br></div><div>    model.readMps("path-to-problem");</div><div><br></div><div>    model.setLogLevel(3);</div><div>    model.setPrimalTolerance(1e-6);</div><div>    model.setDualTolerance(1e-6);</div><div><br></div><div>    //    model.barrier(true);</div><div>    model.initialSolve(options);</div><div><br></div><div>    int status = model.problemStatus();</div><div>    cout << status << endl;</div><div><br></div><div>By switching between model.barrier and model.initial solve one can obtain the 2 behaviors that I am observing. Let's call model.barrier "method 1" and model.initialSolve "method2".</div><div><br></div><div>I have summarized the problems into 3 cases:</div><div><br></div><div>- small.mps - this is a very small instance that is clearly infeasible. "Method 1" returns status 1, while "method 2" returns status 0 + a solution that violates. Along the way "method 2" logs that the problem is infeasible.</div><div>- medium.mps - this is an instance almost as small, but a bit more complex. "Method 1" returns 1, while "method 2" returns status 0 + a valid solution. I believe that this problem is feasible and the solution of "method 2" is the optimal one.</div><div>- large.mps - this is a bit larger instance. "Method 1" returns 1, while "method 2" returns status 0 + an invalid solution. I am almost certain that this is an infeasible problem. Again, somewhere in the log of "method 2" it is stated that the problem is infeasible.</div><div><br></div><div>I am sendling a link from https://wetransfer.com/ :</div><div>https://wetransfer.com/downloads/e411c81ca171d88b2cbedba0215e267620201026105108/471e067628a466361d640ce1436e252520201026105127/b7cd74?utm_campaign=WT_email_tracking&utm_content=general&utm_medium=download_button&utm_source=notify_recipient_email</div><div><br></div><div>It should be valid for 7 days, but let me know in case it does not work and I will upload somewhere else.</div><div><br></div><div>Thank you very much!</div><div><br></div><div>Ivo</div><div><br></div><div>>-------- Оригинално писмо -------- </div><div>>От: John Forrest jjhforrest@gmail.com </div><div>>Относно: Re: [Clp] question on strange behavior of barrier method </div><div>>До: clp@list.coin-or.org </div><div>>Изпратено на: 26.10.2020 11:31 </div><div><br></div><div>Ivo,</div><div><br></div><div>Quadratic is nowhere near as well tested as Linear - and even more so </div><div>with barrier. When I run a very simple case the complementarity gap </div><div>looks slightly suspect - although the simplex cleanup seems fine.</div><div><br></div><div>If you feel that you can share the two problems - taking off names etc - </div><div>then I can look into it.</div><div><br></div><div>John Forrest</div><div><br></div><div><br></div><div>On 25/10/2020 20:46, Ivo Stefanov wrote:</div><div>> Hello,</div><div>> </div><div>> I am trying to solve a relatively simple quadratic problem with the </div><div>> barrier method, but I seem to be hitting some really strange behavior. </div><div>> The problem itself consists of diagonal matrix for the quadratic part </div><div>> and has a number of linear constraints that may vary between different </div><div>> instances of the problem.</div><div>> I have tried the following 2 ways of calling the solver:</div><div>> </div><div>> 1. Variant 1:</div><div>> ClpSolve options;</div><div>> options.setSolveType(ClpSolve::SolveType::useBarrier);</div><div>> options.setPresolveType(ClpSolve::PresolveType::presolveOn);</div><div>> </div><div>> ClpSimplex model;</div><div>> // ... do some loading of the model, from file or from externally </div><div>> provided arrays</div><div>> </div><div>> model.setPrimalTolerance(1e-6);</div><div>> model.setDualTolerance(1e-6);</div><div>> model.initialSolve(options);</div><div>> </div><div>> </div><div>> 2. Variant 2:</div><div>>  ClpSimplex model;</div><div>> // ... do some loading of the model, from file or from externally </div><div>> provided arrays</div><div>> </div><div>> model.setPrimalTolerance(1e-6);</div><div>> model.setDualTolerance(1e-6);</div><div>> model.barrier(true);</div><div>> </div><div>> </div><div>> I encountered an instance of the problem for which variant 1 returns a </div><div>> solution that violates the constraints (with status 0) while variant 2 </div><div>> correctly identifies it as infeasible (status 1). What is interesting </div><div>> here is that in case of variant 1 there is a line in the log that states </div><div>> the problem is infeasible, however the solver keeps working on it and </div><div>> eventually returns status 0 and a solution.</div><div>> </div><div>> I have also encountered another instance of the problem for which </div><div>> variant 1 returns the correct solution while variant 2 returns a </div><div>> solution that violates the constraints (with status 0).</div><div>> </div><div>> At this point I am pretty confident I am missing something in the way I </div><div>> am invoking the solver, but I do not seem to be able to figure out what.</div><div>> Thanks in advance for any help.</div><div>> </div><div>> </div><div>> _______________________________________________</div><div>> Clp mailing list</div><div>> Clp@list.coin-or.org</div><div>> https://list.coin-or.org/mailman/listinfo/clp</div><div>> </div><div><br></div><div>_______________________________________________</div><div>Clp mailing list</div><div>Clp@list.coin-or.org</div><div>https://list.coin-or.org/mailman/listinfo/clp</div>
</BODY></HTML>