1
$\begingroup$

The problem, in general terms:

At work, we're supposed to come up with an algorithm to split the expenses incurred during shipping when more than one order is being shipped on the same truck. Basically, we pay the trucking company a flat fee, and charge each customer a different amount for each order. We charge customers based on the footage they take up, and the distance they travel (in miles).

Say, for instance, we have four orders:

 Order #    Start     End              Miles     Footage    Revenue  ========   =======    =============   =====     =======    =======  1          Chicago -> Indianapolis      250       10       $200  2          Chicago -> Cleveland         400       20       $500  3          Chicago -> West Virginia     600       10       $400  4          Chicago -> New York          850       10       $600  Total Revenue:             $1700 Payment Due to Driver:     $1400 Consolidated Order Profit: $300 Order 1 Profit:            ? Order 2 Profit:            ? Order n... 

These are example ratings.

Well, my theory was this:

1. Take the rate per mile 2. Take the rate per foot 3. Average the two 

However, that seems braindead. Am I getting the true profit for each order this way?

For instance:

Anna, Brad, and Cathy are sharing a truck on three orders. Anna's load is going 100 miles, and takes up 10 feet. Brad's load is going 200 miles, and takes up 20 feet. Cathy's load is going 300 miles, and takes up 20 feet. 

Now...Do I take the total footage (50 ft.), and blindly smear that ratio of footage to determine the company's cost to ship that load for that order? Or...do I take each stop, understand that after 101 miles, Anna's 10 feet are no longer on the truck, and will raise the observed rate to ship the other two orders? This, in the long run, will protect salespeople like Cathy, who should be given a greater ratio (the last 100 miles, Cathy's load takes up 100% of the truck's load), and therefore, a higher commission.

Thanks everyone!

  • 0
    How do **we** know what to pay the driver? Honestly, that's a five year project `:D`...it's a lot of knowledge, experience, and feel. What's the commodity? Does it spoil? Is it in season? Is it in high demand? Are you shipping someplace where you can ship freight *back* from? Too many variables to list here...so, I left the basics open to build a model, and implement it in the system. I'll elaborate my question.2011-12-16

2 Answers 2

2

One alternative is the taxicab approach. Express the cost of the truck as dollars per mile. For each mile that a shipment is aboard, it bears its share of the cost, rated by feet. So if your truck costs \$1/mile and starts with Anna's 10 foot load and Brad's 30 foot load, Anna pays \$0.25/mile for that segment and Brad 0.75/mile. Then you unload Anna and Brad pays the full \$1/mile. Then you load Cathy's 20 foot load and Brad pays \$0.60/mile while Cathy pays \$0.40/mile. It's not fair in that you want to be loaded last and delivered first.

  • 0
    @RossMillikan Haha, I upvote you sir. Very funny, very true. A good software engineer will keep them honest!2011-12-19
0

You need to use game theory and in particular the Shapley value to split the cost. The customers are in some sense cooperating to have their products delivered to them efficiently by sharing a truck that you pay for, and the Shapley value gives a way to "fairly" split the cost. Of course this is an academic answer that has no relevance to the real world so you will not use it.

  • 0
    I see what you're saying about the game theory approach. I need to find a practical way to measure the amount of available space on the truck at any given mile, and measure the "value per foot" on the truck, given it's location on the route (read: calculus). But thanks anyway for your suggestion! We have no way to determine what they individual customer could expect to gain or lose without cooperation, so yes, it's not very useful.2011-12-16