SMT-based planning for robots in smart factories