How to reduce the size of LinExpr() and speed up the solving process ?
Hi,
I am having an issue with LinExpr, I am trying to solve and instance of the Generalized Assignment problem where my cost function uses the Euclidean distance which has to be written using LinExpr as it accounts for decision variables when it comes to compute the distance.
My objective function is somewhat in this form : F = 1 / (1 + Sqrt ( Sum_over_d(pow((x[i, d] * Sigma[c,i] - x[j, d] * Sigma[c, j]), 2)))).
Where i is in I, c is in C, d is a parameter. Sigma[c, i] is the decision variable which is binary.
I had to use LinExpr to implement it. The issue I am having is that the resulting linear expression gets bigger when the size of the problem increases i.e. for more than 20 elements in I.
When I solve the model, it takes a lot of time and the process freezes, anyone have similar issue or insights on how to overcome this ?
Regards,
Laaziz
-
正式なコメント
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi,
It seems there is a Sqrt and pow of some variables in your objective? Is this this correct? If so, it this still linear/quadratic? In general you cannot solve problems like this with an LP/QP/MIP solver. However, if all your variables are binary, I guess you can simply linearize it. Have you tried this and then write it down in a different way?
Best regards,
Sonja
0
投稿コメントは受け付けていません。
コメント
2件のコメント