/**
  * Constructor requires BindingSite to initialize needed services.
  *
  * @param bs
  */
 public LoadBalancer(BindingSite bs, RobustnessController controller, CommunityStatusModel model) {
   this.setBindingSite(bs);
   this.controller = controller;
   this.moveHelper = controller.getMoveHelper();
   this.model = model;
   initialize();
   load();
   start();
 }
 private Map layoutFromSociety(CougaarSociety newSociety) {
   Map layout = new HashMap();
   String society = controller.getCompleteStatus();
   int index = society.indexOf("<community name=");
   index = society.indexOf("\"", index);
   String comm = society.substring(index + 1, society.indexOf("\"", index + 1));
   for (Iterator it = newSociety.getNodes(); it.hasNext(); ) {
     CougaarNode node = (CougaarNode) it.next();
     for (Iterator ait = node.getAgents(); ait.hasNext(); ) {
       CougaarAgent agent = (CougaarAgent) ait.next();
       layout.put(agent.getName(), node.getName());
     }
   }
   return layout;
 }