1

I want to know how many iterations were required to reach the optimal solution for an ILP using cvxopt.glpk. Here is my abridged code below:

from cvxopt.glpk import ilp
import cvxopt

Provided that I have defined all the input parameters, this is the final line of the code for solving:

(status, x) = ilp(c, G, h, A, b, I = set([]), B = set(range(var_length)))

"status" shows me if the solution is optimal or not (in my case it is), and "x" is the solution. But I am confused as in how to obtain the number of iterations required to reach this optimal solution.

Thanks in advance for your help.

1 Answers1

-1

This works:

sol = qp( C, q, G , h, A_ , b )

sol['iterations']
Pika Supports Ukraine
  • 3,612
  • 10
  • 26
  • 42
Jimmy
  • 11
  • 1
  • 6