Weighted Constraint Satisfaction for Smart Home Automation and Optimization (Advances in Artificial Intelligence, 2016)