How to set time limit for The integer linear programming(ILP) function in CVXOPT? suppose this is my solver:
status,solution = glpk.ilp(W, G.T, h,B=set(range(len(W))))
Try the following:
from cvxopt import solvers
solvers.options['glpk'] = {'tm_lim' : 1000} # time-limit of 1s (glpk expects [ms])
status,solution = glpk.ilp(W, G.T, h,B=set(range(len(W))))
Passing solver-options (within cvxopt) is described in the docs here.
The available options of glpk are described in it's manual here
Edit: As mentioned in the comments, tm_lim is the variable to set, not tm lim!