How can I formulate a linear constraint?

26 Views Asked by At

$C_t$ and $S_i$ are two decision variables.

(1) $C_t$=$C_{(t-1)}$+$D_i$ if t=$S_i$, $\forall${i,t}

(2) $C_t$=$C_{(t-1)}$, if $t\neq S_i$, $\forall${i,t}

How can I present the above two conditional equations as a linear constraint? Appreciated!