the cost of increasing production is 2000 dollar per house-material increased from one month to the next and the cost of decreasing house-material is 500 dollar per unit decreased from one month to the next.
I am trying to model the expression above. I have choosen ${x_m}$ as number of house-material built in regular production in month m. ${x_m - x_{m-1}}$ should be in the objective function but if ${x_m - x_{m-1}}$ is greater than zero, it will be appeared as ${2000 (x_m - x_{m-1})}$ , else ${-500 (x_m - x_{m-1})}$. How can I model this expression ?