÷ƒ’À;è TeX output 1998.01.28:1947‹ÿÿÿÿ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:ŸIyóÓߌ˜¼j ptmb7t½Simtools‘/LibraryŽŸq'‘0„¤ŽŽ¤ ïhtml:ï html:ŸŽ9‘0óÓߌ˜ ptmb7t¿Documentation–and“Implementation“StatusŽŸ‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ)Â’Úqï>PSfile="eps/bomb.eps" llx=290 lly=365 urx=321 ury=396 rwi=310 ŽŽŸä=óÓߌ˜G® ptmb7tÀCompatibilityŽŸ âcïhtml:ï html:©ïhtml:ï html:Ÿ£¥‘0ïcolor push Blackó\ùð pzdrÁlï color popŽŽ‘:óßê“1.0.5:› úGUISwarm“now“inherits“from“GUIComposite.˜Because“GUICompositeŽ¡‘:handles–?ýthe“passthru“of“archiving“keys“to“tkobjc“primitives,“the“method“setControlPanelGeometryRecordNameŽ¡‘:is–?ýno“longer“needed;“instead,“the“macro“SET_WINDOW_GEOMETRY_RECORD_NAME“is“provided.ŽŸ 8äïhtml:ï html:¦ïhtml:ï html:Ÿ îï‘0ïcolor push BlackÁlï color popŽŽ‘:¾1.0.3–?ý->“1.0.4:› úAll“functions“maintain“backward“compatibility.˜There“are“additionalŽ¡‘:features,–?ýhowever,“and“features“previously“undocumented.ŽŸ‘0„¤ŽŽ©G®ïhtml:ï html:Ÿä=ÀOv•ÓÅer“viewŽŸ†ó3{Ù ptmr7t¼Simtools–±Vis“the“stdlib“of“Swšægarm...‘­™In“other“w˜ords,‘½«it“is“the“library“where“we“haÌÐvÙ e“park˜ed“manÙ y“miscellaneous“classesŽ¡which,›oXwhile–k.vÙ ery“useful,˜are“not“speci c“enough“to“be“placed“in“anÙ y“other“library‘ÿY .‘¨So,˜for“eÙ xample,˜simtools“containsŽ¡InFile,›;«ObjectLoader–*–and“other“I/O‘*€classes,˜the“ControlPÙ anel“and“GUISwægarm“which“support“GUI‘*€interactions,˜bÌÐut“alsoŽ¡UName–€which“simply“generates“unique“names“for“objects.ŽŸ ˆmïhtml:ï html:ŸÕÈ‘0„¤ŽŽ¦ïhtml:ï html:Ÿä=ÀDocumentationŽ©†¼The–MZïhtml:ï html:óßêï html:¾Library‘?ýInterfaceŽ¡Conventionsïhtml:ï html:ަ(defobj/library.html)ޤ 'Ó¼.‘˜The–€follošÀwing“standard“sections“of“documentation“are“aÌÐv˜ailable:ŽŸ*8ïhtml:ï html:Ÿ ïhtml:ï html:Ÿïhtml:ï html:Ÿ ý›‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾Interface‘?ýReferenceïhtml:ï html:Ž¡‘0(simtools/Interface.html)ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹* “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾Usage‘?ýGuideïhtml:ï html:ŽŸ ‘0(simtools/UsageGuide.html)Ž©8äïhtml:ï html:¤ Ç‘0ïcolor push BlackÁlï color popŽŽ‘:¾Advanced–?ýUsage“NotesŽŸ 8äïhtml:ï html:Ÿïhtml:ï html:¡‘0ïcolor push BlackÁlï color popŽŽ‘:¾Interface–?ýDesign“Notesަïhtml:ï html:¡‘0ïcolor push BlackÁlï color popŽŽ‘:¾Implementation‘?ýNotesŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¤ ‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ަïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ { “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ çåÀSimtools–QëLibrary:‘[UDocumentation“and“Implementation“StatusŽŸ^5‘0„¤ŽŽ© ïhtml:ï html:¤ ¾The–?ýsimtools“library“has“undergone“an“upgrade“to“the“status“of“a“library“as“of“1.0.4.‘ úThisŽ¡means–?ýthe“interface“now“conforms“to“the“library“interfaces“specifications,“the“format“of“theŽ¡documentation–?ýnow“reflects“this.‘ úOther“than“new“features,“there“should“be“no“affect“on“theŽ¡user.ŽŸïhtml:ï html:Ÿ‘0„¤ŽŽ¦ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹€ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:ŸIy½Simtools–/Library:‘m™Interface“Refer |enceŽŸq'‘0„¤ŽŽŸ ïhtml:ï html:¤ §Ô‘0¾The–?ýïhtml:ï html:Âsimtools‘üo¾library“uses“the“ïhtml:ï html:module“definition“conventionsïhtml:ï html:Ž¡‘0(../defobj/module.html)Ž¡‘0established–?ýby“the“ïhtml:ï html:ïhtml:ï html:Âdefobj‘üo¾libraryïhtml:ï html:Ž¡‘0(../defobj.html)Ž¡‘0.‘ úIt–?ýalso“depends“on“standard“supertypes“and“classes“defined“by“this“library.ŽŸ€’ïhtml:ï html:Ÿ+ZÀDependenciesŽ© ¾Following–?ýare“the“other“header“files“imported“by“:ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:Ÿ nð‘0ó0ˆÛ pcrr7tÄ#import‘ffŽ¡‘0#import–ff“//“for“global“RNGs...Ž¡‘0#import–ff“//“some“methods“return“graphics“stuff...Ž¡¾The–?ýïhtml:ï html:Âobjectbase‘üo¾library“interface“is“included“to“provide“the“basic“object“support.‘ úThe“ïhtml:ï html:Ârandom‘¼r¾libraryޤ is–?ýincluded“to“provide“support“for“default“generators“and“distributions,“the“use“of“which“isŽ¡deprecated,–?ýbut“are“included“for“backwards“compatibility.ŽŸ8äïhtml:ï html:ŸÇ‘0„¤ŽŽŸG®ïhtml:ï html:Ÿd>ÀSpecial–Qëglobal“functions“-“global.hަ¾Users–?ýneed“to“include“simtools.h“in“their“code“in“order“to“call“ïhtml:ï html:ÄinitSwarm()“¾but“also“in“orderŽ¡to–?ýget“access“to“a“set“of“important“pre-initialized“objects“which“are“generated“in“every“simulationŽ¡(e.g.‘ úïhtml:ï html:ÄuniformIntRand,‘ffprobeDisplayManager¾,–?ýand“so“on).ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¤ nð‘:void–?ýinitSwarm(int“argc,“char“**“argv)Ž©8äïhtml:ï html:¡‘XInitializes–?ýthe“Swarm“libraries.‘ úThis“should“be“the“call“in“any“Swarm“codeŽŸ ‘Xyou–?ýwrite.‘ úïhtml:ï html:Äargc“¾and“ïhtml:ï html:Äargv“¾are“the“input“parameters“to“ïhtml:ï html:Ämain().ŽŸ8äïhtml:ï html:ïhtml:ï html:¡‘:¾ProbeDisplayManager–?ý*“probeDisplayManagerަïhtml:ï html:¡‘XA–?ýglobal“instance“of“the“ProbeDisplayManager“object.‘ úYou“can“use“this“objectޤ ‘Xto–?ýcreate“new“probe“displays,“and“should“schedule“an“update“message“to“itŽ¡‘Xin–?ýyour“display“schedule“so“as“to“update“the“probe“displays“it“has“created.Ž¡‘XSee–?ýthe“ïhtml:ï html:documentation“on“probesïhtml:ï html:ޤ §Ô‘X(../probing.html)Ž¡‘Xfor–?ýmore“details.ŽŸïhtml:ï html:ïhtml:ï html:¡‘:int‘?ýswarmGUIModeŽïhtml:ï html:¡‘XA–?ýflag“that“indicates“whether“graphics“are“enabled.‘ úSet“automatically“basedޤ ‘Xon–?ýwhether“the“switch“ïhtml:ï html:Ä-batchmode“¾was“present“as“one“of“the“command“line“argumentsŽ¡‘Xstarting–?ýthe“application“(e.g.– úïhtml:ï html:Äheatbugs‘ff-batchmode¾).“If–?ýit“is“false,“thenŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹M “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБWºâïhtml:ï html:ÄglobalTkInterp–?ý¾(from“libtkobjc)“is“set“to“be“a“normal“Tcl“interpreter“insteadޤ ‘Wºâof–?ýa“Tcl/Tk/BLT“interpreter.ŽŸ‘/ºâ„¤ŽŽºâ©G®ïhtml:ï html:ŸPÀObject–QëT‘þ¸¦ypes“(with“links“to“r•°gefer“ence‘Qëpages)ŽŸ¦¾As–?ýsimtools“is“a“collection“of“tools“that“are“only“loosely“related“to“each“other“-“the“classŽ¡hierarchy–?ýis“virtually“flat.‘ úMost“of“the“classes“are“standalone.ŽŸ —ïhtml:ï html:ŸÇ‘0„¤ŽŽ¦ïhtml:ï html:ŸPÀContents:ŽŸ ¢Âïhtml:ï html:Ÿïhtml:ï html:Ÿ Y‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾GUISwarmïhtml:ï html:ޤ Gæ‘0(GUISwarm.html)Ž©ÕSïhtml:ï html:Ÿ r“‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ControlPanelïhtml:ï html:Ž¡‘0(ControlPanel.html)ަïhtml:ï html:Ÿ r“‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ActionCacheïhtml:ï html:Ž¡‘0(ActionCache.html)ަïhtml:ï html:Ÿ r“‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ProbeDisplayïhtml:ï html:Ž¡‘0(ProbeDisplay.html)Ž©8äïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾CompleteProbeDisplayïhtml:ï html:Ž¡‘0(CompleteProbeDisplay.html)ަïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ProbeDisplayManagerïhtml:ï html:Ž¡‘0(ProbeDisplayManager.html)ަïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾InFileïhtml:ï html:Ž¡‘0(InFile.html)Ž©ÕSïhtml:ï html:Ÿ r“‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾OutFileïhtml:ï html:Ž¡‘0(OutFile.html)ަïhtml:ï html:Ÿ r“‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾AppendFileïhtml:ï html:Ž¡‘0(AppendFile.html)Ž©8äïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ObjectLoaderïhtml:ï html:Ž¡‘0(ObjectLoader.html)ަïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ObjectSaverïhtml:ï html:Ž¡‘0(ObjectSaver.html)ަïhtml:ï html:Ÿ ‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾QSortïhtml:ï html:Ž¡‘0(QSort.html)ŽŸcïhtml:ï html:Ÿ äY‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾NSelectïhtml:ï html:ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹Ó “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ/ºâ¾(NSelect.html)Žºâ¤ÕSïhtml:ï html:© *­‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾UNameïhtml:ï html:ŽŸ ‘0(UName.html)Ž¡ïhtml:ï html:¦‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ActiveGraphïhtml:ï html:ޤ ‘0(ActiveGraph.html)ŽŸ8äïhtml:ï html:Ÿ Ç‘0ïcolor push BlackÁlï color popŽŽ‘:ïhtml:ï html:¾ActiveOutFileïhtml:ï html:Ž¡‘0(ActiveOutFile.html)Ž©‘0„¤ŽŽ¤ ïhtml:ï html:Ÿ\’áøRï>PSfile="eps/prev.eps" llx=298 lly=373 urx=314 ury=389 rwi=160 ŽŽ¡ïhtml:ï html:¦(../simtools.html)ŽŸÕSïhtml:ï html:Ÿ\’áøRïï html:¦(../simtools.html)ŽŸÕSïhtml:ï html:Ÿ\’áøRï>PSfile="eps/next.eps" llx=298 lly=373 urx=314 ury=389 rwi=160 ŽŽ¡ïhtml:ï html:¦(UsageGuide.html)ަ‘0„¤ŽŽ¡ïhtml:ï html:¤ ‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-10ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹, “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ!óÓߌ˜ff ptmb7tÅGUISwarmŽ©‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ¼jÀSynopsisŽŸ âcïhtml:ï html:Ÿ{Ò‘0Ä//ޤ ‘0//–ffGUISwarm“--“a“version“of“the“Swarm“class“which“is“graphics“awareŽ¡‘0//ŽŸ¸Mïhtml:ï html:Ÿ G³‘0@protocol–ffGUISwarm“Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:Ÿ¼jÀDescriptionŽŸ^5¾GUISwarm–?ýis“a“subclass“of“Swarm“that“is“used“as“a“toplevel“Swarm“for“simulations“running“withŽ¡a–?ýgraphical“user“interface.‘ úThe“GUISwarm“creates“a“ControlPanel“automatically“for“you“andŽ¡defines–?ýa“"go"“method“that“interprets“the“state“of“the“ControlPanel“to“keep“things“runningŽ¡in–?ýresponse“to“user“input.‘ úUsers“subclass“GUISwarm“much“like“they“subclass“a“normal“Swarm,Ž¡implementing–?ýthe“same“kind“of“buildObjects,“buildActions,“and“activateIn“methods.‘ úWhen“youŽ¡are–?ýdone“building“your“Observer“Swarm,“start“it“as“a“toplevel“via“ïhtml:ï html:Ä[myGUISwarm‘ffgo]¾.ŽŸ —ïhtml:ï html:© Ç‘0The–?ýcontrol“panel“places“a“few“responsibilities“on“the“GUISwarm“subclass“author.‘ úInŽ¡‘0particular,–?ýa“message“to“ïhtml:ï html:Ä[controlPanel‘ffdoTkEvents]“¾should“be“scheduled“fairly“frequentlyŽ¡‘0-–?ýonly“when“that“method“is“executed“will“the“user“interface“update“(and“the“stop“buttonŽ¡‘0be–?ýchecked).‘ úAlso,“it“is“often“useful“to“use“ïhtml:ï html:Ä[controlPanel‘ffsetStateStopped]“¾to“waitŽ¡‘0for–?ýthe“user“to“indicate“they're“ready“for“execution“to“proceed.ŽŸ 8äïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýgoŽŸ8äïhtml:ï html:¦‘XStart–?ýthe“activity“running,“and“also“handle“user“requests“via“the“controlŽ¡‘Xpanel.‘ úReturns–?ýeither“ïhtml:ï html:ÄCompleted“¾(the“model“ran“until“requested“to“terminate)Ž¡‘Xor–?ýïhtml:ï html:ÄControlStateQuit“¾(the“user“pressed“the“quit“button).ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹20 “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:ŸAÆÅContrš½«olPÛ$anel–™™-“class“to“contr˜ol“the“top“leȽvÛ$el“SwarmPr˜ocessŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸûÀSynopsisŽŸ âcïhtml:ï html:Ÿºw‘0Ä//–ffControlPanel“--ޤ >¥‘0//–ffan“class“used“to“control“the“top-level“SwarmProcess.“ItŽ¡‘0//–ffaccepts“manipulations“both“by“the“Swarm“it's“controlling“andŽ¡‘0//–ffthe“ActionCache.Ž¡‘0//ŽŸ¸Mïhtml:ï html:Ÿ †X‘0@protocol–ffControlPanel“Ž¡‘0CREATINGŽ¡‘0-‘ffcreateEnd;Ž¡‘0USINGŽ¡‘0-‘ffgetState;Ž¡‘0-–ffsetState:“s;Ž¡‘0-‘ffwaitForControlEvent;Ž¡‘0-–ffstartInActivity:“activityID;Ž¡‘0-‘ffsetStateRunning;Ž¡‘0-‘ffsetStateStopped;Ž¡‘0-‘ffsetStateStepping;Ž¡‘0-‘ffsetStateQuit;Ž¡‘0-‘ffsetStateNextTime;ŽŸýoïhtml:ï html:Ÿ A6‘0//–ffDeprecated“methodsŽ¡‘0-‘ffdoTkEvents;Ž¡‘0-‘ffgetPanel;Ž¡‘0@endŽŸÉïhtml:ï html:Ÿ !Ü‘0//–ffState“Symbols“for“the“ControlPanel.Ž¡‘0extern–ffid“ControlStateRunning,“ControlStateStopped;Ž¡‘0extern–ffid“ControlStateStepping,“ControlStateNextTime,“ControlStateQuit;ަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸûÀDescriptionŽŸœÚ¾ControlPanel–?ýkeeps“track“of“the“users“requests“to“run,“stop,“quit,“or“time“step“the“simulation.ŽŸ It–?ýcooperates“with“the“GUISwarm“to“control“the“execution“of“activities“in“Swarm.ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ Á‘:-‘?ýgetStateŽŸ8äïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ <{ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБWºâ¾Get–?ýthe“current“button“state“of“the“controlpanel.‘ úIs“one“of“ControlStateRunning,Ž© ‘WºâControlStateStopped,–?ýControlStateStepping,“ControlStateNextTime,“or“ControlStateQuit.ŽºâŸ8äïhtml:ï html:ïhtml:ï html:¤ Ç‘:-–?ýsetStateRunning,“-“setStateStopped,“-“setStateStepping,“-“setStateQuit,“-“setStateNextTimeŽŸ8äïhtml:ï html:¡‘XSets–?ýthe“state“to“the“indicated“value,“and“also“sends“the“appropriate“stopަ‘Xor–?ýterminate“message“to“the“running“activity“tree.‘ úThe“-“setStateStoppedަ‘Xmessage–?ýis“particularly“useful“since“it“will“cause“the“simulation“to“stopަ‘Xuntil–?ýthe“user“interactively“sets“it“back“in“motion“(in“other“words,“thisަ‘Xmethod–?ýis“useful“in“generating“a“software-triggered“pause).ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¦‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:ަ‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¡‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ CÑ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ:öÅActionCache–™™-“a“class“to“manage“thr½«eads“and“SwarmsŽŸ‘0„¤ŽŽŸG®ïhtml:ï html:Ÿô?ÀSynopsisŽ© âcïhtml:ï html:Ÿ³§‘0Ä//ޤ 7Õ‘0//–ffActionCache“-Ž¡‘0//Ž¡‘0//–ffA“class“that“provides“a“smart“bag“into“which“actions“can“beŽ¡‘0//–ffthrown“by“other“threads“and“Swarms“intended“for“insertion“onŽ¡‘0//–ffit's“Swarm's“schedule.Ž¡‘0//ŽŸ¸Mïhtml:ï html:Ÿ ˆ‘0@protocol–ffActionCache“Ž¡‘0CREATINGŽ¡‘0-–ffsetControlPanel:“cp;Ž¡‘0-–ffsetScheduleContext:“context;Ž¡‘0-–ffsetWindowGeometryRecordName:“(const“char“*)name;Ž¡‘0-‘ffcreateEnd;ŽŸýoïhtml:ï html:Ÿ :f‘0USINGŽ¡‘0-–ffinsertAction:“actionHolder;Ž¡‘0-‘ffdeliverActions;Ž¡‘0-–ffsendActionOfType:“(id“)type“toExecute:“(const“char“*)cmd;Ž¡‘0-‘ffsendStartAction;Ž¡‘0-‘ffsendStopAction;Ž¡‘0-‘ffsendStepAction;Ž¡‘0-‘ffsendNextAction;Ž¡‘0-‘ffsendQuitAction;Ž¡‘0-‘ffverifyActions;ŽŸbÌïhtml:ï html:Ÿ Õ ‘0-‘ffcreateProcCtrl;Ž¡‘0-‘ffgetPanel;Ž¡‘0-–ffdoTkEvents;“//should“change“to“pollGUI“or“somethingŽ¡‘0@endŽŸÉïhtml:ï html:Ÿ  ‘0//–ffType“Symbols“for“ActionCacheŽ¡‘0extern–ffid““Control,“Probing,“Spatial;Ž¡‘0//–ffError“Symbols“for“ActionCacheŽ¡‘0extern–ffid““InvalidActionType,“ActionTypeNotImplemented;ŽŸªzïhtml:ï html:Ÿ‘sÀDescriptionަïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ HÏ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ9ºâ¾-–?ýsetWindowGeometryRecordName:‘ ú(const“char“*)nameŽºâŸ8äïhtml:ï html:© Ç‘XSet–?ýthe“name“to“be“used“for“archiving“the“geometry“of“the“control“panel“widget.ޤ ‘XThere–?ýis“no“default;“the“position“of“the“control“panel“will“not“be“preservedŽ¡‘Xunless–?ýyou“use“this“method.ŽŸ 8äïhtml:ï html:ŸÇ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ P  “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:ŸèzÅPrš½«obeDisplay–™™-“a“class“to“display“Pr˜obeMapsŽ©‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ¡ÃÀSynopsisŽŸ âcïhtml:ï html:Ÿ a+‘0Ä//ޤ åY‘0//‘ffProbeDisplayŽ¡‘0//Ž¡‘0//–ffA“class“which“generates“a“GUI“to“a“ProbeMap“of“probes“applied“to“aŽ¡‘0//–ffgiven“target“object.Ž¡‘0//ŽŸ¸Mïhtml:ï html:Ÿ - ‘0@protocol–ffProbeDisplay“Ž¡‘0CREATINGŽ¡‘0-–ffsetProbedObject:“anObject;Ž¡‘0-–ffsetProbeMap:“(ProbeMap“*)probeMap;Ž¡‘0-–ffsetWindowGeometryRecordName:“(const“char“*)name;Ž¡‘0USINGŽ¡‘0-‘ffgetProbedObject;Ž¡‘0-‘ffgetProbeMap;Ž¡‘0-–ffupdate;“//“implemented“in“SimpleProbeDisplay...Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:Ÿ¡ÃÀDescriptionŽŸê”ïhtml:ï html:Ÿ¨ÙÅCrš½«eate–™™Phase“Pr˜otocolŽŸ 9 ïhtml:ï html:¤ïhtml:ï html:ïhtml:ï html:Ÿ ¬9‘:¾-‘?ýsetProbedObject:‘ úanObjectŽ©8äïhtml:ï html:Ÿ ¬u‘XThis–?ýmethod“ïhtml:ï html:Âmust‘üo¾be“called.Ž¡ïhtml:ï html:ïhtml:ï html:Ÿ åY‘:-–?ýsetProbeMap:‘ ú(ProbeMap“*)probeMapަïhtml:ï html:© ¬u‘XThis–?ýis“an“optional“create“phase“method“-“if“no“probeMap“is“specified“theޤ ‘XProbeDisplay–?ýwill“ask“the“probedObject“for“a“ProbeMap“using“the“ïhtml:ï html:getProbeMapŽ¡‘Xmethod–?ýdescribed“below...‘ úThe“default“behaviour“of“this“method“will“be“toŽ¡‘Xreturn–?ýthe“probeLibrary's“copy“of“the“probeMap“for“the“class“of“the“targetŽ¡‘Xobject.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-–?ýsetWindowGeometryRecordName:‘ ú(const“char“*)nameŽŸ8äïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ SH “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБWºâ¾In–?ýorder“to“record“the“window“position“of“a“ProbeDisplay,“it“is“necessaryޤ ‘Wºâto–?ýgive“it“a“name.‘ úThis“method“is“used“to“give“an“instance“ProbeDisplay“aŽ¡‘Wºâname,–?ýwhich“will“used“by“the“Archiver“when“recording“its“geometry“information.ŽºâŸŸJïhtml:ï html:ŸÊÅRegular‘™™Pr½«otocolŽŸ î&ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ Ú‘:¾-‘?ýgetProbedObjectޤ8äïhtml:ï html:ïhtml:ï html:© Ç‘:-‘?ýgetProbeMapŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýupdateŽŸ8äïhtml:ï html:¦‘XThis–?ýmethod“maintains“consistency“between“the“values“of“the“probedObject'sޤ ‘Xvariables–?ýand“the“values“which“are“displayed“in“the“ProbeDisplay.‘ úIdeally,Ž¡‘Xthis–?ýmethod“should“be“called“every“time“the“object“is“modified“by“the“simulation.Ž¡‘XIn–?ýpractice,“the“user“schedules“an“update“on“the“probeDisplayManager“whichŽ¡‘Xin–?ýturn“communicates“to“all“the“active“ProbeDisplays“in“the“system.ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹[Ž “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ!ÅCompletePr½«obeDisplayŽ©‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ¼jÀSynopsisŽŸ âcïhtml:ï html:Ÿ{Ò‘0Ä//ޤ ‘0//–ffCompleteProbeDisplay“--Ž¡‘0//–ffA“class“which“generates“a“GUI“to“a“complete“ProbeMap“of“probes“appliedŽ¡‘0//–ffto“a“given“target“object“(by“complete“we“mean“that“all“the“probes“forŽ¡‘0//–ffthe“target“object's“class“and“its“superclasses“are“included).Ž¡‘0//Ž¡¡‘0@protocol–ffCompleteProbeDisplay“Ž¡‘0CREATINGŽ¡‘0-–ffsetProbedObject:“anObject;Ž¡‘0-–ffsetWindowGeometryRecordName:“(const“char“*)name;Ž¡‘0USINGŽ¡‘0-‘ffgetProbedObject;Ž¡‘0-‘ffupdate;Ž¡‘0-‘ffgetMarkedForDropFlag;Ž¡‘0@endަ‘0„¤ŽŽ¤ ïhtml:ï html:ŸG®ïhtml:ï html:Ÿ¼jÀDescriptionŽŸ^5‘0„¤ŽŽ¡ïhtml:ï html:¤ ‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹a® “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ#ßÅPr½«obeDisplayManagerŽŸ‘0„¤ŽŽŸG®ïhtml:ï html:ŸÝ(ÀSynopsisŽŸ âcïhtml:ï html:Ÿœ‘0Ä//ޤ ¾‘0//–ffProbeDisplayManager“--Ž¡‘0//–ffA“singleton“class“whose“instance“is“used“to“manage“all“theŽ¡‘0//–ffProbeDisplays“created“by“the“user“during“a“GUI“run“of“theŽ¡‘0//‘ffsimulation.Ž¡‘0//Ž¡¡‘0@protocol–ffProbeDisplayManager“Ž¡‘0USINGŽ¡‘0-–ffcreateProbeDisplayFor:“anObject;Ž¡‘0-–ffcreateProbeDisplayFor:“anObject“setWindowGeometryRecord-Ž© ‘0Name:–ff(const“char“*)name;Ž¡¡‘0-–ffcreateCompleteProbeDisplayFor:“anObject;Ž¡‘0-–ffcreateCompleteProbeDisplayFor:“anObject“setWindowGeometryRecord-ަ‘0Name:–ff(const“char“*)name;Ž¡¡‘0-–ffaddProbeDisplay:“probeDisplay;Ž¡‘0-–ffremoveProbeDisplayFor:“anObject;Ž¡‘0-–ffremoveProbeDisplay:“probeDisplay;Ž¡‘0-–ffsetDropImmediatelyFlag:“(BOOL)dropImmediateFlag;Ž¡‘0-‘ffupdate;Ž¡‘0@endŽŸ‘0„¤ŽŽŸG®ïhtml:ï html:ŸÝ(ÀDescriptionŽŸ âcïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿœ‘:¾-‘?ýaddProbeDisplay:‘ úpdŽŸ8äïhtml:ï html:ïhtml:ï html:¤ çÚ‘:-‘?ýremoveProbeDisplay:‘ úpdŽŸ8äïhtml:ï html:¡‘XThese–?ýmethods“are“used“to“specify“which“Probe“Displays“should“be“managed“byަ‘Xthe‘?ýProbeDisplayManager.ŽŸ8äïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýupdateŽŸ8äïhtml:ï html:¡‘XThis–?ýmethod“will“recursively“send“an“update“message“to“all“the“Probe“Displaysަ‘Xmanaged–?ýby“the“ProbeDisplayManager.ŽŸ8äïhtml:ï html:ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹g “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ9ºâ¾-‘?ýcreateProbeDisplayFor:‘ úanObjectŽºâ¤8äïhtml:ï html:ïhtml:ï html:© Ç‘:-‘?ýcreateDefaultProbeDisplayFor:‘ úanObjectŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýcreateCompleteProbeDisplayFor:‘ úanObjectŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-–?ýcreateProbeDisplayFor:› úanObject“setWindowGeometryRecordName:˜(const“char“*)nameŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-–?ýcreateCompleteProbeDisplayFor:› úanObject“setWindowGeometryRecordName:˜(constޤ ‘Dchar‘?ý*)name;ŽŸcïhtml:ï html:ïhtml:ï html:Ÿ œs‘:-‘?ýdropProbeDisplaysFor:‘ úanObjectŽŸ8äïhtml:ï html:¦‘XThese–?ýmethods“allow“a“one-step“creation/removal“of“ProbeDisplays“onto“a“givenŽ¡‘Xobject–?ý(ïhtml:ï html:dropProbeDisplaysFor:‘ úwill“actually“ïhtml:ï html:Âdrop‘üo¾the“appropriate“ProbeDisplays).Ž¡‘XThe–?ýsetWindowGeometryRecordName:‘ úcreation“variety“can“be“used“to“set“namesŽ¡‘Xfor–?ýarchiving“geometry“information.ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1997-12-19ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹n󠓺â ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ2GÅInFile–™™-“class“to“perf£×orm“ le“inputŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸëÀSynopsisŽŸ âcïhtml:ï html:Ÿªø‘0Ä//ޤ /&‘0//–ffInFile“--Ž¡‘0//–ffA“class“which“was“intended“to“support“file“input.“There“have“beenŽ¡‘0//–ffjustified“requests“from“our“userbase“to“re-design“this“interface.Ž¡‘0//Ž¡¡‘0@protocol–ffInFile“Ž¡‘0CREATINGŽ¡‘0+–ffcreate:“aZone“withName:“(const“char“*)theName;Ž¡‘0USINGŽ¡‘0-–ff(int)getWord:“(char“*)aWord;Ž¡‘0-–ff(int)getLine:“(char“*)aLine;Ž¡‘0-–ff(int)getInt:“(int“*)anInt;Ž¡‘0-–ff(int)getUnsigned:“(unsigned“*)anUnsigned;Ž¡‘0-–ff(int)getLong:“(long“*)aLong;Ž¡‘0-–ff(int)getUnsignedLong:“(unsigned“long“*)anUnsLong;Ž¡‘0-–ff(int)getDouble:“(double“*)aDouble;Ž¡‘0-–ff(int)getFloat:“(float“*)aFloat;Ž¡‘0-–ff(int)getChar:“(char“*)aChar;Ž¡‘0-–ff(int)unGetChar:“(char)aChar;Ž¡‘0-‘ff(int)skipLine;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸëÀDescriptionŽŸ[¾This–?ýclass“is“intended“to“simplify“the“input“file-I/O“in“Swarm.‘ úIt“essentially“deals“withޤ the–?ýdetailed“file“opening“and“closing“routines“thus“alleviating“the“need“for“C“file“I/O“procedureŽ¡calls.ŽŸ ^5ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ /&‘:+–?ýcreate:› úaZone“withName:˜(const“char“*)theNameŽŸÕSïhtml:ï html:Ÿ YÓ‘XThis–?ýis“the“create“method“for“InFiles,“where“theName“is,“of“course“the“nameŽ¡‘Xof–?ýthe“file“to“open.ŽŸ8äïhtml:ï html:ïhtml:ï html:Ÿ öB‘:-–?ý(int)getWord:‘ ú(char“*)aWordŽŸ8äïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹uM “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБWºâ¾We–?ýuse“the“term“word“instead“of“string“because“the“returned“value“will“notŽ© ‘Wºâcontain–?ýspaces,“tabs“and“newlines“->“thus“getWord...ŽºâŸ8äïhtml:ï html:ïhtml:ï html:¤ Ç‘:-–?ý(int)getLine:‘ ú(char“*)aLineŽŸ8äïhtml:ï html:¡‘XThis–?ýroutine“loads“the“argument“string“with“the“characters“up“to,“but“notަ‘Xincluding–?ýa“newline“character.Ž©8äïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getInt:‘ ú(int“*)anInt;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getUnsigned:‘ ú(unsigned“*)anUnsigned;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getLong:‘ ú(long“*)aLong;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getUnsignedLong:‘ ú(unsigned“long“*)anUnsLong;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getDouble:‘ ú(double“*)aDouble;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getFloat:‘ ú(float“*)aFloat;ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)getChar:‘ ú(char“*)aChar;Ž©8äïhtml:ï html:¡‘XThese–?ýroutines“take“a“pointer“to“the“required“type,“and“read“into“it“an“instanceޤ ‘Xof–?ýthat“type“from“the“open“file.‘ úIn“case“of“failure“these“message“returnsŽ¡‘X0.ŽŸïhtml:ï html:ïhtml:ï html:¡‘:-–?ý(int)unGetChar:‘ ú(char)“aCharŽŸÕSïhtml:ï html:ïhtml:ï html:Ÿ *­‘:-‘?ý(int)skipLineަïhtml:ï html:© Ç‘XThese–?ýroutines“are“used“by“ObjectLoader,“but“are“documented“in“case“the“userŽ¡‘Xwishes–?ýto“define“his/her“own“file“format“which“may“require“backtracking“orŽ¡‘Xskipping‘?ýlines.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-‘?ý(void)dropŽŸ8äïhtml:ï html:¦‘XThis–?ýmethod“must“be“called“when“the“user“wants“to“close“the“file.‘ úOnly“byŽ¡‘Xdropping–?ýthe“InFile“object“will“the“file“truly“be“closed!ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹}6 “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:ŸF@ÅOutFile–™™-“class“to“perf£×orm“ le“outputŽ©‘0„¤ŽŽŸG®ïhtml:ï html:Ÿÿ‰ÀSynopsisŽŸ âcïhtml:ï html:Ÿ¾ñ‘0Ä//ޤ C‘0//–ffOutFile“--Ž¡‘0//–ffA“class“which“was“intended“to“support“file“output.Ž¡‘0//Ž¡¡‘0@protocol–ffOutFile“Ž¡‘0CREATINGŽ¡‘0+–ffcreate:“aZone“withName:“(const“char“*)theName;Ž¡‘0USINGŽ¡‘0-–ffputString:“(const“char“*)aString;Ž¡‘0-–ffputInt:“(int)“anInt“;Ž¡‘0-–ffputUnsigned:“(unsigned)“anUnsigned;Ž¡‘0-–ffputLong:“(long)“aLong“;Ž¡‘0-–ffputUnsignedLong:“(unsigned“long)“anUnsLong“;Ž¡‘0-–ffputDouble:“(double)“aDouble“;Ž¡‘0-–ffputFloat:“(float)“aFloat“;Ž¡‘0-–ffputChar:“(char)“aChar“;Ž¡‘0-–ffputTab“;Ž¡‘0-–ffputNewLine“;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:Ÿÿ‰ÀDescriptionŽŸ¡T¾This–?ýclass“is“intended“to“simplify“output“file-I/O“in“Swarm.‘ úIt“essentially“deals“with“theޤ detailed–?ýfile“opening“and“closing“routines“thus“alleviating“the“need“for“C“file“I/O“procedureŽ¡calls.ŽŸ ^5ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ C‘:+–?ýcreate:› úaZone“withName:˜(const“char“*)theNameŽŸÕSïhtml:ï html:Ÿ mÌ‘XThis–?ýis“the“create“method“for“OutFiles,“where“theName“is,“of“course“the“nameŽ¡‘Xof–?ýthe“file“to“open.ޤ8äïhtml:ï html:ïhtml:ï html:© ;‘:-–?ýputString:‘ ú(const“char“*)aStringŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-–?ýputInt:‘ ú(int)“anIntŽ¡ïhtml:ï html:ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹‡l “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ9ºâ¾-–?ýputUnsigned:‘ ú(unsigned)“anUnsigned;Žºâ¤8äïhtml:ï html:ïhtml:ï html:© Ç‘:-–?ýputLong:‘ ú(long)“aLong;Ž¡ïhtml:ï html:ïhtml:ï html:¦‘:-–?ýputUnsignedLong:‘ ú(unsigned“long)anUnsLong;Ž¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputDouble:‘ ú(double)aDoubleŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputFloat:‘ ú(float)aFloatŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputChar:‘ ú(char)aCharŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputTab:‘ ú(char)aCharŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputNewLineŽŸ8äïhtml:ï html:¦‘XThese–?ýroutines“take“an“instance“of“the“appropriate“type“and“write“it“intoޤ ‘Xthe–?ýopen“file.‘ úThe“return“value“is“simply“self“since“no“error“detection“isŽ¡‘Xperformed.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-‘?ý(void)dropŽŸ8äïhtml:ï html:¦‘XThis–?ýmethod“must“be“called“when“the“user“wants“to“close“the“file.‘ úOnly“byŽ¡‘Xdropping–?ýthe“OutFile“object“will“the“file“truly“be“closed!ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ*ÒÅAš£×ppendFile–™™-“class“f˜or“appended“ le“outputŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸäÀSynopsisŽŸ âcïhtml:ï html:Ÿ£ƒ‘0Ä//ޤ '±‘0//–ffAppendFile“--Ž¡‘0//–ffA“class“to“support“appended“file“output.Ž¡‘0//Ž¡‘0@protocol–ffAppendFile“CREATINGŽ¡‘0+–ffcreate:“aZone“withName:“(const“char“*)theName;Ž¡‘0USINGŽ¡‘0-–ffputString:“(const“char“*)aString;Ž¡‘0-–ffputInt:“(int)anInt;Ž¡‘0-–ffputUnsigned:“(unsigned)anUnsigned;Ž¡‘0-–ffputLong:“(long)aLong;Ž¡‘0-–ffputUnsignedLong:“(unsigned“long)anUnsLong;Ž¡‘0-–ffputDouble:“(double)aDouble;Ž¡‘0-–ffputFloat:“(float)aFloat;Ž¡‘0-–ffputChar:“(char)aChar;Ž¡‘0-‘ffputTab;Ž¡‘0-‘ffputNewLine;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸäÀDescriptionŽŸ…æ¾This–?ýclass“subclasses“from“OutFile,“the“only“difference“in“functionality,“being“that“it“opensޤ a–?ýgiven“file“in“ïhtml:ï html:ÂAppendŽŸ —ïhtml:ï html:© î;mode,–?ýrather“than“ïhtml:ï html:ÂOverwrite‘¼r¾mode,“which“OutFile“does.ŽŸ cïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ Ä$‘:+–?ýcreate:› úaZone“withName:˜(const“char“*)theNameŽŸÕSïhtml:ï html:Ÿ R^‘XThis–?ýis“the“create“method“for“AppendFiles,“where“theName“is,“of“course“theŽ¡‘Xname–?ýof“the“file“to“open.ޤ8äïhtml:ï html:ïhtml:ï html:¦‘:-–?ýputString:‘ ú(const“char“*)aStringŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputInt:‘ ú(int)anIntŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputUnsigned:‘ ú(unsigned)anUnsigned;Ž¡ïhtml:ï html:ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹•ì “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ9ºâ¾-‘?ýputLong:‘ ú(long)aLong;Žºâ¤8äïhtml:ï html:ïhtml:ï html:© Ç‘:-–?ýputUnsignedLong:‘ ú(unsigned“long)anUnsLong;Ž¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputDouble:‘ ú(double)aDoubleŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputFloat:‘ ú(float)aFloatŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputChar:‘ ú(char)aCharŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputTab:‘ ú(char)aCharŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýputNewLineŽŸ8äïhtml:ï html:¦‘XThese–?ýroutines“take“an“instance“of“the“appropriate“type“and“write“it“intoޤ ‘Xthe–?ýopen“file.‘ úThe“return“value“is“simply“self“since“no“error“detection“isŽ¡‘Xperformed.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-‘?ý(void)dropŽŸ8äïhtml:ï html:¦‘XThis–?ýmethod“ïhtml:ï html:Âmust‘¼r¾be“called“when“the“user“wants“to“close“the“file.‘ úOnly“byŽ¡‘Xdropping–?ýthe“AppendFile“object“will“the“file“truly“be“closed!ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1997-12-19ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹žO “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ£ÅObjectLoader–™™-“class“to“load“objects“IV‘þ¬áars“fr½«om“a“ leŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸÀìÀSynopsisŽŸ âcïhtml:ï html:Ÿ€T‘0Ä//ޤ ‚‘0//–ffObjectLoader“--Ž¡‘0//–ffAn“attempt“to“design“some“form“of“standard“for“object“loading.Ž¡‘0//Ž¡¡‘0@protocol–ffObjectLoader“Ž¡‘0USINGŽ¡‘0+–ffload:“anObject“from:“aFileObject;Ž¡‘0+–ffload:“anObject“fromFileNamed:“(const“char“*)aFileName;Ž¡¡‘0-–ffsetFileObject:“aFileObject;Ž¡‘0-–ffloadObject:“anObject;Ž¡‘0//–ffIn“case“the“same“class“is“being“loaded“multiple“times...Ž¡‘0-–ffupdateCache:“exampleTarget;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸÀìÀDescriptionŽŸb·¾This–?ýclass“is“used“to“initialize“the“variables“of“a“target“object“from“a“data“file.‘ úThe“dataŽŸ file–?ýis“required“to“have“aŽŸ —ïhtml:ï html:¤ Ëžvery–?ýsimple“format:ŽŸ8äïhtml:ï html:¡‘0Ä#–ffA“Commentޤ ‚¡‘0@beginŽ¡¡‘0aVarName‘ffaValueŽ¡‘0aVarName–ffaValue“#“A“commentŽ¡‘0aVarName‘ffaValueŽ¡‘0#Ž¡‘0#–ffA“CommentŽ¡‘0#Ž¡‘0aVarName‘ffaValueŽ¡ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹¤Ñ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ/ºâÄ@endŽºâžÉïhtml:ï html:Ÿ ã7¾Note:‘ úA–?ýsingle“file“can“be“used“to“initialize“multiple“objects“by“simply“inserting“more“thanޤ one–?ý@begin“@endŽ©8äïhtml:ï html:Ÿ Çblock.ŽŸïhtml:ï html:ïhtml:ï html:¡‘0+–?ýload:› úanObject“fromFileNamed:˜(const“char“*)aFileName“This“convenience“class“methodŽ¡‘0will–?ýload“anObject“from“the“file“named“aFileName“(the“class“will“open“the“file,“initializeŽ¡‘0the–?ýobject“with“its“contents“and“then“close“the“file).ަïhtml:ï html:ïhtml:ï html:ïhtml:ï html:Ÿ Ç‘0+–?ýload:› úanObject“from:˜aFileObject“This“convenience“class“method“will“load“anObjectŽ¡‘0from–?ýthe“previously“opened“aFileObject“without“returning“an“actual“instance“of“theŽ¡‘0ObjectLoader–?ýclass“(also,“the“FileObject“remains“open“after“the“method“has“been“called).ަïhtml:ï html:ïhtml:ï html:ïhtml:ï html:Ÿ Ç‘0-–?ýsetFileObject:‘ úaFileObject“If“the“user“bothers“to“generates“an“actual“instanceŽ¡‘0of–?ýthe“ObjectLoader“class,“s/he“can“set“the“source“fileObject“which“the“instance“shouldŽ¡‘0use–?ýby“sending“it“this“message.ަïhtml:ï html:ïhtml:ï html:ïhtml:ï html:Ÿ Ç‘0-–?ýloadObject:‘ úanObject“This“is“the“message“the“user“must“send“an“instance“of“theŽ¡‘0ObjectLoader–?ýclass“in“order“to“initialize“the“target“object“from“the“requested“file.ަïhtml:ï html:ïhtml:ï html:ïhtml:ï html:Ÿ Ç‘0-–?ýupdateCache“This“method“should“be“called“if“an“ObjectLoader“instance“is“going“toŽ¡‘0initialize–?ýa“large“number“of“objects“from“the“same“class.ަïhtml:ï html:ïhtml:ï html:ïhtml:ï html:© Ç‘0-–?ýsetTemplateProbeMap:‘ úaProbeMap“This“method“is“used“to“specify“which“variables“ofŽ¡‘0the–?ýtarget“object(s)“should“be“loaded“by“the“ObjectLoader“instance“to“which“this“messageŽ¡‘0was‘?ýsent.ŽŸïhtml:ï html:Ÿ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ª— “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ[²ÅObjectSaš£×vÛ$er–™™-“class“to“sa˜vÛ$e“object'‘ÿwšs“IV‘þ¬áars“to“a“ leŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸûÀSynopsisŽŸ âcïhtml:ï html:ŸÔc‘0Ä//ޤ X‘‘0//–ffObjectSaver“--Ž¡‘0//–ffAn“attempt“to“design“some“form“of“standard“for“object“saving.Ž¡‘0//–ffThe“ProbeMap“argument“is“used“to“specify“what“variables“get“saved.Ž¡‘0//Ž¡¡‘0@protocol–ffObjectSaver“Ž¡‘0USINGŽ¡‘0+–ffsave:“anObject“to:“aFileObject;Ž¡‘0+–ffsave:“anObject“to:“aFileObject“withTemplate:“aProbeMap;Ž¡‘0+–ffsave:“anObject“toFileNamed:“(const“char“*)aFileName;Ž¡‘0+–ffsave:“anObject“toFileNamed:“(const“char“*)aFileName“withTemplate:“(Probe-ŽŸ ‘0Map‘ff*)aProbeMap;Ž¡¡‘0-–ffsetFileObject:“aFileObject;Ž¡‘0-–ffsetTemplateProbeMap:“aProbeMap;Ž¡‘0-–ffsaveObject:“anObject;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸûÀDescriptionŽŸ¶Æ¾This–?ýclass“is“used“to“write“an“object's“variables“to“a“specified“file.‘ úIf“only“a“subset“ofŽ© the–?ývariables“should“beŽŸ ^5ïhtml:ï html:¡written–?ýout,“the“set“is“specified“by“a“template“ProbeMap“(where“the“ProbeMap“will“contain“Probesަfor‘?ýthoseŽïhtml:ï html:¡variables–?ýwhich“should“be“saved).ŽŸ ÕSïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:Ÿ ƒ>‘:+–?ýsave:› úanObject“to:˜aFileObjectޤ8äïhtml:ï html:ïhtml:ï html:© ­‘:+–?ýsave:› úanObject“to:˜aFileObject“withTemplate:˜aProbeMapŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:+–?ýsave:› úanObject“toFileNamed:˜(const“char“*)aFileNameŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:+–?ýsave:› úanObject“toFileNamed:˜(const“char“*)aFileName“withTemplate:˜aProbeMapŽŸ8äïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹´Õ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБWºâ¾As–?ýin“the“case“of“ObjectLoader“we“provide“a“set“of“convience“class“methodsޤ ‘Wºâwhich–?ýwill“save“the“entire“target“object“(or“the“subset“of“variables“specifiedŽ¡‘Wºâin–?ýa“template)“without“actually“returning“an“instance“of“ObjectSaver“to“theŽ¡‘Wºâuser.ŽºâŸïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýsetFileObject:‘ úaFileObjectŽŸ8äïhtml:ï html:© Ç‘XIf–?ýthe“user“bothers“to“generates“an“actual“instance“of“the“ObjectSaver“class,Ž¡‘Xs/he–?ýcan“set“the“target“fileObject“which“the“instance“should“use“by“sendingŽ¡‘Xit–?ýthis“message.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýsaveObject:‘ úanObjectŽŸ8äïhtml:ï html:¦‘XThis–?ýis“the“message“the“user“must“send“an“instance“of“the“ObjectSaver“classŽ¡‘Xin–?ýorder“to“save“the“state“of“the“target“object“into“the“requested“file.ŽŸ8äïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýsetTemplateProbeMap:‘ úaProbeMapŽŸ8äïhtml:ï html:¦‘XThis–?ýmethod“is“used“to“specify“which“variables“of“the“source“object(s)“shouldŽ¡‘Xbe–?ýsaved“by“the“ObjectSaver“instance“to“which“this“message“was“sent.ŽŸ 8äïhtml:ï html:ïhtml:ï html:ïhtml:ï html:¦‘0Saving–?ýfloats“and“doubles:‘ úThe“desired“number“of“significant“figures“for“all“floatsŽ¡‘0and–?ýdoubles“can“be“set“in“the“global“instance“of“the“ProbeLibrary.‘ úHowever,“if“ïhtml:ï html:ïhtml:ï html:notset,Ž¡‘0it–?ýwill“default“to“a“value“of“six“(6)“significant“figures,“which“is“identical“to“previousŽ¡‘0versions–?ýthat“did“not“have“this“feature.‘ úSee“the“documentation“on“ïhtml:ï html:probesïhtml:ï html:Ž¡‘0(../probing.html)Ž¡‘0for–?ýhow“to“set“this“precision.Ž©8äïhtml:ï html:ŸÇ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ަïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹½u “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ©ÅQSort–™™-“class“to“sort“a“collectionŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸØòÀSynopsisŽŸ âcïhtml:ï html:Ÿ˜Z‘0Ä//ޤ ˆ‘0//–ffQSort“--Ž¡‘0//–ffA“class“(not“to“be“instantiated)“wrapper“around“the“C“sort“routine.Ž¡‘0//Ž¡¡‘0@protocol–ffQSort“Ž¡‘0USINGŽ¡‘0+–ffsortObjectsIn:“aCollection;Ž¡‘0+–ff(void)sortObjectsIn:“aCollection“using:“(SEL)aSelector;Ž¡‘0+–ff(void)sortNumbersIn:“aCollection;Ž¡‘0+–ff(void)sortNumbersIn:“aCollection“us-ŽŸ ‘0ing:–ff(int(*)(const“void*,const“void*))“comp_fun;Ž¡‘0+–ff(void)reverseOrderOf:“aCollection;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸØòÀDescriptionŽŸz½¾QSort–?ýis“simply“a“"wrapper"“for“the“C“native“"qsort"“function,“as“applied“to“a“Swarm“collection.ޤ The–?ývalues“will“appear“in“ascending“order“by“default.‘ úReversing“the“order“of“a“collectionŽ¡can–?ýbe“made“by“calling“ïhtml:ï html:reverseOrderOf.‘ úAll“these“methods“modify“the“underlying“collection,Ž¡so–?ýany“indexes“should“always“be“regenerated.ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¤ 㤑:+(void)‘?ýsortObjectsIn:‘ úaCollectionŽ©8äïhtml:ï html:¡‘XGiven–?ýa“collection,“this“method“will“sort“the“objects“with“the“"compare"“functionޤ ‘Xfor–?ýthe“object.‘ úIf“the“objects“don't“provide“a“compare“function,“it“usesŽ¡‘Xthe–?ýdefault“from“the“defobj“library.ŽŸ8äïhtml:ï html:ïhtml:ï html:¤ 㤑:+(void)sortObjectsIn:– úaCollection‘?ýusing:“(SEL)aSelectorަïhtml:ï html:¡‘XThis–?ýmethod“allows“the“user“to“specify“a“given“message“selector“to“use“toŽ© ‘X"compare"–?ýthe“objects.ŽŸ8äïhtml:ï html:ïhtml:ï html:¡‘:+(void)‘?ýsortNumbersIn:‘ úaCollection;ŽŸcïhtml:ï html:Ÿ ¸û‘XThis–?ýmethod“is“intended“specifically“for“integer“comparisons,“again“usingަ‘Xa–?ýdefault“"compare"“function.‘ úThe“default“assumes“numbers“should“be“monotonicallyަ‘Xincreasing.ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ÆÛ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:ïhtml:ï html:© ‘:¾+(void)–?ýsortNumbersIn:› úaCollection“using:˜(int(*)(const“void*,const“void*))comp_funŽŸ8äïhtml:ï html:¤ Ç‘XAs–?ýabove,“except“that“a“specific“function“is“given.ŽŸ8äïhtml:ï html:ïhtml:ï html:¡‘:+(void)‘?ýreverseOrderOf:‘ úaCollectionŽŸÕSïhtml:ï html:Ÿ *­‘XReverses–?ýthe“current“order“of“a“collection.› úTo“make“a“"reversed"“(i.e.˜decending)ޤ ‘Xsort,–?ýsimply“call“one“of“the“appropriate“"sort..."“methods“on“a“collection,Ž¡‘Xthen–?ýcall“this“function“on“the“same“collection.ŽŸ‘0„¤ŽŽ¦ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹Ðx “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ!ÅNSelect–™™-“class“to“select“exactly“N“elements“at“random“fr½«om“a“collectionŽ©‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ¼jÀSynopsisŽŸ âcïhtml:ï html:Ÿ{Ò‘0Ä//ޤ ‘0//–ffNSelect“--Ž¡‘0//–ffA“class“(not“to“be“instantiated)“wrapper“around“a“Knuth“algorithmŽ¡‘0//–fffor“the“selection“of“exactly“N“elements“form“a“collection“withoutŽ¡‘0//‘ffrepetition.Ž¡‘0//Ž¡¡‘0@protocol–ffNSelect“Ž¡‘0USINGŽ¡‘0+–ff(void)select:“(int)n“from:“aCollection“into:“bCollection;Ž¡‘0@endަ‘0„¤ŽŽ© ïhtml:ï html:ŸG®ïhtml:ï html:Ÿ¼jÀDescriptionŽŸ^5¾NSelect–?ýselects“exactly“N“elements“from“a“collection“without“repetition.‘ úA“target“collectionŽ¡must–?ýbe“provided.ŽŸ —ïhtml:ï html:ŸÇ‘0„¤ŽŽ¦ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹Ôâ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:ŸÅUName–™™-“class“to“generate“unique“names“f£×or“objects/agentsŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸÕcÀSynopsisŽŸ âcïhtml:ï html:Ÿ”Ë‘0Ä//ޤ ù‘0//–ffUName“--Ž¡‘0//–ffA“class“used“to“generate“unique“names“(e.g.“"critter1",“"critter2"“etc).Ž¡‘0//Ž¡¡‘0@protocol–ffUName“Ž¡‘0CREATINGŽ¡‘0+–ffcreate:“aZone“setBaseName:“(const“char“*)aString;Ž¡‘0+–ffcreate:“aZone“setBaseNameObject:“aStringObject;Ž¡¡‘0-–ffsetBaseName:“(const“char“*)aString;Ž¡‘0-–ffsetBaseNameObject:“aStringObject;Ž¡‘0USINGŽ¡‘0-–ff(const“char“*)getNewName;Ž¡‘0-‘ffgetNewNameObject;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸÕcÀDescriptionŽ©w.¾This–?ýclass“is“used“to“generate“unique“names“(agent0,“agent1,“agent2...)‘ úfor“objects“in“a“simulation.ޤ The–?ýuser“will“typically“create“an“instance“of“the“UName“class“initialized“with“a“baseName“presentedŽ¡either–?ýas“a“ïhtml:ï html:Ä(const‘ffchar¾*)“or“an“object“of“class“ïhtml:ï html:ïhtml:ï html:ÄStringïhtml:ï html:ަ(../collections/String.html)ŽŸ ù¾.‘ úThe–?ýuser“can“then“request“new“names,“again“either“as“ïhtml:ï html:Ä(const–ffchar“*)'¾s–?ýor“as“instances“ofŽ¡the–?ýString“class.‘ úThe“user“can“also“reset“the“counter“used“to“generate“the“names“in“case“s/heŽ¡wants–?ýto“restart“naming“objects“with“the“same“baseName.ŽŸ8äïhtml:ï html:ïhtml:ï html:© à‘0Note:‘ úBoth–?ýin“the“case“of“initialization“by“ïhtml:ï html:Ä(const–ffchar“*)–?ý¾and“initialization“byŽ¡‘0an–?ýinstance“of“the“String“class,“the“original“is“copied“ïhtml:ï html:Ânot“stored“internally‘üo¾soŽ¡‘0it–?ýis“up“to“the“user“to“free“the“original“ïhtml:ï html:Ä(const–ffchar“*)–?ý¾or“String“instance“if/whenŽ¡‘0necessary!ŽŸ 8äïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¦‘:+–?ýcreate:› úaZone“setBaseName:˜(const“char“*)aStringŽŸ8äïhtml:ï html:ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹Ú? “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ9ºâ¾+–?ýcreate:› úaZone“setBaseNameObject:˜aStringObjectŽºâ¤8äïhtml:ï html:ïhtml:ï html:© Ç‘:-–?ýsetBaseName:‘ ú(const“char“*)aStringŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýsetBaseNameObject:‘ úaStringObjectޤ8äïhtml:ï html:¦‘XThese–?ýmessages“should“be“used“to“set“or“reset“the“base“name.Ž¡ïhtml:ï html:ïhtml:ï html:¦‘XNote:‘ úthese–?ýmethods“will“automatically“reset“the“counter.ޤ8äïhtml:ï html:ïhtml:ï html:¦‘:-–?ý(const“char“*)getNewNameŽ¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýgetNewNameObjectŽŸ8äïhtml:ï html:¦‘XGenerates–?ýa“new“name“in“the“requested“format.Ž¡ïhtml:ï html:ïhtml:ï html:¦‘:-‘?ýresetCounterŽïhtml:ï html:¤ ‘XResets–?ýthe“counter“used“as“a“suffix“in“the“unique“names“generated.ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:¡‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:¦‘0¾Last‘?ýmodified:‘ ú1997-12-19ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹ ä “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:ŸˆÅActi•Û$v“eGraph–™™-“pr½«oÛ$vides“continous“data“feed“between“Swarm“and“the“GUIŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸÍÑÀSynopsisŽŸ âcïhtml:ï html:Ÿ9‘0Ä//ޤ g‘0//–ffActiveGraph“--Ž¡‘0//–ffThis“class“provides“the“continuous“data“feed“between“Swarm“and“the“GUI.Ž¡‘0//Ž¡¡‘0@protocol–ffActiveGraph“Ž¡‘0USINGŽ¡‘0-–ffsetElement:“ge;Ž¡‘0-–ffsetDataFeed:“d;Ž¡‘0-‘ffstep;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸÍÑÀDescriptionŽŸoœ¾An–?ýactive“graph“object“is“the“glue“between“a“MessageProbe“(for“reading“data)“and“a“BLTGraphޤ GraphElement.‘ úActiveGraphs–?ýare“created“and“told“where“to“get“data“from“and“send“it“to,“andŽ¡then–?ýare“scheduled“to“actually“do“graphic“functions.‘ úïhtml:ï html:ïhtml:ï html:This“class“is“used“by“EZGraph,“and“weŽ¡expect–?ýto“see“less“direct“usage“of“it“by“end-users“as“more“analysis“tools“(such“as“EZGraph)Ž¡internalize–?ýits“functionality.ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¤ ؃‘:-‘?ýsetElement:‘ úgetŽŸ8äïhtml:ï html:¡‘XSets–?ýthe“graph“element“used“to“draw“onŽ©8äïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýsetDataFeed:‘ údŽïhtml:ï html:Ÿ g‘XSets–?ýthe“object“that“will“be“probed“for“data.ަïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýsetProbedSelector:‘ ú(SEL)sŽŸÕSïhtml:ï html:Ÿ <‘XSets–?ýthe“message“sent“to“the“object“for“graphing“(inherited“from“MessageProbe).ަïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýstepŽŸ8äïhtml:ï html:¡‘XFires–?ýthe“probe,“reads“the“value“from“the“object,“and“draws“it“on“the“graphޤ ‘Xelement.› úThe–?ýX“value“is“implicitly“the“current“simulation“time.˜Y“is“theŽ¡‘Xvalue‘?ýread.ŽŸ‘0„¤ŽŽŸ ïhtml:ï html:ŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹!éÑ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ/ºâÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:ŽŸ ‘/ºâ(mailto:mgd@santafe.edu)ŽºâŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹"òü “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:Ÿ žâÀNameŽŸªóïhtml:ï html:Ÿ)#ÅActi•Û$v“eGraph–™™-“pr½«oÛ$vides“continous“data“feed“between“Swarm“and“a“ leŽ©‘0„¤ŽŽŸG®ïhtml:ï html:ŸâlÀSynopsisŽŸ âcïhtml:ï html:Ÿ¡Ô‘0Ä//ޤ &‘0//–ffActiveOutFile“--Ž¡‘0//–ffProvides“the“continuous“data“feed“between“Swarm“and“a“File.Ž¡‘0//Ž¡¡‘0@protocol–ffActiveOutFile“Ž¡‘0USINGŽ¡‘0-–ffsetFileObject:“aFileObj;Ž¡‘0-–ffsetDataFeed:“d;Ž¡‘0-‘ffstep;Ž¡‘0@endަ‘0„¤ŽŽŸ ïhtml:ï html:ŸG®ïhtml:ï html:ŸâlÀDescriptionŽŸ„7¾This–?ýis“the“file“I/O“equivalent“of“ActiveGraph:‘ úit“takes“an“OutFile“object,“a“target“(datafeed)ޤ object,–?ýand“a“selector,“which“it“uses“to“extract“data“from“the“object“and“send“it“to“the“file.Ž¡ïhtml:ï html:ïhtml:ï html:This–?ýclass“is“used“by“EZGraph,“and“we“expect“to“see“less“direct“usage“of“it“by“end-users“asŽ¡more–?ýanalysis“tools“(such“as“EZGraph)“internalize“its“functionality.ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ïhtml:ï html:¤ í‘:-‘?ýsetFileObject:‘ úanOutFileŽŸ8äïhtml:ï html:¡‘XSets–?ýthe“file“object“to“which“the“data“will“be“sent.Ž©8äïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýsetDataFeed:‘ údŽïhtml:ï html:Ÿ &‘XSets–?ýthe“object“that“will“be“probed“for“data.ަïhtml:ï html:ïhtml:ï html:¡‘:-–?ýsetProbedSelector:‘ ú(SEL)“sŽŸÕSïhtml:ï html:Ÿ P¯‘XSets–?ýthe“message“sent“to“the“target“object“(inherited“from“MessageProbe).ަïhtml:ï html:ïhtml:ï html:¡‘:-‘?ýstepŽŸ8äïhtml:ï html:¡‘XFires–?ýthe“probe,“reads“the“value“from“the“object,“and“sends“it“to“the“file.ŽŸ ‘XThe–?ýX“value“is“implicitly“the“current“simulation“time.‘ úY“is“the“value“read.ŽŸ 8äïhtml:ï html:ŸÇ‘0„¤ŽŽŸ ïhtml:ï html:Ÿ &‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹#ô§ “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ ýБ/ºâÂ(mailto:mgd@santafe.edu)ŽºâŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-08ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒ‹$þ2 “ºâ ýxºâïcolor push Blackïhtml:ï html:ŸüfdŽŽŽ’Ôï color popŽŽ ^ºâ ýÆïhtml:ï html:ŸIy½Simtools–/Library:‘m™Usage“GuideŽŸq'‘0„¤ŽŽŸG®ïhtml:ï html:Ÿ¼jÀOv•ÓÅer“viewŽŸ^5¾The–?ýïhtml:ï html:Âsimtools‘¼r¾library“contains“a“number“of“semi-related“tools“that“are“useful“for“writing“simulations.ŽŸ —ïhtml:ï html:Ÿïhtml:ï html:ŸÇ‘0„¤ŽŽ¤ ïhtml:ï html:©\’áøRï>PSfile="eps/prev.eps" llx=298 lly=373 urx=314 ury=389 rwi=160 ŽŽ¡ïhtml:ï html:Ÿ(Interface.html)ŽŸÕSïhtml:ï html:¦’áøRïï html:Ÿ(../simtools.html)ŽŸÕSïhtml:ï html:¦’áøRï>PSfile="eps/next.eps" llx=298 lly=373 urx=314 ury=389 rwi=160 ŽŽ¡ïhtml:ï html:¤(../simtools.html)Ž¡‘0„¤ŽŽŸ ïhtml:ï html:¤ ‘0ÂMarcus–?ýG.“Daniels“ïhtml:ï html:‘¼rïhtml:ï html:Ž¡‘0(mailto:mgd@santafe.edu)ŽŸ8äïhtml:ï html:Ÿ Ç‘0¾Last‘?ýmodified:‘ ú1998-01-10ŽŽŸ*ºâïcolor push Black’Ôï color popŽŽŒøÿkƒ’À;è—T~Óºâ $óÓߌ˜ff ptmb7tó0ˆÛ pcrr7tóßê