RandomMoveInGrid/notes-changing-program.txt ------------------------------------------- Typical changes that one would make to this simple program/model, or to any of the Demos-3/ programs would involve adding new: - run-time settable parameters - measures - functionality to agents - types of agents (eg classes) - displays, e.g. graphs, histograms, 2D displays, etc For some of the above, see the handouts howTo-AddParameter.txt howTo-AddNewClass.txt In general, the places to change are: Model.java ---------- - add instance variables - for run-time parameters - for lists of new kinds of agents - for storing values of measures calculated - setup() - to "tear down" any objects you have built - buildModel() - to create new types of agents, etc * note: call other methods to avoid a really long buildModel() method - step() - send messages to all agents, objects, to drive the basic step-wise dynamics of the model! (for discrete time models) - stepReport() - call methods to calculate measures - write those measures to the report file(s) - writeHeaderCommentsToReportFile() - to put text at top of columns of data in report file - printProjectHelp() - to write out more help/info when user enters -h parameter GUIModel.java ------------- - add instance variables for display objects (eg, Graphs, etc) - setup() -- "tear down" any display objects - buildDisplay() create display objects (eg DisplaySurface) and create/link to "mapping" objects (e.g., Object2DDisplay, ColorMap, etc) - step() - send messages to any new display objects as needed