Page 1 of 1

[15.9] rounding error at read liquid train content

Posted: Fri May 12, 2017 1:33 pm
by Quolz
I'm working liquid unload station wich can unload all liquids with only 1 train station.

the station is unloading the liquid, however there stays 0.1 in each tank so the train condition untill inventory empty is never hit.

the problem:
1. Read Train content reports 0, even though it should report 0.3. <--- bug here
2. combinater reports anything >0 as false
3. second combinator reads content of each liquid and reports 1 for each missing liquid.
4. pumps go on if liquid condition = 2 (2 + 3)

Solution: Read train content should report the float 0.3 in this example


Blueprint (fill a train wagon with lubriquant):
0eNrdml2vqjoQhv9Lr2GH0g8/cs75Izs7BqVqc7CQUsw2K/73U8CliNROdedcuC5WIsrD8M7MOy36hdZFIyotlUHLLyQ3parR8ucXquVOZUV7zJwqgZZIGnFAEVLZoX1Vm1JnOxGbTP2LzhGSKhe/0RKfI++pOpPF4JT0/CtCQhlppOgv3b04rVRzWAttmdczN40+ijzuABGqytqeU6r2Qu2lZxE6oWWMiWXnUotN/yZrQxohUyAS98jZPTGdIJKBMha22xsXk17CTO6hZAJKr9CDyGVziEVhP67lJq7KQjyy5z/YJeAf7DzBY9AgYzzvQdx/5xwO5WDoDA6lYOgcDk3B0AUcmoCh7UeBVHiiMAZD4YnCKRgKTxQGd1MMTxSmUGhAnsAdFRAnuKECBAX3U0Dm54Hu1LpST6fT9oRvvVQ1h2qCwK6E+/isEnZwGV0Wq7XYZ0dZ6vaUjdSbRpqVfS+/crZS12b1MKOOUpsmKwYTrvtEnKmT2Uu1aydWOxztwDNdOjflocp0ZtpLob/RuX9f9SHVLRm3/3ZaCDUcazK3pyeD2+8O2Cl4ntIkTXya8A/RBC9cEmCfBORTyiIdlwV1aZL6NKGfogkeaeKuE+LTBH+KJnRcJ9bfv6PtXrskoj6J0k+RiIwlwi5NWOgcSzxzLL1N8EpWdo9UxjtdNip/xrIeNlJ8inyb47nYyFzo2Iq0lqoT6YFObmHej/PpZF6Qt2TWL2RTHIWeymcyyuc/9syyMVXzBrs62VgbZVZbXR5WUlkYWm6zohZhtdI6SoRSeDERDOy30DUS9ZXWbYnUruNUbPfhlXMVR0Fpr4XKV6ZcdcCLfhHSIst7XS/HjW5EkKojT3L1H7mtcL6r5WlRz4cSQTxqKwsjtOOpxrZoZH4rtKJZ2+S0BdvdatNWbswT++d5xDHi7EV2PMVl/6BjmpNCOEW3VH/KIRBOJVpZhC3AXVa7WRTCqpti27QlnFm7cLNY11Tgchm3lLNccJAFfm+6/18PzDb75+731yvud6X+Id8j410IJT4jBK4zSBroe5gM5+AUkdzN1Gd7w9RBoD4C9xEYfK5fjRw7WNwXDfFFM/MRqI8w9xGwj7DwEVIPgSY+QuIj+LaHg0R4H2rQ0ML1VR0l04/MH0DXhyNJF+cbvjnq6fFegSWOpqUUGCpO7mN9cFVY5HS8qqLMFRmDRkackdGQyFzbbspfLA/Hco7Owh2FQTYKdB4O5o4YF6D+YpD2YklgN/C30jguMDZuDkYciWY4tBf4O63AxpOYuSYrS0Nb4S0JmWsZxkJ9DeM/K9DY1rjL1liwrT2GGiTZQ9W5bI0F29qbIrpsjXFQi+MU1OOzFz0SO5ZK7AUvwxzikmzxaqgOr+Sh/vYYJ3+n1LirXXmwn10iA8fCxx3KXRbGgy0Mv2WublEIdAWNHV+ocwovTTJk3ad8igzfa7jBk1/XA3t9AvYr6n/JsRz8ZiRCR6Hr/jYoTVmyWKScns//Aa2zZ9g=

Re: [15.9] rounding error at read liquid train content

Posted: Fri May 12, 2017 1:49 pm
by kovarex
Hello, this is not a bug but a design decision. All the combinator logic works on whole numbers and we want to keep it like that. When the conversion to these is needed it is rounded down.

Re: [15.9] rounding error at read liquid train content

Posted: Fri May 12, 2017 2:06 pm
by Quolz
Hi

Thanks, but then it's not working intuitively...if the train station would be rounding up, it will solve this case. Now sure if there are other cases where it should round down...

Seem if I have to find a patchwork approach :roll: