i have this constraint right here, which is not linear. How would i linearize such a product. $number_t$ is a positive integer and $new_t$ and $reset_t$ are binary.
$$number_t = (number_{t-1}+new_t)\cdot (1-reset_t)$$
i have this constraint right here, which is not linear. How would i linearize such a product. $number_t$ is a positive integer and $new_t$ and $reset_t$ are binary.
$$number_t = (number_{t-1}+new_t)\cdot (1-reset_t)$$
Some comments already hinted at questions that give you the answer. In your specific example, this translates to the following:
\begin{align} 0 \leq number_t \leq (number_{t−1}+new_t) \newline number_t \geq (number_{t−1}+new_t)-reset_tM \newline number_t \leq M(1−reset_t) \end{align}
If $reset_t = 0$, through the first and second constraint we force $number_t$ to take value $number_{t-1}+new_t$. If $reset_t=1$, through the first and third constraint, we force $number_t$ to be 0. Where $M$ is a large enough number.