PICOS is slow in loading problem compared to GUROBI
I have an MILP and coded it in Python 2.7 using both Gurobi 8.0 and PICOS. Adding constraints and decision variables takes longer when I compare it with Gurobi. Bellow I add some examples of the constraints and time takes for both to add them. When it comes to optimization, both are very fast in finding the optimal solution.
I am wondering the reason and any possible solution to accelerate it. Thanks in advance, Siamak
PICOS:
time : 111 secs.
for i in stores: for o in options: milp.add_constraint(picos.sum([x[i][j,o]for j in stores],'i','[numofstores]')==1)
.
time: 233 secs.
milp.add_list_of_constraints([picos.sum([x[i][j,o]*c_io[i,o]for j in stores for o in options],'j,o','[numofstores,numofoptions]')<= A_i[i,0] for i in stores], 'i','stores')
.
Gurobi:
time: 0.7 secs.
milp.addConstrs(quicksum(xx[(i,j,o)] for j in stores) == 1 for i in stores for o in options)
.
time: 0.85 secs.
milp.addConstrs((quicksum(xx[(i,j,o)]*c_io[i,o] for j in stores for o in options if j!=i) <= A_i[(i,0)] for i in stores ))
.