Research
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives FAQs Research

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 1st, 2008, 12:40 PM
Mike
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #2  
Old July 1st, 2008, 05:20 PM
Paul Rubin
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
Reply

Viewing: Web Development Archives FAQs Research > Modeling Trick!?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway