Skip to main content
added lambda into the objective to clarify
Source Link
tcokyasar
  • 1.3k
  • 6
  • 13

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$$A,C,D,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}\left(Cb_j+D\lambda_j\right)\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$. Moreover, I use Gurobi to solve this problem and I am open to a quadratic constraint. Indeed, I also tried defining $e_j e_j \geq T\lambda_j$ in Gurobi and it also did not work. I assume I made a mistake in that definition.

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$. Moreover, I use Gurobi to solve this problem and I am open to a quadratic constraint. Indeed, I also tried defining $e_j e_j \geq T\lambda_j$ in Gurobi and it also did not work. I assume I made a mistake in that definition.

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,D,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}\left(Cb_j+D\lambda_j\right)\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$. Moreover, I use Gurobi to solve this problem and I am open to a quadratic constraint. Indeed, I also tried defining $e_j e_j \geq T\lambda_j$ in Gurobi and it also did not work. I assume I made a mistake in that definition.

added 224 characters in body
Source Link
tcokyasar
  • 1.3k
  • 6
  • 13

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$. Moreover, I use Gurobi to solve this problem and I am open to a quadratic constraint. Indeed, I also tried defining $e_j e_j \geq T\lambda_j$ in Gurobi and it also did not work. I assume I made a mistake in that definition.

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$.

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$. Moreover, I use Gurobi to solve this problem and I am open to a quadratic constraint. Indeed, I also tried defining $e_j e_j \geq T\lambda_j$ in Gurobi and it also did not work. I assume I made a mistake in that definition.

Source Link
tcokyasar
  • 1.3k
  • 6
  • 13

Linearizing a constraint with square root of a variable

I am trying to linearize the constraint set (2) in the following simplified program. The parameters: $A,C,T\in\mathbb{R}^+$. The set $\mathcal{J}$ is polynomially-sized.

\begin{alignat}2\min &\quad \sum_{j\in\mathcal{J}}Cb_j\tag1\\ \text{s.t.}&\quad b_j\geq T\lambda_j+A\sqrt{T\lambda_j}\qquad j\in\mathcal{J}\tag2\\ &\quad \lambda_j,b_j\in \mathbb{R}^+.\end{alignat}

Seeing this post and the McCormick Envelope, I tried to implement it but did not seem to work as expected. Can you please help me debug where I am doing wrong? First, I re-write (2) as $b_j\geq T\lambda_j+Ae_j$, where $e_j=\sqrt{T\lambda_j}$. Then, squaring both sides, I get $f_j=T\lambda_j$, where $f_j=e_j^2$. Under these conditions and assuming $-M_j\leq e_j \leq M_j$, I replace (2) with the following set of constraints.

\begin{alignat}2 &\quad b_j\geq T\lambda_j+Ae_j\qquad j\in\mathcal{J}\tag3\\ &\quad M_je_j\geq f_j\qquad j\in\mathcal{J}\tag4\\ &\quad f_j\geq T\lambda_j\qquad j\in\mathcal{J}\tag5\\ &\quad M_j^2\geq f_j\qquad j\in\mathcal{J}\tag6\\ &\quad f_j\geq 2M_je_j-M_j^2\qquad j\in\mathcal{J}\tag7\\ &\quad e_j\leq M_j\qquad j\in\mathcal{J}\tag8\\ \end{alignat}

Although I defined $M_j$, I cannot define a strict big number for a specific index $j\in\mathcal{J}$. So, I assume $M=M_j$.