home › Forums › # Technical Support › Time and Absolute Values? › Reply To: Time and Absolute Values?
Hi Juan,
Our use case for fuzzylite is in a HVAC controller for hotel rooms. We currently have hardcoded some rules to take advantage of off-peak electricity tarrif’s as well as room occupancy.
So, rules would be like:
if room = occupied & time > 6pm & tempsetting = cold then aircon = fullspeed
if room = occupied & time < 6pm & tempsetting = cold then aircon = halfspeed
The reason we ask for time based rules, is that the off-peak tariffs are changing on a frequent basis. The reason I would prefer to have this handled directly in the fuzzylite engine (rather than externally) is that the rules will be edited by normal users, (not necessarily IT staff)
I’m thinking the changes would have to be in Function.cpp. We could add a new function say Time(“string”) and in Function::parse, test for literal strings rather than variables, and maybe some conversion functions to convert from strings to input variables from the rule blocks.
Do you follow me?