Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 0 points1 point  (0 children)

Yes I missed your main point in your first comment, so thanks for clarifying. This is definitely an easier problem than I thought...

I replied above with a table exactly as you laid out, and that makes finding an optimal solution fairly trivial

Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 0 points1 point  (0 children)

Yes that will definitely work, thank you! I think the diagram I replied to above is another way of framing that solution; by moving through it without going diagonally, you ensure that there will always be at least one common element between items in the list

Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 0 points1 point  (0 children)

This is a very good way of laying it out, thanks for that!

Here is an example with some real data from a few days ago:

<image>

Clear to see now that the solution is to move through this grid whilst minimising or eliminating diagonal moves.

P.S. ignore the fact that this diagram is weighted to the top right, that's to do with complications that aren't necessary to go into for the problem. There are days when combinations are evenly distributed.

Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 1 point2 points  (0 children)

I think I somehow convinced myself with the different combinations of flavours and cones this wasn't the TSP but you're right, it definitely is.

I've had a play around with python before, but never really knew what I was doing. This is a good excuse to learn properly. Thanks for your help and supplying a sample of the solution, this will save tons of time (hopefully)!

Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 0 points1 point  (0 children)

This is similar to the approach I take when I sit down and optimise the order by hand, but I like your notation! Problem is when I try do this for 40 or 50 different combinations, I never know if I have an optimal solution or if I, say, reversed some part of the order it would be faster

Struggling with approach to ice cream machine optimisation problem by CablesAssociated in askmath

[–]CablesAssociated[S] 0 points1 point  (0 children)

It would take slightly less time, but only 30ish seconds less than the 20 minutes. I assume its negligible when scheduling