0
$\begingroup$

I have some constant values $c_i$ in $(0.5, 2)$. I also have binary variables $x_i$. For my integer program, for a particular constraint, I need to multiply only those $c_i$ when $x_i$ takes the value 1.

So basically, $\Pi_i \big[(c_i - 1)x_i + 1\big]$. I'm trying to linearize this. I can put a continuous variable $\gamma_i = (c_i - 1)x_i + 1$ and try to use piecewise linear functions, but since $(c_i - 1)x_i + 1$ can only take two values, i.e., $c_i$ and $1$, is there any way to use this property to have a more efficient linearization?

$\endgroup$
8
  • 1
    $\begingroup$ Your first paragraph describes $\prod_i c_i^{x_i}$, very far from the expression starting paragraph two. Which of the two is intended? $\endgroup$ Commented May 25, 2020 at 4:26
  • $\begingroup$ I'll try to clarify with an example. Let there be three values of i. So I have $c_1, c_2, c_3$ which are constants. I also have $x_1, x_2, x_3$ which are binary variables. Now, let $x_1=1$, $x_2=0$, and $x_3=1$. So I need $c_1c_3$. $\endgroup$ Commented May 25, 2020 at 4:30
  • $\begingroup$ Yes, you need $c_1^1 c_2^0 c_3^1 = c_1^{x_1} c_2^{x_2} c_3^{x_3}$. $\endgroup$ Commented May 25, 2020 at 4:31
  • $\begingroup$ Since $c_i$'s are constant terms, and I only know $i$ beforehand, I'm not clear how to index $c_i$ with the binary optimization variables $x_i$. The $c_i$ values are given known beforehand, and I also know how many $i$'s there are. $\endgroup$ Commented May 25, 2020 at 4:37
  • 1
    $\begingroup$ Depending on how you want to use the resulting product, you might be able to use a log transformation, which yields the linear function $\sum_i \log(c_i) x_i$. $\endgroup$ Commented May 25, 2020 at 5:29

1 Answer 1

1
$\begingroup$

Depending on how you want to use the resulting product, you might be able to use a log transformation, which yields the linear function $\sum_i \log(c_i)x_i$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.