• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Stupid computers!

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Stupid computers!

    Due to the simplistic postage calculations on my website, it sometimes costs us a lot more to post a large order than we have charged for, so I was attempting to implement some proper calculations. By weight is obviously easy enough but one also has to calculate what could fit in a large letter and Parcel Force charges by volume. How do you arrange items of different sizes to make up the least volume where volume is based on the maximum dimension in each direction?

    Thought this would simple but it ain't. You need to be a professor:

    algorithm - How can I programmatically determine how to fit smaller boxes into a larger package? - Stack Overflow

    But actually packing something sensibly yourself requires almost no thought at all, proving computers have a long way to go before they take over the world. If they had asked The Terminator to fit various quantities of different items x, y and z in a square box, he would have gone "cannot compute, cannot compute, cannot compute, ..." in a rising pitch and his head would have exploded. Problem sorted.
    bloggoth

    If everything isn't black and white, I say, 'Why the hell not?'
    John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

    #2
    Originally posted by xoggoth View Post
    Due to the simplistic postage calculations on my website, it sometimes costs us a lot more to post a large order than we have charged for, so I was attempting to implement some proper calculations. By weight is obviously easy enough but one also has to calculate what could fit in a large letter and Parcel Force charges by volume. How do you arrange items of different sizes to make up the least volume where volume is based on the maximum dimension in each direction?

    Thought this would simple but it ain't. You need to be a professor:

    algorithm - How can I programmatically determine how to fit smaller boxes into a larger package? - Stack Overflow

    But actually packing something sensibly yourself requires almost no thought at all, proving computers have a long way to go before they take over the world. If they had asked The Terminator to fit various quantities of different items x, y and z in a square box, he would have gone "cannot compute, cannot compute, cannot compute, ..." in a rising pitch and his head would have exploded. Problem sorted.
    Change the angle from which you approach the problem.

    T2 would simply have rearranged the dimensions of the package before inserting it neatly into the smallest package possible.

    Comment


      #3
      I'm sure there are no rules to say parcels must be cuboid shaped.

      So maybe you could simply arrange your packages in increasing size order, then enclose them all in shrink wrap to make a flexible snake-like parcel.

      OH in "trying to think outside the box (literally)" mode
      Work in the public sector? Read the IR35 FAQ here

      Comment


        #4
        no rules to say parcels must be cuboid shaped
        Unfortunately there are for Parcel Force:

        if your package is irregularly shaped, the volumetric weight is calculated based on the dimensions of the smallest cubic shape the package will fit into.
        Last edited by xoggoth; 25 June 2015, 10:37.
        bloggoth

        If everything isn't black and white, I say, 'Why the hell not?'
        John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

        Comment


          #5
          Do you have a record of the charged vs actual costs? Have you checked that the under charges actually do outweigh the over charges? You might find that there's no real issue - or if there is, simply adding 10% across the board covers it. Or some kind of surcharge based on weight.

          Play around with the figures and see if you can come up with a simplish formula that covers what your customers actually order, and means overall, you're ahead.

          That's far better than trying to find an ideal solution. Alternatively, there are commercial APIs available that do a good job - buy one.
          Down with racism. Long live miscegenation!

          Comment


            #6
            Sensible stuff. What I thought originally before deciding to see if anything could be done more rigourously. Now I am so flippin' OCD I will be obsessed with it until I find a solution.
            bloggoth

            If everything isn't black and white, I say, 'Why the hell not?'
            John Wayne (My guru, not to be confused with my beloved prophet Jeremy Clarkson)

            Comment


              #7
              Originally posted by xoggoth View Post
              Sensible stuff. What I thought originally before deciding to see if anything could be done more rigourously. Now I am so flippin' OCD I will be obsessed with it until I find a solution.
              Ah yes the old Knapsack Problem, related to the Cutting Stock Problem, and pondered upon since before stupid computers were invented.

              Not simple in 1D and you want to do it in 3D.

              Comment


                #8
                If you do come up with a simple solution you have a perfect PlanB

                You could sell it to all the ficking useless tulip courier companies, the even more ficking useless tulip mail companies and make an absolute fortune.

                I know from painful personal experience that none of the aforementioned ficking useless tulip companies have anything more sophisticated than a trained chimp randomly selecting which ficking stupid algorithm will be used for any particular item.

                FFS My last example of the ficking stupidity of these people was that it apparently cost twice as much to send a cylinder of x cm diameter than it cost to the same ficking thing in a long square box unless it was fairly heavy as above this weight the long square box fell into a different category but the cylinder didn't.

                So if you want to send a poster cheaply you should put it in a long square box not in a poster tube but if you want to send gold ingots you should pop them into a cardboard tube first! It's ficking madness I tell you! ficking madness!

                Comment


                  #9
                  Originally posted by Dactylion View Post

                  So if you want to send a poster cheaply you should put it in a long square box not in a poster tube but if you want to send gold ingots you should pop them into a cardboard tube first! It's ficking madness I tell you! ficking madness!
                  I'm not trusting my gold ingots to the vagaries of Royal Mail (or worse, Yodel!)

                  Comment


                    #10
                    Originally posted by mudskipper View Post
                    I'm not trusting my gold ingots to the vagaries of Royal Mail (or worse, Yodel!)
                    According to folklore it used to be done all the time in places like Hatton Garden.

                    Apparently the penalties for robbing or interfering with the Royal Mail were stricter than for plain nicking stuff and if it was your gold the risk of your stuff getting nicked was lower.

                    Obviously in those halcyon days the Royal Mail provided a service where next day delivery was...... well lets just leave it at they provided a service.

                    I can't say I believe the folklore completely but it's a good yarn! I certainly remember post arriving reliably a couple of times a day rather than in bulk on random days with gaps of several days with nothing.

                    Also strictly speaking it wasn't ingots they allegedly posted just jewellery and gems.

                    Comment

                    Working...
                    X