1
$\begingroup$

I try to convert a quadratic constraint to a linear one: $$ w_j = \sum w_\text{j,i} \\ w_\text{j,i} = \frac{w_j}{D} \times u \\ w_j,D,u \in \mathbb{N} \\ $$ The values for $w_j$ and $D$ are constant and does not change.
In fact, I try to divide the value of $w_j$ to pieces, defined by $D$. For example: $D = 4$ and $w_j = 100$ with $w_\text{j,0},w_\text{j,1} \in {0,25,50,100}$.

At first: Is there a way to express such a case with linear constraints?
At second: Is there a rule how to convert quadratic to linear constraints?

$\endgroup$
4
  • 2
    $\begingroup$ There does not appear to be anything quadratic in what you wrote. Can you please edit the question and clarify it a bit? $\endgroup$
    – prubin
    Jun 16, 2022 at 23:18
  • $\begingroup$ As I understand the docs of gurobi, I though every multiplikation aka division leads to quadratic constraints. Are these constraints still linear? $\endgroup$
    – Mike
    Jun 17, 2022 at 8:02
  • 1
    $\begingroup$ Is it linear, because $w_j$ and $D$ are constant values? And would it be quadratic if $w_j$ and $D$ would be a decesion variable? $\endgroup$
    – Mike
    Jun 17, 2022 at 8:26
  • 4
    $\begingroup$ Yes it is linear in the decision variable $u$ which is the important thing. Had $w$ and $u$ been decision variables it would be bilinear (i.e. special case of quadratic) , and if $w$, $D$ and $u$ all had been decision variables it would still have been bilinear as you would write it as the bilinear equality $w_{j,i} D = w_j u$ $\endgroup$ Jun 17, 2022 at 12:30

0