Microservice for Rounding and Matrix Update

Lars Wentzel 2022-03-30

Back to Wentzel

Test Rounding of a Vector - a list of decimal values

Test Matrix Update

If you are interested to test the below services, you can contact me,
and I will give you the server address.

E-mail Lars Wentzel

The problem
Why do you need to round a sequence or a matrix (table) of decimal numbers?
well, the simple answer is that the rounded total (sum) is not equal to the sum of the single rounded values.

You can get this problem in several situations but for me it stated with a block update of a table or
matrix. That means that I want to change the grand total to a new higher or lower value. Then I will
try to keep the mix of the single numbers. The assumption is then that you only want integers in the
result like if you have vehicles, you don’t want decimal vehicles. So, when you have calculated the
new numbers some of them are decimal values. Then you would like to make ta matrix (table) round.

This handling is useful in e.g., planning. Let’s take an example from the Swedish Systembolaget (the
state-owned alcohol shops). The sales statistics is on city, product and week and you measure
everything in hL (100 liters). The products can be grouped on in lots of groups e.g., beer, wine, and
liquor or country and type. The time (weeks) can also be aggregated to quarters, half year, or years.

Download Full Text