The code for beehive simulator