4

I could use some help understanding what's going on here. Admittedly, I am not strong in OR, but I don't fully understand the format shown below. Is it possible somebody could format this in the type of notation that is more often found in literature?

decision variables: x(i): select score i (binary variable)
                    s(i): final score (continuous variable)

data: cs(i): current (old) score c(i): cost

min cost = sum(i, c(i)x(i)) s(i) = cs(i)(1-x(i)) + var1x(i) (1) sum(i, s(i)c(i)) >= var2*sum(i,c(i)) (2) x(i) ∈ {0,1} (3)

For example, I don't quite know what to make of

sum(i, c(i)*x(i))

Is this [i + c(i)*x(i)] for each index? Or is this sum[c(i)*x(i)] for each index?

EhsanK
  • 5,864
  • 3
  • 17
  • 54
Imdum
  • 43
  • 2

1 Answers1

6

In standard mathematical notation, the problem is to minimize $\sum_i c_i x_i$ subject to \begin{align} s_i &= \text{cs}_i(1-x_i) + \text{var}_1 x_i &&\text{for all $i$} \tag1 \\ \sum_i s_i c_i &\ge \text{var}_2 \sum_i c_i \tag2\label2 \\ x_i &\in \{0,1\} &&\text{for all $i$} \tag3 \\ \end{align} The intent might also be that $s_i \ge 0$ for all $i$.

Typically, the coefficient precedes the decision variable, so I would write the LHS of \eqref{2} instead as $\sum_i c_i s_i$, but I violated this convention in order to more closely match your question.

RobPratt
  • 32,006
  • 1
  • 44
  • 84