What is the fastest route to drop off weight when time is proportional to weight x distance?
$begingroup$
You have a lorry at the starting point which is carrying all the parcels for the day.
$$rm Time taken = Total Lorry Weight times Distance travelled $$
After visiting each zone you have to return to the starting point.
Lorry's weight is $30$. You must take all undelivered parcels with you on every trip. Your fuel has no weight, your fuel is everlasting and you lose no time when dropping off packages.
What is the optimal route to delivering all the packages and returning to the starting point?
My initial thoughts for solving this was to work backwards and work out which delivery would add the smallest amount of total time across the whole journey. Then repeat this until I got to the first stop.
I have been told that isn't the correct way to work this out so not sure what would make the route I got for that more optimal.
combinatorics graph-theory optimal-transport
$endgroup$
add a comment |
$begingroup$
You have a lorry at the starting point which is carrying all the parcels for the day.
$$rm Time taken = Total Lorry Weight times Distance travelled $$
After visiting each zone you have to return to the starting point.
Lorry's weight is $30$. You must take all undelivered parcels with you on every trip. Your fuel has no weight, your fuel is everlasting and you lose no time when dropping off packages.
What is the optimal route to delivering all the packages and returning to the starting point?
My initial thoughts for solving this was to work backwards and work out which delivery would add the smallest amount of total time across the whole journey. Then repeat this until I got to the first stop.
I have been told that isn't the correct way to work this out so not sure what would make the route I got for that more optimal.
combinatorics graph-theory optimal-transport
$endgroup$
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31
add a comment |
$begingroup$
You have a lorry at the starting point which is carrying all the parcels for the day.
$$rm Time taken = Total Lorry Weight times Distance travelled $$
After visiting each zone you have to return to the starting point.
Lorry's weight is $30$. You must take all undelivered parcels with you on every trip. Your fuel has no weight, your fuel is everlasting and you lose no time when dropping off packages.
What is the optimal route to delivering all the packages and returning to the starting point?
My initial thoughts for solving this was to work backwards and work out which delivery would add the smallest amount of total time across the whole journey. Then repeat this until I got to the first stop.
I have been told that isn't the correct way to work this out so not sure what would make the route I got for that more optimal.
combinatorics graph-theory optimal-transport
$endgroup$
You have a lorry at the starting point which is carrying all the parcels for the day.
$$rm Time taken = Total Lorry Weight times Distance travelled $$
After visiting each zone you have to return to the starting point.
Lorry's weight is $30$. You must take all undelivered parcels with you on every trip. Your fuel has no weight, your fuel is everlasting and you lose no time when dropping off packages.
What is the optimal route to delivering all the packages and returning to the starting point?
My initial thoughts for solving this was to work backwards and work out which delivery would add the smallest amount of total time across the whole journey. Then repeat this until I got to the first stop.
I have been told that isn't the correct way to work this out so not sure what would make the route I got for that more optimal.
combinatorics graph-theory optimal-transport
combinatorics graph-theory optimal-transport
edited Dec 17 '18 at 16:28
Ben Franks
asked Dec 17 '18 at 12:36
Ben FranksBen Franks
261110
261110
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31
add a comment |
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
This is not an answer as I can't prove it, but perhaps others can (or show the error of my ways).
If all parcels weighed the same, the optimal strategy would be to unload the nearest parcels first. This means we could rank the zones to visit first by ranking them by their distance $d$, i.e. rank $r=d$.
If all distances were the same, the optimal strategy would be to unload the heaviest parcels first. This means we could rank the zones to visit first by ranking them inversely by their weight $w$, i.e. $r=frac{1}{w}$.
Putting these two observations together, it would seem a good first approximation would be to rank zones according to $r=frac{d}{w}$. If I do this, then computer simulation shows this gives exactly the optimal route for the first $2$ zones, the first $3$ zones, etc up to the first $6$ zones (after which my recursive algorithm encountered overflow).
It seems to me then that a simple ranking of the zones by $r=frac{d}{w}$ will give the optimal route.
EDIT
Changed my simulation from recursive to non-recursive and found the answer holds up to at least $8$ zones.
EDIT2
Improved simulation shows it works for $11$ zones. I'm convinced. :) It only remains to prove it will always work.
$endgroup$
add a comment |
$begingroup$
The answer by @Jens is correct: it is sufficient to rank the zones by means of $frac dw$ from lowest to highest and follow this order.
Let us compare two different orders of delivery that differ just by a swap in two consecutive destinations. So suppose that in the first case at a certain point you serve zone A at distance $d$ and weight $w$, and immediately after you serve zone B at distance $d'$
and weight $w'$. In the second case you reverse the order of these two destinations. The cost for the other zones is the same in the two cases, so it is sufficient to compare the costs of these two. Say that before serving zone A you have weight W. Then the cost in the first case is
$$C_1=Wd+(W-w) (d+d') +(W-w-w')d'.$$
In the second case the cost is
$$C_2=Wd'+(W-w')(d+d')+(W-w-w')d.$$
Then
$$C_1leq C_2iff -2wd'leq - 2w'diff frac{d}{w} leq frac{d'} {w'}. $$
Since through consecutive swapping we can reach any permutation then we can lower the cost until we reach the desired increasing order, when we can not decrease anymore.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3043880%2fwhat-is-the-fastest-route-to-drop-off-weight-when-time-is-proportional-to-weight%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
This is not an answer as I can't prove it, but perhaps others can (or show the error of my ways).
If all parcels weighed the same, the optimal strategy would be to unload the nearest parcels first. This means we could rank the zones to visit first by ranking them by their distance $d$, i.e. rank $r=d$.
If all distances were the same, the optimal strategy would be to unload the heaviest parcels first. This means we could rank the zones to visit first by ranking them inversely by their weight $w$, i.e. $r=frac{1}{w}$.
Putting these two observations together, it would seem a good first approximation would be to rank zones according to $r=frac{d}{w}$. If I do this, then computer simulation shows this gives exactly the optimal route for the first $2$ zones, the first $3$ zones, etc up to the first $6$ zones (after which my recursive algorithm encountered overflow).
It seems to me then that a simple ranking of the zones by $r=frac{d}{w}$ will give the optimal route.
EDIT
Changed my simulation from recursive to non-recursive and found the answer holds up to at least $8$ zones.
EDIT2
Improved simulation shows it works for $11$ zones. I'm convinced. :) It only remains to prove it will always work.
$endgroup$
add a comment |
$begingroup$
This is not an answer as I can't prove it, but perhaps others can (or show the error of my ways).
If all parcels weighed the same, the optimal strategy would be to unload the nearest parcels first. This means we could rank the zones to visit first by ranking them by their distance $d$, i.e. rank $r=d$.
If all distances were the same, the optimal strategy would be to unload the heaviest parcels first. This means we could rank the zones to visit first by ranking them inversely by their weight $w$, i.e. $r=frac{1}{w}$.
Putting these two observations together, it would seem a good first approximation would be to rank zones according to $r=frac{d}{w}$. If I do this, then computer simulation shows this gives exactly the optimal route for the first $2$ zones, the first $3$ zones, etc up to the first $6$ zones (after which my recursive algorithm encountered overflow).
It seems to me then that a simple ranking of the zones by $r=frac{d}{w}$ will give the optimal route.
EDIT
Changed my simulation from recursive to non-recursive and found the answer holds up to at least $8$ zones.
EDIT2
Improved simulation shows it works for $11$ zones. I'm convinced. :) It only remains to prove it will always work.
$endgroup$
add a comment |
$begingroup$
This is not an answer as I can't prove it, but perhaps others can (or show the error of my ways).
If all parcels weighed the same, the optimal strategy would be to unload the nearest parcels first. This means we could rank the zones to visit first by ranking them by their distance $d$, i.e. rank $r=d$.
If all distances were the same, the optimal strategy would be to unload the heaviest parcels first. This means we could rank the zones to visit first by ranking them inversely by their weight $w$, i.e. $r=frac{1}{w}$.
Putting these two observations together, it would seem a good first approximation would be to rank zones according to $r=frac{d}{w}$. If I do this, then computer simulation shows this gives exactly the optimal route for the first $2$ zones, the first $3$ zones, etc up to the first $6$ zones (after which my recursive algorithm encountered overflow).
It seems to me then that a simple ranking of the zones by $r=frac{d}{w}$ will give the optimal route.
EDIT
Changed my simulation from recursive to non-recursive and found the answer holds up to at least $8$ zones.
EDIT2
Improved simulation shows it works for $11$ zones. I'm convinced. :) It only remains to prove it will always work.
$endgroup$
This is not an answer as I can't prove it, but perhaps others can (or show the error of my ways).
If all parcels weighed the same, the optimal strategy would be to unload the nearest parcels first. This means we could rank the zones to visit first by ranking them by their distance $d$, i.e. rank $r=d$.
If all distances were the same, the optimal strategy would be to unload the heaviest parcels first. This means we could rank the zones to visit first by ranking them inversely by their weight $w$, i.e. $r=frac{1}{w}$.
Putting these two observations together, it would seem a good first approximation would be to rank zones according to $r=frac{d}{w}$. If I do this, then computer simulation shows this gives exactly the optimal route for the first $2$ zones, the first $3$ zones, etc up to the first $6$ zones (after which my recursive algorithm encountered overflow).
It seems to me then that a simple ranking of the zones by $r=frac{d}{w}$ will give the optimal route.
EDIT
Changed my simulation from recursive to non-recursive and found the answer holds up to at least $8$ zones.
EDIT2
Improved simulation shows it works for $11$ zones. I'm convinced. :) It only remains to prove it will always work.
edited Dec 17 '18 at 23:22
answered Dec 17 '18 at 21:39
JensJens
3,7152930
3,7152930
add a comment |
add a comment |
$begingroup$
The answer by @Jens is correct: it is sufficient to rank the zones by means of $frac dw$ from lowest to highest and follow this order.
Let us compare two different orders of delivery that differ just by a swap in two consecutive destinations. So suppose that in the first case at a certain point you serve zone A at distance $d$ and weight $w$, and immediately after you serve zone B at distance $d'$
and weight $w'$. In the second case you reverse the order of these two destinations. The cost for the other zones is the same in the two cases, so it is sufficient to compare the costs of these two. Say that before serving zone A you have weight W. Then the cost in the first case is
$$C_1=Wd+(W-w) (d+d') +(W-w-w')d'.$$
In the second case the cost is
$$C_2=Wd'+(W-w')(d+d')+(W-w-w')d.$$
Then
$$C_1leq C_2iff -2wd'leq - 2w'diff frac{d}{w} leq frac{d'} {w'}. $$
Since through consecutive swapping we can reach any permutation then we can lower the cost until we reach the desired increasing order, when we can not decrease anymore.
$endgroup$
add a comment |
$begingroup$
The answer by @Jens is correct: it is sufficient to rank the zones by means of $frac dw$ from lowest to highest and follow this order.
Let us compare two different orders of delivery that differ just by a swap in two consecutive destinations. So suppose that in the first case at a certain point you serve zone A at distance $d$ and weight $w$, and immediately after you serve zone B at distance $d'$
and weight $w'$. In the second case you reverse the order of these two destinations. The cost for the other zones is the same in the two cases, so it is sufficient to compare the costs of these two. Say that before serving zone A you have weight W. Then the cost in the first case is
$$C_1=Wd+(W-w) (d+d') +(W-w-w')d'.$$
In the second case the cost is
$$C_2=Wd'+(W-w')(d+d')+(W-w-w')d.$$
Then
$$C_1leq C_2iff -2wd'leq - 2w'diff frac{d}{w} leq frac{d'} {w'}. $$
Since through consecutive swapping we can reach any permutation then we can lower the cost until we reach the desired increasing order, when we can not decrease anymore.
$endgroup$
add a comment |
$begingroup$
The answer by @Jens is correct: it is sufficient to rank the zones by means of $frac dw$ from lowest to highest and follow this order.
Let us compare two different orders of delivery that differ just by a swap in two consecutive destinations. So suppose that in the first case at a certain point you serve zone A at distance $d$ and weight $w$, and immediately after you serve zone B at distance $d'$
and weight $w'$. In the second case you reverse the order of these two destinations. The cost for the other zones is the same in the two cases, so it is sufficient to compare the costs of these two. Say that before serving zone A you have weight W. Then the cost in the first case is
$$C_1=Wd+(W-w) (d+d') +(W-w-w')d'.$$
In the second case the cost is
$$C_2=Wd'+(W-w')(d+d')+(W-w-w')d.$$
Then
$$C_1leq C_2iff -2wd'leq - 2w'diff frac{d}{w} leq frac{d'} {w'}. $$
Since through consecutive swapping we can reach any permutation then we can lower the cost until we reach the desired increasing order, when we can not decrease anymore.
$endgroup$
The answer by @Jens is correct: it is sufficient to rank the zones by means of $frac dw$ from lowest to highest and follow this order.
Let us compare two different orders of delivery that differ just by a swap in two consecutive destinations. So suppose that in the first case at a certain point you serve zone A at distance $d$ and weight $w$, and immediately after you serve zone B at distance $d'$
and weight $w'$. In the second case you reverse the order of these two destinations. The cost for the other zones is the same in the two cases, so it is sufficient to compare the costs of these two. Say that before serving zone A you have weight W. Then the cost in the first case is
$$C_1=Wd+(W-w) (d+d') +(W-w-w')d'.$$
In the second case the cost is
$$C_2=Wd'+(W-w')(d+d')+(W-w-w')d.$$
Then
$$C_1leq C_2iff -2wd'leq - 2w'diff frac{d}{w} leq frac{d'} {w'}. $$
Since through consecutive swapping we can reach any permutation then we can lower the cost until we reach the desired increasing order, when we can not decrease anymore.
answered 2 days ago
DelDel
3,0671524
3,0671524
add a comment |
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3043880%2fwhat-is-the-fastest-route-to-drop-off-weight-when-time-is-proportional-to-weight%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
I think the weight of the lorry itself is irrelevant since it must travel a round trip to each zone independent of the order of the zones. That said, I suspect there is no straightorward algorithm. You'll need something like backtracking: en.wikipedia.org/wiki/Backtracking (I hope I am wrong and someone contributes a good answer for you.)
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:02
$begingroup$
I understand the optimization problem, but "time" sounds like the wrong name for what you want optimize. The lorry will just creep along at the start of the day. Fuel consumption is more likely to be proportional to that product. The fuel weight will be (essentially) constant for an electric lorry.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:27
$begingroup$
@EthanBolker I have added the fuel to be everlasting, as the point is fuel is not a factor to be concerned with.
$endgroup$
– Ben Franks
Dec 17 '18 at 16:29
$begingroup$
I understand that fuel is not a factor. What looks unreasonable to me is that equation for time, which (in real life) isn't close to proportional to weight. Of course the optimization question is independent of what you call that quantity.
$endgroup$
– Ethan Bolker
Dec 17 '18 at 16:31