ds4dm / ecole

Extensible Combinatorial Optimization Learning Environments
https://www.ecole.ai
BSD 3-Clause "New" or "Revised" License
318 stars 68 forks source link

Observation = None and done = True when using from_file method #354

Closed rezabayani closed 1 year ago

rezabayani commented 1 year ago

[Reposting this from discussions as I believe it is a bug rather than a feature] Hi, My Ecole (v8) is having trouble reading observations from the optimization model stored as mps file. Basically, it returns None observation and True done flag when I reset the environment. I did the same approach with Ecole v7 and it was okay back then. Interestingly, when I tried feeding other mps files found online, it is okay with some of them and not with others. I have attached 2 images. Number 1 is when Ecole is acting as intended, using an mps model found online. Number 2 is when Ecole is acting funny, with an mps file I generated myself and was okay with Ecole v7.

ecole_correct

ecole_incorrect

Originally posted by @rezabayani in https://github.com/ds4dm/ecole/discussions/353

rezabayani commented 1 year ago

The mps files to reproduce the results are attached here: mps_format.zip

rezabayani commented 1 year ago

Update: I think I have found the cause of this behavior. It appears that SCIP gets rid of some variables in the presolve stage (although I tried disabling presolve actions through setting maxrestarts, maxrounds, abortfac, and restartminred to 0). Therefore, I do not belive this is an issue with Ecole and rather how SCIP's root node is formed.

orestiskaitezidis commented 1 year ago

Hi @rezabayani could you please elaborate how you disable the presolve stage eventually? Did you use specific scip_parameters in the env.reset() function? Thank you!