Stupid non-monotonous pricing

Discussion in 'Shapeways Shops' started by Oskar_van_Deventer, Apr 21, 2011.

  1. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
    Hi Shapeways,

    I noticed that there are big price differences between some of my models. It took me a while to find out what happened: some of my models were just above the 10% density discount limit, and some just below.

    In order to understand what is going on, I have uploaded a set of models with a constant bounding box and varying density. This is realistic for me, as I can reduce the bounding box of a set of puzzle pieces only to a certain point.

    The figures below show an example of the test models that I used, and a graph with the price for a given 3D-printed volume.

    To my big surprise, the graph is highly non-monotonous. At some point, adding some dummy parts can save me up to $200 for a single model. You can imagine that I am very not amused by this discovery, especially since I am making large efforts to minimize the 3D-printed volume.

    What do you want me to do? Go over all my 100+ models and start adding some dummy parts to get the density discount? I do not believe this helps anyone. It cost me excessive time and it cost you extra 3D-printing time and volume.

    I suggest that you change your pricing model to one that encourages the behavior that you wish to encourage
    -Minimize 3D-printed volume
    -Minimize bounding box

    Here is a simple pricing scheme that just does that.
    Price = a + b * (printed volume) + c * (bounding box)

    Best regards,


    Shapeways pricing.jpg
    Last edited: Apr 21, 2011
  2. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
  3. stannum
    stannum Well-Known Member
  4. pete
    pete Shapeways Employee CEO & Co-Founder
    Am very surprised by this result and immediately looked at the code for our pricing - this should not happen.

    The implementation is as follows in pseudo code:

    If (density > 10%) and (Volume > 30cm3)
    price = 1.50 + (V-30)*1.50 + V*1.50*.60
    price = 1.50 + V * 1.50

    Can you share your test models - would love to run some tests.

  5. stannum
    stannum Well-Known Member
    It's pretty common when buying in bulk (tshirts, screws, tyres, paints...) with multiple ranges and a per unit price. You look at the scales provided by the supplier (as example, in 100s) and then realize that if you need 190 items you better just ask for 201, because you are overpaying for going above 175, so just get the extra 11 as spares.

    Are you sure the pseudocode to match the material's page description isn't something like 1.50 [start] + 30*1.50 [base at full price] + (V-30)*1.50*0.60 [discounted zone]? 1.50 + (V-30)*1.50 + V*1.50*.60 looks wrong.
  6. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
  7. TomZ
    TomZ New Member
    Interesting to see Oskar, that within two days of me, you complained about exactly the same thing.

    The pseudocode you posted for the density discount can not be right. It comes out to $130 for a model that really is $50. In fact, the code you posted must be for density punishment rather than density discount :laughing:
    Yes, the blue line is your "discount". The purple/red line is the normal price, the brown line is the actual density discount. Forgive me for not labeling the axes, vertical is price and horizontal is volume.

    I've always calculated it as follows and that has always matched the pricing of my models:

    The solution, in my mind, would be quite easy. Taking V for volume and D for density;

    IF volume < 30
    PRICE = MIN[1.5+V*1.5, MAX[16.5+30*0.75, 16.5+V/D*0.075 ] ]
    IF V> 30 AND D > 10
    PRICE = 16.5+0.75*volume
    PRICE = MIN[1.5+1.5*V, 16.5+V/D*0.075]

    In natural words: If the volume is smaller than 30, we have to consider the regular price, and the price if we bump up the volume a little so we can get the discount. However, just bumping up the volume to 30 is not enough; the density might still be lower than 10% for a model of 30cc in the same box. However, if we raise the density to 10% it might not have enough volume. So we calculate the maximum of the price for a density-discounted model of 30cc and the price for a density-discounted model of V/D/10cc. We have to take the minimum of this maximum and the regular price.
    For a model with V>30 and D>10 we can just use the density discount, no checking needed.
    In the case that the model has V>10 and D<10 we need to find the minimum of the regular price and the price for the model, with the volume increased to get the discount.

    V/D*0.075 is really just a shorthand way to write "amount of volume needed to make it to 10% density" times 0.75. V/D is the actual boundingbox (since D=V/B), we need to multiply by 0.1 to find the volume for 10% density, and by 0.75 to find the price.
    Last edited: Apr 22, 2011
  8. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
    Hi Peter,

    You can simply remove the spurious effect by following the suggestion by TomZ posted here here.His suggestion would change your pseudo code as follows.

    If ((V < 30cm3) or (V < ((0.1 * B -30) * 1.50 + 0.1 * B * 1.50 * 0.60) /1.50))
    price = 1.50 + V * 1.50
    else if (V > 0.1 B)
    price = 1.50 + (V-30)*1.50 + V*1.50*.60
    price = 1.50 + (0.1 * B -30) * 1.50 + 0.1 * B * 1.50 * 0.60

    In this pseudo code, there are the following variables and parameters.

    B = Bounding box volume in cm^3
    V = Printed volume in cm^3
    1.50 $/cm^3 = Non discounted price per volume
    0.60 = Discount ratio
    30 cm^3 = Part of volume for which there is no discount

    The first lines match with your pseudo code, whereas the last line removes the spurious effect. Note that in the last line (the "twilight zone"), there is only the volume of the bounding box and not the 3D-printed volume.

    Best regards,

    Last edited: Apr 22, 2011
  9. pete
    pete Shapeways Employee CEO & Co-Founder
    OK - I should not post code late in the day.
    [ maybe I should not post code anytime ? ;) ]

    Sorry about the confusion.

    The code should read:
    if (V<20) or (d < 0.1)
    P=1.50 + V *1.50
    if (V>20) && (d>0.1)
    P=1.5 + 20*1.50 + (V-20)*1.50*.50

    So this is what we use now.
    That making models more dense, makes them cheaper is what we want cause it is much more efficient on the machine.

    What we need to do is try to remove non-monotonous behavior.
  10. TomZ
    TomZ New Member
    There is a really easy fix to make the pricing continuous. If we consider a model with volume V and bounding box B:

    PRICE = min( 1.5+1.5*V , 16.5+0.75*max( V , 20 , B/10 ) )

    This formula takes the minimum of the regular price of a model for volume V, and the discounted price for a model of volume max( V , 20 , B/10 ). This basically takes the volume of the model, and increases it so that it is greater than 20 and the density is also greater than 10%. This may or not may be cheaper than the normal price, if it is cheaper then we should use the cheaper price, since a user can currently just add dead weight to his model to get to this lower price.

    Of course, this is still not ideal. Using less bounding box or using less volume does not always lead to a decrease in price. Maybe that does make sense (cost of material/printing negligible compared to manual labor/shipping) but using this model, the differences can be quite great.
    Last edited: Apr 22, 2011
  11. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
    Hi Shapeways Shop Owners,

    Given the peculiarity of the Shapeways pricing model, I am now adding dummy cubes to my models to cross the 10% density threshold and save myself money big time.

    By adding the cube on the photo below, I saved myself over $50 on an order.

    I have suggested to Shapeways that they did not need to actually print these "money-saving cubes", but from the logistic point of view it is apparently cheaper to just print them.


    Dummy - prototype.jpg
  12. noesis
    noesis New Member
    See Pete, this is what happens when you take really smart puzzle making guys like Oskar as clients ;)

    Oskar, my suggestion is to begin actually marketing the "money saving cubes" perhaps on Ebay, seriously "money saving cube" has a nice ring to it. :)

  13. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
    Hey Shapeways,

    I flagged the problem of the non-monotonous pricing in April 2011. It is December now. It cannot be that much work to correct the pricing scheme. What is taking you so long?

  14. duann
    duann New Member
  15. Oskar_van_Deventer
    Oskar_van_Deventer Well-Known Member
    Hi Peter and Duann,

    Are you taking your customers seriously?

    The pricing error was flagged over a year ago. Peter publicly acknowledged the mistake. I followed Duann's advice and published the error also here. I have moved the big puzzlers community to flag the problem to your developers here ck/suggestions/2472605-correct-non-monotonous-pricing-scheme
    collecting 105 votes to correct the problem.

    The solution would take your developer five minutes of work.

    Why are you not responding?

  16. bartv
    bartv New Member
    Hey all,

    I'm currently working on getting this issue back on the radar. As a preparation, I want to make sure I've got my head properly wrapped the issue:

    1. We offer a discount when your printed volume exceeds 20cm3 and the density of your model is higher than 10%: the first 20cm3 are charged at $1.4/cm3. After that, $0.70/cm3 (plus start-up fee).

    2. Due to an error in our calculation, there's a discontinuity at 20cm3, causing a price drop.

    3. This is an error in your advantage, although it's clearly some work in some cases to make it happen.

    4. Fixing the algorithm would increase the price for models over 20cm3.

    As displayed here: (prices only for illustration):


    As we won't be able to lower the prices/cm3 either for the first 20cm3 or the remaining volume, this will always result in a price increase. Are you really that eager to get this fixed? :-/

    Forgive me if I ask the wrong questions, just trying to understand the underlying issue here.


    Attached Files:

    Last edited: May 21, 2012
  17. tessman
    tessman New Member
    I don't know about that bug (or feature), where the price drops in the graph of volume versus price, but I think Oskar was referring to a discontinuity in the 3-dimensional graph (volume x density x price). There's a line in the graph where the density increases beyond 10% (for volumes above 20cc) and the price drops discontinuously. This is where adding volume (such as a separate cube) can push the density past 10%, drastically reducing the price. This is a flaw in the (3-variable) formula, rather than a bug.
  18. TomZ
    TomZ New Member
    I think your understanding of the problem is somewhat wrong.

    "1. We offer a discount when your printed volume exceeds 20cm3 and the density of your model is higher than 10%: the first 20cm3 are charged at $1.4/cm3. After that, $0.70/cm3 (plus start-up fee)."
    This is correct. We can actually write this somewhat more efficiently as
    - PRICE(V, D) = 15.5 + 0.7*V IF V > 20 && D > 0.1
    - PRICE(V, D) = 1.5 + 1.4*V ELSE
    I promise this is entirely equivalent to what you're doing.

    "2. Due to an error in our calculation, there's a discontinuity at 20cm3, causing a price drop."
    This is not the case, the pricing is entirely continuous at this point: PRICE(19.9, 0.5) = 29.36 and PRICE(20.1, 0.5) = 29.57 so you see there is no jump. The current pricing does follow the blue line (intended price).

    The real problem is the following: suppose I've got a model of 99cm3 that has a bounding box of 10x10x10cm. It has a density of 0.099, so it does not get the discount. The price becomes $153.60.
    Suppose now I added a little tiny box of 1x1x2cm to my model, just a dummy object. This adds 2cm of volume, bringing the model up to 101cm3. But my model has a lot of empty space, so I do not need to make the bounding box larger to accommodate this extra part. The density is now 0.101, so the model gets the discount. The price is now $86.2.
    As you can see, I have nearly slashed the price of my model in half by adding a little volume to it.

    What we are suggesting, is that Shapeways does this adding of volume automatically. Not everybody is smart enough to realize that they can make their models cheaper by increasing the volume and I have noticed a few threads on the forums of people being really, really confused about it.

    We want Shapways to do this automatically. There's no reason why decreasing the volume of a model should make it more expensive to print.

    Our suggestion for a new pricing algorithm is to calculate the minimal density-discount eligible price: the maximum of {model_volume, 20, boundingbox_volume/10}. The price of the model is then calculated as the minimum of the normal price (1.5 + 1.4 * model_volume) and the density-discount price (15.5 + 0.7 * max{model_volume, 20, boundingbox_volume/10}).
    All this does is automate the process of a user going in and increasing the volume of the model so it meets the requirements for the density discount.
  19. bartv
    bartv New Member
    Ah, it's the DENSITY that causes the jump!! Thanks! I'm going to ponder that for a little bit and then get back to you.

  20. stonysmith
    stonysmith Well-Known Member Moderator
    Maybe we need to print a 3d model of the prices?? So that everyone can "get their hands" on the idea? [GRIN]