Trouble defining a time-dependent constraint

24 views
Skip to first unread message

Evan Lynch

unread,
Dec 11, 2017, 1:17:34 PM12/11/17
to Gurobi Optimization
Hello, 

I am developing a model that decides how much of a product (p) to order and ship from a distribution center (d) to a customer (u) via a transportation mode (m) in a time period (t - leadtime). (t - leadtime) would be defined as the difference between the time in which a demand for a product occurs, and the lead time required to procure such a product. 

What I am struggling with is how to define this into the following constraint. In plain English, the sum of everything I ship out of a distribution center and put on some mode of transportation in the month in which I should place an order (t - leadtime) needs to be equal to demand for that product at the customer location in the time period (months), for any given product, customer and time period


Lead time for a part is defined by the distribution center and customer locations, as well as the mode of transportation. So for example, a distribution center in Maine and a customer in Alaska is going to have a longer lead time via ground vs air transportation. 








If I hard code lead time to be equal to one month for anything, I can write the constraint like this







My question is: What would I replace the "1" with. I've tried a few different things, but they all gave me really funky results during testing. 

Any help is much appreciated!!
Evan
Reply all
Reply to author
Forward
0 new messages