[SCIP] Different solving time and solution for the same problem in Soplex

Chia Teck Yan cteckyan at dso.org.sg
Mon Nov 8 06:53:55 CET 2021


Dear SCIP and Soplex community,


I face 2 problems using Soplex.


Problem 1

I am working on solving a problem in lp format with 2240 variables in [0,1] and 60467 constraints and an objective function of max 0. The first problem I face would be the difference in solving time of Soplex, using the command line versus reading the file from a C++ code.


Let us call the file problem.lp.

Doing ./soplex -x problem.lp takes only 3s,


while doing


auto t_befsolve = high_resolution_clock::now();

SoPlex mysoplex;
mysoplex.readFile("problem.lp", 0, 0, 0);
stat = mysoplex.optimize();

auto t_aftsolve = high_resolution_clock::now();
duration<double> solving_time = t_aftsolve - t_befsolve;

in a C++ code takes 20s to solve the same problem.

I have tried both the SOLVEMODE_RATIONAL and the default solving mode, both don't differ significantly in time.

Would anybody be able to advice what to do for this problem?

Problem 2
The second problem I face would be different solutions to the same problem using Soplex. In this case, I am working on solving a problem with 2240 variables in {0,1} and 60467 constraints with an objective function of max 0. I wrote a program to convert this problem to lp format internally with 2240 variables in [0,1] and 60467 constraints and used Soplex's functions to represent the problem in the form of a soplex object.

Doing
SoPlex mysoplex;

(Code to convert initial problem to lp)

mysoplex.writeFileReal("testingreal.lp", NULL, NULL, NULL); gives exactly the same representation as problem.lp above in Problem 1, aside from the constraints looking like
C0 : -1.0000000000000000e+00 x0 >= 0.0000000000000000e+00
instead of
- x0 >= 1
However, when I try to solve this problem using

stat = mysoplex.optimize();

, and print the solution, I obtain a different solution from Problem 1, which is strange. This also takes around 20s.


However, when I use the command line to do

./soplex -x testingreal.lp

, I obtain the same solution as

./soplex -x problem.lp

, where this is supposed to be the case. Doing this takes 3s for each lp file.


Would anybody be able to advice what to do for this problem?


Thank you all very much for helping me to think about these problems. Any suggestions would be greatly appreciated.


Yours sincerely,

Chia Teck Yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20211108/ceb30190/attachment.html>


More information about the Scip mailing list