I am facing a problem to multiply a term in objective function. My objective function is :
\begin{equation} \min \sum_{t=1}^\top p_{t} \cdot (1+r) \cdot y_{t} \end{equation} where $p$ is the price, $y$ is the quantity (decision variable) and $r$ is the price surcharge. $t$ is the index for time periods.
The problem is that the value of $r$ depends on between which interval the value of $y$ (decision variable) lies as shown by the following piecewise function.
\begin{equation} r_t (Y_t) = \begin{cases} % s_0 0 & \mathrm{if }\; Y_t \leq b_0 \\ % s_1 0.05 & \mathrm{if }\; b_0 < Y_t \leq b_1 \\ % s_2 0.1 & \mathrm{if }\; b_1 < Y_t \leq b_2\\[6pt] ... & \mathrm{if }\; ... \end{cases} \end{equation} where $b_0$, $b_1$ etc. are set of quantity intervals = [0, 50, 100, 150,..]
Since we don't have the values of $y$ until at the point where objective function is specified (cause value of decision variables) are only available once we give call to optimize m.optimize(). So, how we could program this in Python interface.