A Review on Cyber-Physical Systems: Models and Architectures