[Clp] question on strange behavior of barrier method
Ivo Stefanov
istefanov87 at abv.bg
Mon Oct 26 06:58:22 EDT 2020
Hi John,
thank you very much.
First, this is the full code that I am using to test those:
ClpSimplex model;
ClpSolve options;
options.setSolveType(ClpSolve::SolveType::useBarrier);
options.setPresolveType(ClpSolve::PresolveType::presolveOn);
model.readMps("path-to-problem");
model.setLogLevel(3);
model.setPrimalTolerance(1e-6);
model.setDualTolerance(1e-6);
//
model.barrier(true);
model.initialSolve(options);
int status = model.problemStatus();
cout
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".
I have summarized the problems into 3 cases:
- 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. - 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. - 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.
I am sendling a link from https://wetransfer.com/ : https://wetransfer.com/downloads/e411c81ca171d88b2cbedba0215e267620201026105108/471e067628a466361d640ce1436e252520201026105127/b7cd74?utm_campaign=WT_email_tracking&utm_content=general&utm_medium=download_button&utm_source=notify_recipient_email
It should be valid for 7 days, but let me know in case it does not work and I will upload somewhere else.
Thank you very much!
Ivo
>-------- Оригинално писмо --------
>От: John Forrest jjhforrest at gmail.com
>Относно: Re: [Clp] question on strange behavior of barrier method
>До: clp at list.coin-or.org
>Изпратено на: 26.10.2020 11:31
Ivo,
Quadratic is nowhere near as well tested as Linear - and even more so
with barrier. When I run a very simple case the complementarity gap
looks slightly suspect - although the simplex cleanup seems fine.
If you feel that you can share the two problems - taking off names etc -
then I can look into it.
John Forrest
On 25/10/2020 20:46, Ivo Stefanov wrote: > 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. >
>
> _______________________________________________ > Clp mailing list > Clp at list.coin-or.org > https://list.coin-or.org/mailman/listinfo/clp >
_______________________________________________ Clp mailing list Clp at list.coin-or.org https://list.coin-or.org/mailman/listinfo/clp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20201026/8379a48b/attachment.html>
More information about the Clp
mailing list