Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2003
    Location
    Belfast
    Posts
    16

    Unanswered: Simple Order Balancer

    I'm developing an e-commerce solution that needs order balancing to multiple shops. The more orders that are allocated to a particular shop along with the weighting should determine where an order gets sent.


    I have a locations table with some logic in it which determines the following information

    LocationWeighting
    ProcessedOrderCount
    PendingOrderCount
    LocationPriority

    Each one of these fields is an integer based value:

    Now the logic that I have at present is something like this.

    LocationPriority = (ProcessedOrderCount)+(PendingOrderCount) * LocationWeighting



    This gives a bit of a sliding scale so we can allocate more orders to certain Locations. Question is, is there a better way to do this perhaps with a percentage or other mathematical formula?

    I'd like to be able to say difinitively that one shop will get 10% of orders another will get 25% etc etc.

    The above is working, but can be quite extreme in its working, and isn't an exact science at present. For example to send more orders to Warehouse it has a weighting of 1, the least likely shop to receive an order has a weighting of 1000 to give a location priority that looks like this:

    Warehouse 86
    Next Likely 140
    Next Likely 250
    Next Likely 500
    Least Likely 4004

    etc etc.

    Any maths folks welcome to tackle this one. I'm prob just not seeing the simple answer.
    ---------------------------------------
    Make something idiot proof- and someone will make a better idiot
    ----------------------------------------

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Um...is this your desired result?
    Code:
    Warehouse 86 1.7%
    Next Likely 140 2.8%
    Next Likely 250 5.0%
    Next Likely 500 10.0%
    Least Likely 4004 80.4%
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Oops - I've just seen that the lower value means higher rating. Reverse the percentages in the above then.

    Also, please let us know your SQL Server version.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hang on a second.
    Firstly, you know this:
    Quote Originally Posted by paulanthony
    LocationPriority = (ProcessedOrderCount)+(PendingOrderCount) * LocationWeighting
    is the same as this:
    Code:
    LocationPriority = ProcessedOrderCount+(PendingOrderCount * LocationWeighting)
    ?
    You also know that the more stock the location has pending on order, the lower it's adjusted weighting? Is that deliberate?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Oct 2003
    Location
    Belfast
    Posts
    16
    You also know that the more stock the location has pending on order, the lower it's adjusted weighting? Is that deliberate?
    Yes,

    It should be less likely to get allocated the new orders that come in, so it fluctuates?

    would I be better using some combination of variance or standard deviationto stop the fluctation being so wild?
    ---------------------------------------
    Make something idiot proof- and someone will make a better idiot
    ----------------------------------------

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    eyeunno Is this not a business decision rather than a mathematical one? What is the specification from the business?
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •