예제 #1
0
 public void initialAction() {
   randomMeeting();
   neighborMeeting();
   graphLayout.updateLayout();
   surface.updateDisplay();
   if (showHist) degreeDist.step();
   if (showPlot) graph.step();
 }
예제 #2
0
  ///////////////////////////////////////////////////////////////////////////////
  // step
  //
  // executed each step of the model.
  // Ask the super-class to do its step() method,
  // and then this does display related activities.
  //
  public void step() {

    super.step(); // the model does whatever it does

    // add things after this for all displays (graphs, etc)
    dsurf.updateDisplay();
    graph.step();
    graphNbors.step();
    graphFood.step();
  }
예제 #3
0
  public void mainAction() {
    randomMeeting();
    neighborMeeting();
    removeRandomFriendship();
    graphLayout.updateLayout();
    surface.updateDisplay();
    if (showHist) degreeDist.step();
    if (showPlot) graph.step();

    // System.out.println(NetUtilities.getComponents(agentList).size());

  }