4

This one's hard, so all help really appreciated!

I know it is NP-Complete and thus cannot be solved in polynomial time, but looking for help in analysis, what type of NP-Complete problem it reduces to, similar problems it reminds you of, etc.

The story goes as follows. I own an ice cream truck business with n trucks. There are m stops where I make deliveries. Each location mi has pi people waiting for me. After buying their ice cream, everyone leaves. pi increases over time as more people line up to get ice cream.

How can I figure out where to send the trucks next in order to maximize my profit in any given day?

Things to keep in mind:

  • Two trucks that stop in the same spot at similar times will only get the profit once, i.e. the people leave after one truck arrives
  • The trucks take time to get from one location to another
  • pi increases over time at each stop, but some stops increase faster than others, i.e. some locations are near malls (location, location, location)

I've tried reducing this to a multimachine scheduling problem, traveling sales person problem, ILP etc., but the main issue is that the pi at every location (i.e. the distance in the TSP or the job length in the scheduling problem) is constantly increasing.

Thanks in advance!

Jason
  • 13,563
  • 15
  • 74
  • 125
  • 1
    How do the p_i change? Is each a constant rate of increase (linear with time)? – Ted Hopp Dec 07 '11 at 21:40
  • 5
    Jason, there's something missing in your description because as you state it, it looks like people will wait for the delivery for ever, so it doesn't matter when you get your trucks to the delivery stations. The model must include a parameter that describes how long people are ready to wait for ice cream before they leave, or something similar; and there's also the question of how much ice cream trucks can hold. Otherwise there's a trivial solution: you just have 1 truck and it goes through the stations in late evening once, and everyone has been waiting for the whole day (TRAVELING SALESMAN). – Antti Huima Dec 07 '11 at 23:12
  • This may be better served at cstheory.stackexchange.com – phs Dec 07 '11 at 23:53
  • 1
    @antti.huima - Your trivial won't work if the p_i increase at a rate that decreases with increasing p_i. (E.g., if people are quick to join a short queue but are reluctant to join a queue that is already long.) – Ted Hopp Dec 08 '11 at 04:16
  • The point about p_i increase rate decreasing suggests another way of looking at the problem, especially as there is no indication that people get fed up and walk away. Assume that every person waiting in a queue yields their profit sooner or later, and count them as assets. The job of the ice cream vans is then to service stops at which the queue is so long that the rate at which new customers arrive has fallen, removing the queue so that new customers arrive again at a high rate. The goal is then to maximise customer arrival rate, not immediate profit. – mcdowella Dec 08 '11 at 20:46
  • Do you have so unique and delicious ice creame that people are waiting in queue for it not knowing how long it will take? (Instead of visiting nearest caffee.) If this description is a metaphore, there's too many guessing about real conditions. `antti.huima` pointed out what important info is missing. – Andriy Tylychko Dec 08 '11 at 21:53
  • @mcdowella: We could reframe the problem as "reduce the number of lost customers", and use a p_i tied to the number of users that will leave the queue at each time. Seems to me that the same algorithm could apply. – Coffee on Mars Dec 21 '11 at 09:31
  • One important reduction is that the cars should never pass each other. – Thomas Ahle Dec 26 '11 at 22:17

1 Answers1

1

Sounds like a variant of the Assignment Problem. So one approach you may not have considered is an Auction Algorithm (which has the advantage it can be parallelized easily) or Hungarian algorithm.

I realize there are complications in your problem (there always are!) but the Auction algorithm is pretty flexible. You can have quite a complicated cost function between your trucks and customers. You can also tweak the algorithm to have multiple trucks service multiple customers subject to capacity constraints.

Tim Gee
  • 1,062
  • 7
  • 9