I am using LUA script to perform calculations in on_tick. If there is a big impact on the UPS, in the settings you can change how often all switches are updated. This mod has identical settings with LTN. Actually, I was inspired by this mod when creating.