Modeling and Simulation Applied to Security Systems