-
Notifications
You must be signed in to change notification settings - Fork 1
/
runInst.py
37 lines (31 loc) · 1.24 KB
/
runInst.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import cplex
import numpy as np
import scipy as sp
import scipy.sparse
import scipy.sparse.linalg
from Cuts import *
from ReprVars import *
from CPLEXInterface import *
from runMIPLIB import *
import sys
# Usage
# python runInst A0 25 10 100 15
args = sys.argv
Batch = args[1]
Nvar = int(args[2])
Ncons = int(args[3])
nInst = int(args[4])
# nCuts = int(args([5]))
print("Running batch: " + Batch + " with " + str(Nvar) + " variables and " +str(Ncons) + " constraints.")
values = run_compare_root_rat(nRows = [2,5,10], Num_IP=nInst,
NumRounds = 5, verbose = 1,
path = "/home-4/[email protected]/scratch/201804/",
scratch = "/home-4/[email protected]/scratch/201804/scratch/",
Batch = Batch+"_rat", Nvar = Nvar, Ncons = Ncons)
print("Running batch: " + Batch + " with " + str(Nvar) + " variables and " +str(Ncons) + " constraints.")
values = run_compare_root(nRows = [2,5,10], Num_IP=nInst,
NumRounds = 5, verbose = 1,
path = "/home-4/[email protected]/scratch/201804/",
scratch = "/home-4/[email protected]/scratch/201804/scratch/",
Batch = Batch, Nvar = Nvar, Ncons = Ncons)
[print(i) for i in values]