public static void addNewAgent ( ShanksSimulation sim , ShanksAgent agent ) throws ShanksException { sim . registerShanksAgent ( agent ) ; if ( sim . schedule . getTime ( ) < 0 ) { sim . schedule . scheduleRepeating ( Schedule . EPOCH , 2 , agent , 1 ) ; } else { sim . schedule . scheduleRepeating ( sim . schedule . getTime ( ) , 2 , agent , 1 ) ; } sim . logger . info ( "Added a new agent to the simulation: " + agent . getID ( ) ) ; }
Adds an agent to the simulation