Hello Community,
I am working on a transmission planning problem and employing the Benders algorithm implemented in CPLEX through CVXPY. I aim to extract the LP file (or model representation) generated at each iteration of the algorithm. However, is this feasible directly through CVXPY, or how to achieve it?
Currently, I am using the following code snippet in CVXPY to enable the Benders algorithm in CPLEX automatically:
UnitC = cvx.Problem(Objetive,res)
UnitC.solve(solver=cvx.CPLEX, verbose = True, cplex_params = {"benders.strategy": 3}, cplex_filename = "model.lp")
My specific questions are:
- Is there a way to configure CPLEX from CVXPY to export the LP file for each iteration of the Benders algorithm?
- Alternatively, is it possible to extract and store information from each iteration (e.g., variables, active constraints, etc.) during the execution?
Any examples, documentation, or advice would be greatly appreciated. Thank you in advance!
------------------------------
Mauricio Aguirre Velasco
------------------------------