opensmarthouse / opensmarthouse-core

Eclipse Public License 2.0
7 stars 0 forks source link

Consider wider pool of algorithmic functions for groups #33

Closed splatch closed 1 year ago

splatch commented 2 years ago

Currently we have only few algorithmic functions supported:

Most of other math operations can be done using other mechanisms. For example transformation services can help to scale up or down values received from bindings. However, there is no way, at least currently, to substract values between group members. I am aware that there are rules which can help with that, however since we have SUM operation we can also have it as part of the core. Current workaround for such an group is an extra item transformed with math operation (state * -1) to have a base and then set of of negative values which in the end simulate substraction. This is an overkill which is pretty hard to be managed over time. As much as all existing algorithmic functions now are independent of the order, the SUB is sensitive to it. It really depends which element is first, and which is last. That's why docs should be extremely clear on that.

splatch commented 1 year ago

I've attempted to get SUB function a while ago and, even if it did what it was supposed to do, overall behavior was not reliable and possible to control with item framework.