Pitfalls and Remedies in Modeling and Simulation of Cyber Physical Systems