code: 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());
      }
docs: Adds an agent to the simulation
  
  @param sim
  - The shanks simulation
  @param agent
  - The new agent
  @throws DuplicatedAgentIDException