I am currently using the CPLEX optimizer with the help of the JuMP package. In order to generate constraints for my model, I am currently using a function of the following type:
using JuMP using CPLEX function GenerateSolution(n) M = Model(CPLEX.Optimizer) @variable(M,y[1:n],Bin) @constraint(M, SampleConstraint[i in 1:n , j in i+1:n] , y[i]+y[j]>=1 @objective(M, Min, sum(y[i] for i in 1:n)) optimize!(M) y_star = JuMP.getvalue.(M[:y]) return(y_star) end
To speed up the constraint creation process, I would like for my function to be able to call upon the populate method of the CPLEX optimizer, in order to get multiple feasible solutions to create new constraints with.
Is it at all possible to do so, and if not, are there alternative ways to obtain multiple solutions to a given model?