scip icon indicating copy to clipboard operation
scip copied to clipboard

Is scip wrong or did I incorrectly create the LP file?

Open msheby opened this issue 11 months ago • 7 comments

I'm using the exact-rational branch. With the attached problem, I believe that scip calculated 18 correct answers and 2 incorrect ones (the variables starting with "v").

v275253208.lp.gz

v275253208.log.gz

Did I incorrectly transform a set of mixed integer equations to the LP file or is the solver doing something wrong?

Specifically, v275253214 was calculated to be 95557941548181994592469076718881884938971413168429851952864776323807316340265909303272192942283340684895668286358533806967189326156601073538105193292038944854387450148578074221882100967861892082545801519514457764212506077703019852883372007415674132605991114539096142957023238099400840589854916574942174487496813125657069817871454360088972502644511710407520678670232462029866247249957794087366600484366550139505601462726954692562927321617265019161312301692504258002984965685491474291618509353197328041070433078057086111578859314662827727270401165652993766345606468068704285595021736723850435102425451491265021/198627731605615919801934100500044217133928886136940830287947826779330855809065704330956347826993468632720740585139361691554758885575624873928708309487861521888863505800598128641032185957045227653165835145206698106307152477674188968635235208803804540636493985798764910602273509408022166420307820455371527468969872841205466328843676455572070817412015924099229200453345897190881902919496912943166512927218847731436392188428086334228700062628483591228872592501230881692117990535188153012269959381387750697513149047583690338064715301601490780749423469780891489896761008000000000000000000000000000000000000000000000 but I believe should instead be 5171516431678088519283703177476371131880322123445270855107999686795383663199142103340287390865930370543931323139910399536507696711981984499384332640102147564190977696296483898938851581483233195454130217422259516758116604967423159856907303163261929928262476915919591877932647914517946455964978202928958120667460035477772472480765034825273250885360370412694612670480501937635266383844929490768739773622742066974587792910205488344263501756002239238289654329007639788012404255762251318119392633556598690684420990328196069897487329422363751080570811508367355392022885510654374652388910755601606855491967321296133734271993617666956267566780584072404716474937344824695487379/10749567865769171640124864117724167094065232936304188032392982338830168072254573534764660001022455751278563725967589273778091864800094282838614403200217299691350131173600629225761063593065779305883761419575373029397374205403735824342391106199208949115375904772773837143968540885193181927738750017853670253316631634858042650546743759104988901412817319770818808341248492694808016689452345877001481315026605876917055096255470294966166354917197723654246525143311556855462392837382881750516932914864072584847069429378848139402798040950639435935739518297103724720468746826795657730847528180753457311253772273888385603750683680400357565220250677384683513082563877105712890625. Also, v275253215was calculated to be 5245579999765531/9007199254740992 but I believe should instead be 6260294305482474060632388844090816015679396976876162313776589822100332301323774512269469775260744372356374849079001128323778312840588362549830965150513095217720122598434124369376053140103279956368147614256050230580449418507588862134477577860663370983960548955497491828870053085744825753152875728345174384146306643154836151773277060958803796930593951879468276280541198214804374172630810546529245122861472435590585948857452216817442260894838838795212675584028084454068790887942738041165335046855902011461561105587001435959655146827429139778226955365040262917900426772058071340925048930177242688621581124034778478015067353143720671737436785250181689626393039032454565344/10749567865769171640124864117724167094065232936304188032392982338830168072254573534764660001022455751278563725967589273778091864800094282838614403200217299691350131173600629225761063593065779305883761419575373029397374205403735824342391106199208949115375904772773837143968540885193181927738750017853670253316631634858042650546743759104988901412817319770818808341248492694808016689452345877001481315026605876917055096255470294966166354917197723654246525143311556855462392837382881750516932914864072584847069429378848139402798040950639435935739518297103724720468746826795657730847528180753457311253772273888385603750683680400357565220250677384683513082563877105712890625.

msheby avatar Jan 23 '25 05:01 msheby

Thanks, can you check

  • whether the objective function that SCIP reports is too good (so the solution should be infeasible) or too bad (so your solution must have been cut off somewhere)? I assume the former.
  • whether disabling presolving (presolving/milp/maxrounds = 0) makes a difference?

ambros-gleixner avatar Jan 23 '25 08:01 ambros-gleixner

