I am currently working a project in which I use Gurobi many times (as the inner most loop of a few nested loops). Each time, I construct a model in which I determine if an individual will participate in a program and if they participate, which group they will participate in. The two decisions are interconnected as they will participate if they receive positive net value from participation, but, their participation value depends on what group they are in and what other individuals are in that group. The problem Gurobi solves each time is a MILP program, where all the choice variables are binary, but interact in non-linear ways. I typically have about 40 individuals, each with a participation variable and ~5 possible group variables (including one that is a "participate solo" variable). It currently runs very slowly once the number of individuals goes above around 30.
However, I can analytically (and by coding up a set of "rules", automatically) determine that some individuals will participate and others won't. I can choose to not pass the individuals that won't participate into Gurobi (as they won't interact with any other individual as a result). However, I still need to pass the participating schools to Gurobi as I need to find their grouping choice and its effect on other individuals' decisions.
I could use constraints to set their participation variable equal to 1 if I know they will participate. However, is this the best strategy to introduce information I know to Gurobi? Will adding additional constraints speed up solving (as it will eliminate a number of potential solutions), or will it slow it down (as there are now more constraints)?
Does anyone have any tips on how to incorporate information I have or other means of speeding up the process?
Please sign in to leave a comment.