Piecewise linear approximation for discret non-linear function
Answered
Hello, I have the following question. I want to implement the following non-linear constraint in Gurobi. This is the constraint in question. I have linearized like this and then implemented it with the typical addLConstr() command. Now that I have read about the addConstrPWL() function, I wonder if this implementation is faster than mine? Please note that my implementation only requires a discrete approximation and not a continuous one. I would be very grateful for an answer regarding the calculation capacities.
\[ S_{ij} = \sum_{j=d}^{d}y_{ij} \quad \forall i \in I, i \in J\]
\[ \sum_{r_i=0}^{E_i} z_{ijr_i} = 1 \quad \forall i \in I , i \in J \]
\[ \sum_{r_i=0}^{E_i} r_i \cdot z_{ijr_i} = S_{ij} \quad \forall i \in I , i \in J \]
\[ \beta_{ij} = \sum_{r_i=0}^{E_i} \left[\alpha + (1 - \alpha) \left(1 - e^{-k\cdot r_i}\right) \right] \cdot z_{ijr_i}\quad \forall i \in I , i \in J\]
\[ y_{ij}\in\left\{ 0,1\right\}, S_{ij}\in \mathbb{Z}^+_{\geq 0}\]
-
Hi Lorenz,
Now that I have read about the
addConstrPWL()function, I wonder if this implementation is faster than mine?There's really only one way to find out, and that is through experimental evidence via an accurate comparison.
- Riley
0
Please sign in to leave a comment.
Comments
1 comment