Multi-store part buying optimiser

Hello everyone,

I am Mark, a computer science PhD student from the Netherlands. Frustrated that the multi-store tool from Rebrickable doesn't have a good optimisation algorithm and that BrickLink's easy-buy tool only works for BrickLink (and finds solutions that are far from optimal), I said to myself: I can make a tool myself, how hard can it be? Well it turns out to be VERY complicated. So this hobby project of mine completely grew out of hand. I spend over a year working evenings and saturdays to get a good algorithm. But: IT WORKS!!

I have already integrated the real data from BrickOwl on which store is selling which lot. In short the tool can now:
1. Get a part list of a MOC from Rebrickable
2. For each part and color combination, lookup the corresponding BrickOwl ID
3. Get the available lots from the BrickOwl API
4. Compute a good solution

In other words: finding a cheap distribution of parts over stores comes at the click of a button, and generates a solution that is way better than a human could ever find!

The only missing puzzle piece is the shipping information. I could use your help on this point. The BrickOwl API doesn't expose the shipping costs of stores, an essential ingredient in the algorithm. I have made a suggestion in the 'Suggestions' subforum. If you want to support this project you can head over to https://www.brickowl.com/forum#/discussion/14749/shipping-costs-in-the-api and give the suggestion an upvote!

I am super excited that it is nearly finished and hope to launch the tool with a web interface in the summer! I think it could be very beneficial to the BrickOwl community. For MOC builders because they save money. For part sellers because the algorithm can pick up new unknown stores that turn out cheap (due to part price or proximity to the buyer).

Comments

  • 3 Comments sorted by Votes Date Added
  • By the way, the algorithm supports a novel feature: you can add parts for which you don’t care what the color is (for internal bricks of the build). Suppose you want 5 red 2x4 bricks, 10 blue and 20 for which you don’t care what the color is. My tool will figure out the cheapest option:
    - 25 red and 10 blue, or
    - 15 red and 20 blue, or
    - 10 read, 10 blue and 15 black
    or any other combination.
  • Have you also taken into account lot limits and minimum buys? Just wondering... :-) Also - maybe a dumb question - wondering if you've chatted with BO admin re this? There might be a long-term win-win here if there are improvements in your code to BO's wishlist tool? Just thinking out loud. :-)
  • Hi! I've had contact with Lawrence over e-mail. He instructed me to make a suggestion in the forum to add shipping information in the API. I totally agree that there could be an amazing win-win situation. In the post in the suggestion forum I also shared some of the results: my tool leads to MUCH better results than BrickLinks tool.

    The current algorithm does not take average lot values and minimum buys into account. I do have a solid idea on to add them in the equation though. It will take some time until I get to it. First I am focussing on making it a robust tool that people can use via the web browser. And I am in the last stages of writing my PhD thesis....
Sign In or Register to comment.