“Magic” Prices with Prezzu

 

Prezzu can be used to configure flexible rounding rules to transform optimal prices (output variable OptimalPriceWithTaxes) into “magic” prices.

Rounding rules are set in the table above. Each row corresponds to a price range determining a specific rounding rule. The parameters for each interval are as follows:

  • Lower bound. Strict lower limit of the price interval to which the rule applies. For example, a lower bound of 30 means that prices in this interval are strictly greater than € 30.00.
  • Upper bound. Upper limit of the price interval to which the rule applies. For example, an upper bound of 200 means that prices in this interval are less than or equal to 200,00 €.
  • Scope. The modulo used to determine the floor and ceiling values. For example:
    • A scope (modulo) of 1.00 means that the transformations are from floor and ceiling values based on units. With a scope of 1.00, the floor value of a price of € 22.56 is € 22.00 and its ceiling value is € 23.00.
    • A scope (modulo) of 10.00 means that the transformations are from floor and ceiling values calculated based on the tens. With a scope of 10, the value of a floor price 22.56 € is € 20.00 and its ceiling value is € 30.00. 22.56 modulo 10 (the remainder of the division of 22.56 by 10) is 2.56 and that amount is used for applying the threshold (see below).
    • Any positive value is admitted as a scope (modulo): 1.00, 5.00, 10.00, 100.00, 150.00, 1000.00, etc.
  • Threshold. If the price modulo the scope (the remainder of the division of the price by the scope) is less than or equal to the threshold, it is rounded to the floor value of the scope (and the floor rule is applied). If the price modulo the scope is strictly greater than the threshold, it is rounded to the ceiling value (and the ceiling rule is applied). For example:
    • With a scope (modulo) of 1 and a threshold of 0.49, a price of € 22.56 is rounded to the ceiling value € 23.00 and the ceiling rule is then applied.
    • With a field of 10 and a threshold of 3.90, a price of € 23.87 to € 20.00 is rounded and the floor rule is then applied.
  • Floor rule. Amount to be added to the floor value. May be negative, which amounts to subtracting from the floor value. For example: € 0.00, € 0.10, € -0.10, € -1.00, etc.
  • Ceiling rule. Amount to be added to the ceiling value. May be negative, which amounts to subtracting from the ceiling value. For example: € 0.00, € 0.10, € -0.10, € -1.00, etc.

Examples are provided below.

  • The 3 rules in the screenshot above are as follows:
    • Row 1: For a price less than or equal to € 30.00: (i) if the euro cents are less than or equal to 49, the price is rounded to the lower euro minus 10 cents (example: € 23.34 -> € 22.90); (ii) if the euro cents are strictly greater than 49, the price is rounded to the upper euro minus 10 cents (example: € 16.67 -> € 16.90).
    • Row 2: For a price lower or equal to € 200.00 and strictly above € 30.00: (i) if the euro cents are less than or equal to 49, the price is rounded down to the lower euro (example: € 156.23 -> € 156.00); (ii) if the euro cents are strictly greater than 49, the price is rounded up to the next euro (example: € 148.79 -> € 149.00).
    • Row 3: For a price lower or equal to € 4,000.00 and strictly above € 220.00: (i) if the price modulo 5 (the remainder of the division of the price by 5) is less than or equal to € 2.5, the price is rounded to the lower nearest multiple of 5, minus 0.1 € (example: € 256.43 -> € 254.90); (ii) if the price modulo 5 is strictly greater than € 2.5, the price is rounded to the upper nearest multiple of 5, plus € 0.1 (example: € 258.83 -> €10).

  • The rule in the screenshot above is as follows:
    • For prices strictly above € 100.00: (i) if the euro units are less than or equal to € 5.00, the price is rounded to the lower nearest multiple of ten minus € 1.00 (example: € 154.13 -> € 149.00); (ii) if the euro units are strictly greater than € 5.00, the price is rounded to the upper nearest multiple of 10 minus € 1.00 (example: € 345,67 -> € 349.00).
    • Notice in this example the absence of an upper bound: all prices strictly above € 100.00 are processed.

  • The rule in the screenshot above is as follows:
    • For all prices: (i) if the euro units are less than or equal to € 4.00, the price is rounded to the lower nearest multiple of ten, plus € 1.00 (example: € 154.13 -> € 151.00); (ii) if the euro units are strictly greater than € 4.00, the price is rounded to the upper multiple of 10 minus € 2.00 (example: 344,67,23 € -> € 348.00).
    • Notice in this example the absence of lower and upper bounds: all prices are processed.