I’m working on a heuristic that takes in a fractional solution and applies randomised rounding operations to get a feasible solution. In order to obtain the fractional solution, I tried solving the LP but the computation times are too high, and hence I reverted to the idea of obtaining the fractional solution at the root node of the MIP. Could you please let me know what type of callback can be used to get this fractional solution? I’m using CPLEX to solve my models.
I could be wrong but I don’t think that JuMP has any utilities for accessing any of the nodes in the MIP tree, at least in version 0.18. You will likely have to resort to going through CPLEX.jl to figure out how to do it. It’ll probably be basically the same as however it’s done in the C API, so you might want to get out the CPLEX C API docs.
Have you looked at setting a parameter like https://www.ibm.com/support/knowledgecenter/SSSA5P_12.6.0/ilog.odms.cplex.help/CPLEX/Parameters/topics/NodeLim.html
Setting the node limit to zero ensures CPLEX stops after the root node is completely processed. But, I’m not sure if it will return the fractional solution as we are still solving a MIP or I may be wrong?
May you elaborate? MILP solvers solve a ton of LPs. If you only want the root node’s solution, then it should faster to solve your LP once using CPLEX for example.