Automated generation of PLC code for implementing mode-based control algorithms in buildings | IEEE Conference Publication | IEEE Xplore