public JungGraphObserver(String name) { this.name = name; this.hyphadataPid = Configuration.getPid(PAR_HYPHADATA_PROTO); this.hyphalinkPid = Configuration.getPid(PAR_HYPHALINK_PROTO); this.mycocastPid = Configuration.getPid(PAR_MYCOCAST_PROTO); this.period = Configuration.getInt(name + "." + PAR_PERIOD); this.walkDelay = Configuration.getInt(name + "." + PAR_WALK_DELAY); mainThread = Thread.currentThread(); this.changeListeners = new HashSet<ChangeListener>(); visualizer = null; // HyphaData.addHyphaDataListener(this); // HyphaLink.addHyphaLinkListener(this); }
public PopulateVirtualWorld(String prefix) { distribution = Configuration.getInt(prefix + "." + PAR_DISTRIB); applicativeLayerId = Configuration.getPid(prefix + "." + APPLICATIVE_LAYER); Globals.mapSize = Configuration.getLong(prefix + "." + MAP_SIZE); Globals.zoneSize = Configuration.getLong(prefix + "." + ZONE_SIZE); Globals.zoneNb = Configuration.getInt(prefix + "." + ZONE_NB); Globals.outOfZoneNb = Configuration.getInt(prefix + "." + OUT_OF_ZONE_NB); Globals.wSpeed = Configuration.getInt(prefix + "." + WSPEED); Globals.tSpeed = Configuration.getInt(prefix + "." + TSPEED); Globals.smallZoneSize = Configuration.getInt(prefix + "." + SMALL_ZONE_SIZE); Globals.smallZoneNb = Configuration.getInt(prefix + "." + SMALL_ZONE_NB); Globals.haltedToHalted = Configuration.getInt(prefix + "." + HTH); Globals.haltedToTravelling = Configuration.getInt(prefix + "." + HTT); Globals.haltedToWandering = Configuration.getInt(prefix + "." + HTW); Globals.travellingToTravelling = Configuration.getInt(prefix + "." + TTT); Globals.travellingToHalted = Configuration.getInt(prefix + "." + TTH); Globals.travellingToWandering = Configuration.getInt(prefix + "." + TTW); Globals.wanderingToWandering = Configuration.getInt(prefix + "." + WTW); Globals.wanderingToTravelling = Configuration.getInt(prefix + "." + WTT); Globals.wanderingToHalted = Configuration.getInt(prefix + "." + WTH); Globals.changeWanderingDirection = Configuration.getInt(prefix + "." + CWD); Globals.quiet = Configuration.getBoolean(prefix + "." + QUIET); }