I'm working with python specifically with the PULP library, I have a model that runs, but I want to be able to extract the GAP from the solution to save it in excel and be able to make comparisons.
This is the line with which I specify that the model be resolved with CPLEX.
prob.solve(CPLEX_PY())
With this line I get the value of the objective function:
print (value(prob.objective))
and what would be the line to obtain the GAP of the solution?
that is, how to obtain 11.64% that is the GAP found (as you can see in the figure)