idea-iitd / LiMIP

2 stars 2 forks source link

LiMIP: Lifelong Learning to Solve Mixed Integer Programs

Authors: Sahil Manchanda and Sayan Ranu

Conference: 37th Conference on Artificial Intelligence : AAAI 2023

Dependencies

To install SCIP and other dependencies, follow the instructions of https://github.com/ds4dm/learn2branch/blob/master/INSTALL.md

We use the following python packages for python version 3.6.13.

torch==1.9.0+cu111
torch-geometric==2.0.3
torch-scatter==2.0.9
torch-sparse==0.6.12
torchaudio==0.9.0
torchvision==0.10.0+cu111
scipy==1.5.2
numpy==1.18.1
networkx==2.4
Cython==0.29.13
PySCIPOpt==2.1.5
scikit-learn==0.20.2

Generating training instances

Similarly can be done for other set cover datasets

For Indset(IS) with affinity 4 and number of nodes 750 use

For other affinities and size for IndSet:

Generating training samples

To generate training sample for setcover problem with edge-density 0.05 use

Similarly for other instances in set cover( with different densities)

For other problems such as independent set(with different affinities and number of nodes), use below commands:

Training

To train for sequence [SetCover_0.05,SetCover_0.075, SetCover_0.1, SetCover_0.125, SetCover_0.15, SetCover_0.2]

python -u train.py --g 1 --prob_seq setcover_densize_0.05-setcover_densize_0.075-setcover_densize_0.1-setcover_densize_0.125-setcover_densize_0.15-setcover_densize_0.2

To train for Indset [indsetnewba_4_750, indsetnewba_4_500,indsetnewba_4_450, indsetnewba_5_450, indsetnewba_5_400, indsetnewba_5_350]

python -u train.py --g 1 --prob_seq indsetnewba_4_750-indsetnewba_4_500-indsetnewba_4_450-indsetnewba_5_450-indsetnewba_5_400-indsetnewba_5_350

The prob_seq consists of different tasks separated by -

Evaluation

To evaluate the above continually trained model on test instances of setcover with density 0.05, run the following

To evaluate the above continually trained model on test instances of indset with affinity 4 and num nodes 750, run the following