public static void addEntity(SimEntity e){
  SimEvent evt;
  if (running) {
    evt=new SimEvent(SimEvent.CREATE,clock,1,0,0,e);
    future.addEvent(evt);
  }
  if (e.getId() == -1) {
    int id=entities.size();
    e.setId(id);
    entities.add(e);
    entitiesByName.put(e.getName(),e);
  }
}

public static void addEntity ( SimEntity e ) { SimEvent evt ; if ( running ) { evt = new SimEvent ( SimEvent . CREATE , clock , 1 , 0 , 0 , e ) ; future . addEvent ( evt ) ; } if ( e . getId ( ) == - 1 ) { int id = entities . size ( ) ; e . setId ( id ) ; entities . add ( e ) ; entitiesByName . put ( e . getName ( ) , e ) ; } }
add a new entity to the simulation . this is present for compatibility with existing simulations since entities are automatically added to the simulation upon instantiation .
