I found a peculiar bug in the price simulator. When I was finetuning the price I had a demand of 184 PAX at $108, going to $109 the demand stayed the same, going to $110 it dropped to 183 PAX. So far so good, but going back down to $109 gave me a demand of 183 PAX now, going back down to $108 gave a demand of 184 PAX and going back up to $109 gave a demand of 184 PAX again. I did the price changes with the up and down arrows in the input (shouldn't make a difference since every new request should just grab whatever value's in the input, regardless of whether it was typed or selected).
Almost sounds like a rounding error, but unless the previous set price is factored in (which it shouldn't) any function should always return the same answer for any given X, regardless of a rounding error, which would simply give you the wrong answer. So if only the current price is taken into account most likely requests aren't idempotent and the server was handling the previous request again, or they are idempotent but for some reason the price wasn't updated in the new request. Or something else entirely. In any case this shouldn't happen and could potentially be causing problems somewhere else as well, so you might want to look into it.
Almost sounds like a rounding error, but unless the previous set price is factored in (which it shouldn't) any function should always return the same answer for any given X, regardless of a rounding error, which would simply give you the wrong answer. So if only the current price is taken into account most likely requests aren't idempotent and the server was handling the previous request again, or they are idempotent but for some reason the price wasn't updated in the new request. Or something else entirely. In any case this shouldn't happen and could potentially be causing problems somewhere else as well, so you might want to look into it.
Upvote
0