Modeling of Cellular Automata and Agent-Based Complex Systems