ds4dm / ecole

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

Instance generator improvements #118

Open AntoinePrv opened 3 years ago

AntoinePrv commented 3 years ago

Describe the problem or improvement suggested

Instance generators are valuables but hard to use for user unfamiliar with C++.

Describe the solution you would like

Describe alternatives you have considered

Additional context

The refactoring could be made easier by also adding variable / constraints utility to scip::Model similar to PySCIPOpt. Methods like model.addVar(...) with good defaults and automatic lifetime management would make the experience simpler.

sleepymalc commented 2 years ago

Do you guys have any progress about this? I'm pretty interested in defining my own instance (TSP specifically). I can't quite find useful enough information around the official docs and also from the example code since they all use the default provided api from ecole (which is great btw!).

If this is not the case, then are there any guidelines for us to create a self-defined instance generator?

AntoinePrv commented 2 years ago

Hi @sleepymalc,

If you want to define you own instance generators, you can do so, even without Ecole (say for PyscipOpt). Our instance generators are just functions that creates a Model. We have four type that you can use, but no TSP. This issue is about the generator that we already have. It would manly allow to change the random sampling function for them but won't let you do other instances types. We do not have anything in Ecole that would help you towards generating TSP instances.

gao-bing-yang commented 5 days ago

Hello, can I write my own instance generator instead of the instance generator in Ecole?