Repository for A GNN-Guided Predict-and-Search Framework for Mixed-Integer Linear Programming.
Linux
–python 3.8.13
–pytorch 1.10.2
–cudatoolkit 11.3
–pyscipopt 4.2
–gurobipy 9.5.2
–pyg 2.0.4
Create a new environment with Conda
conda env create -f py38.yaml
conda activate pytest
dataset //training data, generated by gurobi.py(data generate scripts)
instance
–train //training and evaluation instances
–test //test instances
logs //all test logs
models //trained model, used to test model performance
pretrain // training model folder will be saved here
the Independent Set (IS) instance and the Combinatorial Auction (CA) instance use Ecole library to generate.
the Balanced Item Placement (denoted by IP) instance and the Workload Appointment (denoted by WA) instance come from the ML4CO 2021 competition generator.
Place the generated instances in the instance folder
python gurobi.py
The corresponding bipartite graph(BG) and solution will be automatically generated in the dataset folder.
Select the parameter TaskName in trainPredictModel.py, and then
python trainPredictModel.py
Put the trained model into the models folder, then
python PredictAndSearch_SCIP.py
python PredictAndSearch_GRB.py
python FixingStrategy_SCIP.py
all solver logs will be saved in logs folder.