Stupid nonmonotonous pricing [message #26327] Thu, 21 April 2011 20:30 UTC 


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 3Dprinted volume.
To my big surprise, the graph is highly nonmonotonous. 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 3Dprinted 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 3Dprinting time and volume.
I suggest that you change your pricing model to one that encourages the behavior that you wish to encourage
Minimize 3Dprinted volume
Minimize bounding box
Here is a simple pricing scheme that just does that.
Price = a + b * (printed volume) + c * (bounding box)
Best regards,
Oskar
[Updated on: Thu, 21 April 2011 20:31 UTC]





Re: Stupid nonmonotonous pricing [message #26338 is a reply to message #26335 ] Fri, 22 April 2011 01:16 UTC 


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 + (V30)*1.50 + V*1.50*.60
else
price = 1.50 + V * 1.50
Can you share your test models  would love to run some tests.
Peter



Re: Stupid nonmonotonous pricing [message #26339 is a reply to message #26338 ] Fri, 22 April 2011 02:45 UTC 


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] + (V30)*1.50*0.60 [discounted zone]? 1.50 + (V30)*1.50 + V*1.50*.60 looks wrong.



Re: Stupid nonmonotonous pricing [message #26348 is a reply to message #26338 ] Fri, 22 April 2011 06:37 UTC 


pete wrote on Fri, 22 April 2011 01:16  Can you share your test models  would love to run some tests.

Hi Peter,
Here you are.
Best regards,
Oskar



Re: Stupid nonmonotonous pricing [message #26349 is a reply to message #26327 ] Fri, 22 April 2011 06:50 UTC 


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
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:
V*0.75+16.5
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
ELSE
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 densitydiscounted model of 30cc and the price for a densitydiscounted 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.
[Updated on: Fri, 22 April 2011 07:01 UTC]



Re: Stupid nonmonotonous pricing [message #26351 is a reply to message #26338 ] Fri, 22 April 2011 07:19 UTC 


pete wrote on Fri, 22 April 2011 01:16 
If (density > 10%) and (Volume > 30cm3)
price = 1.50 + (V30)*1.50 + V*1.50*.60
else
price = 1.50 + V * 1.50

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 + (V30)*1.50 + V*1.50*.60
else
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 3Dprinted volume.
Best regards,
Oskar
[Updated on: Fri, 22 April 2011 07:43 UTC]



Re: Stupid nonmonotonous pricing [message #26381 is a reply to message #26351 ] Fri, 22 April 2011 18:31 UTC 


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 + (V20)*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 nonmonotonous behavior.



Re: Stupid nonmonotonous pricing [message #26391 is a reply to message #26327 ] Fri, 22 April 2011 19:34 UTC 


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.
[Updated on: Fri, 22 April 2011 19:37 UTC]




Re: Stupid nonmonotonous pricing [message #28148 is a reply to message #27465 ] Wed, 25 May 2011 04:18 UTC 


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.



Re: Stupid nonmonotonous pricing [message #40718 is a reply to message #28148 ] Sat, 24 December 2011 20:56 UTC 


Hey Shapeways,
I flagged the problem of the nonmonotonous 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?
Oskar





Re: Stupid nonmonotonous pricing [message #48731 is a reply to message #47654 ] Mon, 21 May 2012 12:51 UTC 


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 startup 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.
Bart
[Updated on: Mon, 21 May 2012 12:51 UTC] Community Manager Europe  Shapeways



Re: Stupid nonmonotonous pricing [message #48733 is a reply to message #48731 ] Mon, 21 May 2012 14:00 UTC 


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 3dimensional 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 (3variable) formula, rather than a bug.



Re: Stupid nonmonotonous pricing [message #48734 is a reply to message #26327 ] Mon, 21 May 2012 14:04 UTC 


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 startup 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 densitydiscount 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 densitydiscount 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.



Re: Stupid nonmonotonous pricing [message #48735 is a reply to message #48734 ] Mon, 21 May 2012 14:10 UTC 


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.
Bart
Community Manager Europe  Shapeways



Re: Stupid nonmonotonous pricing [message #48740 is a reply to message #48735 ] Mon, 21 May 2012 17:59 UTC 


Maybe we need to print a 3d model of the prices?? So that everyone can "get their hands" on the idea? [GRIN]
Patience, Persistance, Politeness  the 3Ps will help us get us to Perfect Printed Products



Re: Stupid nonmonotonous pricing [message #48745 is a reply to message #48740 ] Mon, 21 May 2012 22:45 UTC 


p=price
x=volume
y=price/cc
c=startup
d=density(10=10%)
if (d>10) {
p=20*y+(20x)*y/2+c;
} else {
p=min(xy,20*y+(x/(d/10)20)*y/2)+c;
}
this code works perfectly. it works by computing both the price without discount and the price with discount as if a person manually added extra mater to make it 10%.
Follow me on twitter http://twitter.com/mctrivia or my blog at http://4ddice.blogspot.com/


