public void initialAction() { randomMeeting(); neighborMeeting(); graphLayout.updateLayout(); surface.updateDisplay(); if (showHist) degreeDist.step(); if (showPlot) graph.step(); }
public void begin() { buildModel(); buildDisplay(); buildSchedule(); graphLayout.updateLayout(); surface.display(); if (showHist) degreeDist.display(); if (showPlot) graph.display(); }
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()); }
public void setup() { Random.createUniform(); if (surface != null) surface.dispose(); if (degreeDist != null) degreeDist.dispose(); if (graph != null) graph.dispose(); surface = null; schedule = null; degreeDist = null; graph = null; System.gc(); surface = new DisplaySurface(this, "JinGirModelII Display"); registerDisplaySurface("Main Display", surface); schedule = new Schedule(); agentList = new ArrayList(); worldXSize = 500; worldYSize = 500; }
/* * Creates a histogram of the degree distribution. */ private void makeHistogram() { degreeDist = new Histogram("Degree Distribution", maxDegree + 1, 0, maxDegree + 1, this); degreeDist.createHistogramItem("Degree Distribution", agentList, "getOutDegree"); }