Convex vs SOCP Constraint
AnsweredHello,
I am constructing a problem which includes a convex constraint:
\( l_{ij} * u_{i} \geq p_{ij}^2 + q_{i,j}^2 \)
which I coded as follows (with additional dimension \( t \) ):
Ohm_law = m.addConstrs((l_ij[i,j,t] * u_i[j,t] >= p_ij[i,j,t]**2 + q_ij[i,j,t]**2 for i,j,t in line_t), name='Ohms-Law')
The indices \( [i,j,t] \) are from a tupledict set with \( l_{ij}[i,j,t] , u_i[j,t] \geq 0 \).
With that constraint, the problem is solved in around 12 seconds.
I am looking for a way to speed up the solving time by replacing it with a SOCP constraint (if possible):

Therefore, my questions are as follows:
1. How do I code the SOCP constraint just like the figure?
2. According to how Gurobi handles the problem in general, does it really affect the computation time by changing the convex \( \rightarrow \) SOCP constraint?
1
-
Official comment
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
Post is closed for comments.
Comments
1 comment