|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Modeling Trick!?
Hi everyone,
Say you wrote a model that might change product's price weekly, for the time horizon considered in the model. But then, you don't want to allow successive weekly price change! Week Price 1 $12 2 3 $10 4 5 $5 So, if price changed to $12 in week1, it can't be changed in week2, but week3 or week4 or week5. If price changed in week3, it can't be changed in week4, but week 5and so on. Assume you are using an algebraic modeler, is there something that allow you to consider such constraint? Thanks |
|
#2
|
|||
|
|||
|
Modeling Trick!?
Mike wrote:
Hi everyone, > Say you wrote a model that might change product's price weekly, for the time horizon considered in the model. But then, you don't want to allow successive weekly price change! > Week Price 1 $12 2 3 $10 4 5 $5 > So, if price changed to $12 in week1, it can't be changed in week2, but week3 or week4 or week5. If price changed in week3, it can't be changed in week4, but week 5and so on. > Assume you are using an algebraic modeler, is there something that allow you to consider such constraint? > Thanks If you're willing to introduce binary variables, and if you can set an a priori bound M on the largest change (in absolute value) in any one week, it's not hard. Let p_i be the price in week i, y_i a binary variable that takes value 1 if the price changes in week i. Add the constraints p_{i-1} - M*y_i <= p_i <= p_{i-1} + M*y_i y_{i-1} + y_i <= 1 for each i. /Paul |
![]() |
| Viewing: Web Development Archives > FAQs > Research > Modeling Trick!? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|