Solving MILP optimization problem efficiently for slightly different parameter values
AnsweredI would to solve a (series of) MILP using Gurobi with the following feature.
Some of the choice variables, call them varx, a vector of size N_ch, satisfy the constraints
for int1 = 1:N_ch
varx[int1] >= (1/a)
varx[int1] <= a
end
where a is a positive number known to be strictly greater than one (eg 25 or 100).
In other words, each varx is in the range [1/a, a].
The nature of the problem at hand means I know that a is in the range 25 to 100 but I want to assess how much the optimal solution will change depending on my choice of a.
So what I would like to is solve more or less the same optimization problem for a few different values of a and look at the solutions (I am guessing that the constraints on varx will typically not bind). What is the most efficient way to solve this in Julia using Gurobi.
Can I reuse the previous solution to help me speed up the problem (my problem has around a thousand regular choice variables, around a hundred integer choice variables and four thousand constraints). If I have found a solution that is optimal for a = 25, for example, then it is certainly feasible for a = 100.
Can I exploit that? What is likely to be the quickest way to do it?
I am thinking another approach might be to make a and recipa choice variables (where recipa is the reciprocal of a) that lie inside the ranges [25 100] and [0.01 0.04].
Solve the minimization using the fact that varx[int1] >= (1/a) can be rewritten as varx[int1] - recipa >= 0. Then use the fix feature to fix recipa and a to values 0.01 or 0.04 and 25 or 100.
Which is the best way from the point of accuracy and speed, please?
Any helpful code snippets would be useful. Thank you.
-
Hi John,
Because we do not offer a Julia interface for Gurobi the pool of people that can answer your question is reduced (say compared to an API we do support, like Python).
This is not to say someone won't answer your question here, but it may be worth asking your question in the JuMP forum where you will find others who are also using this 3rd party Julia package to interface with Gurobi.
- Riley
0
Please sign in to leave a comment.
Comments
1 comment