scip segfaults when I add in the presolving/milp/maxrounds = 0 option.

v275253208-nopresolve.log.gz

msheby avatar Jan 23 '25 14:01 msheby

Two updates necessary:

  • As a first step, can you use the most recent version of https://github.com/scipopt/papilo ?
  • Second, I have updated the exact-rational branch to a more recent development version. Does this fix your issues?

ambros-gleixner avatar Jan 23 '25 18:01 ambros-gleixner

Also I would be very interested to know what you use exact SCIP for. Feel free to drop me an e-mail.

ambros-gleixner avatar Jan 23 '25 18:01 ambros-gleixner

With the updated code, scip gets the correct answer with presolving/milp/maxrounds = 0. With presolving, I get the same incorrect answers.

msheby avatar Jan 24 '25 18:01 msheby

But still wrong with PaPILO https://github.com/scipopt/papilo/tree/develop ? For me that gives the same result

SCIP> read /home/bzfgleix/windata/Downloads/v275253208.lp.gz

read problem </home/bzfgleix/windata/Downloads/v275253208.lp.gz>
============

original problem has 196 variables (98 bin, 0 int, 0 impl, 98 cont) and 294 constraints
SCIP> o

presolving:
   (0.0s) running MILP presolver
   (0.3s) MILP presolver (19 rounds): 48 aggregations, 148 fixings, 0 bound changes
presolving (1 rounds: 1 fast, 1 medium, 1 exhaustive):
 196 deleted vars, 294 deleted constraints, 0 added constraints, 0 tightened bounds, 0 added holes, 0 changed sides, 0 changed coefficients
 0 implications, 0 cliques
transformed 1/1 original solutions to the transformed problem space
Presolving Time: 0.29

SCIP Status        : problem is solved [optimal solution found]
Solving Time (sec) : 0.29
Solving Nodes      : 0
Primal Bound       : +8.52231879129477e+00 (1 solutions)
Dual Bound         : +8.52231879129477e+00
Gap                : 0.00 %
Best exact objval  : 285804637213884237975238855133231245955827967340433159906051910654548028279754518069787692450476555309547488257663452123242368160962638019528699333764798588561651383941475922979023348972578318791257482526414390797621186691850793204239719810219190722962304689303344542806257967558123460801128615730063715759675358878013726586422683491027409049026750615156975028181455822065769685602673226229046383038385719500309782981440039172808407900663920371054632714017368149772437075596180158313071582696376050739749066034369753466795354145893040265446867442449225846605101549316963445967608619121464038036883392464601561233780721380097845904534557588335338469878667250599074842299236014/33536018097072702070137745455590558912545480779199672134998168616477110994256567057949721861489811442330055576906016474815570985669418139357181477455893921798588028479496431030214206949784930318427394107527367885327605164179331856671296365520513115047439555794385042299081575269285855284972604061949077041135828126006552849256456576186584650127143897441610831416651691327090784107002403311504756339960828817541367221818484730072172316584702184358953868048471946057613077366389432255583954045811764766939569087651808377142576202245962133457703040904980830715305975256629887184100230279546502214070512320324660429229214165347417515883703152024253313356894068419933319091796875

ambros-gleixner avatar Jan 24 '25 19:01 ambros-gleixner

Actually the opposite, wrong result for presolving/milp/maxrounds = 0

  [exactlinear] <>: <ma#0>[C]8270221867907345/18014398509481984 >= 3820765208655001139810686681034012291027590459696320853700843549375316393738298896791014703802493547895246209099969671517570644466003311567624873579733615014989722009439763133108438426618496818007015673010596/8322483747016010645078439610003859028640563129539928545927874805901863636153392897190123706584210784609960518831130466619997743570991523350223018408227799092623327557267135166450116594205610454082489013671875;
;
2875258577386804219922059081087637726676897724187146214036535632913738116207318832128314611164381333139048733175520469310672109305487999652599955533190450289926910648742041206464135827381636126983740970680589/149924538807433259370150935573257546206776848727764755833157818845257697497890803345240711711575444825813677167789830311372065208192007026329217006021092308610976492364110653766562290073600000000000000000000000000000000000000violation: left hand side is violated by 
best solution is not feasible in original problem

with broken message.

DominikKamp avatar Apr 24 '25 09:04 DominikKamp