bacoder
bacoder

Reputation: 11

Python setting glpk options with cvxopt

I am trying to set the algo. params. for glpk.ilp called from cvxopt in python. I am solving a MILP. The solution is indeed returned but I would like to fine-tune the algo. parameters as in some cases it does not find a solution (i am assuming it 'times out')

so far I tried:

from cvxopt import glpk

glpk.options['it_lim'] = 10

and alternatively the

status, solution = glpk.ilp(c_m, A_ineq_m, B_ineq_m, A_eq_m, B_eq_m, B=set(Binary_ind),options={'tm_lim': 100000, 'msg_lev': 'GLP_MSG_ON', 'it_lim':1000})

but nothing seems to work for me

Upvotes: 0

Views: 837

Answers (1)

Xypron
Xypron

Reputation: 2483

it_lim is a parameter for lp() and not for ilp().

At https://github.com/cvxopt/cvxopt/blob/master/src/C/glpk.c#L612 you can find the parameters that the ilp() method supports.

For the exact meaning and allowable values of the options, please, read doc/glpk.pdf and src/glpk.h of the GLPK source distribution.

Upvotes: 0

Related Questions