Ferramentas do usuário

Ferramentas do site


geopro:pedro:mason

Essa é uma revisão anterior do documento!


Mason

MASON (Multi-Agent Simulator Of Neighborhoods… or Networks… or something…) is a fast discrete-event multiagent simulation library core in Java, designed to be the foundation for large custom-purpose Java simulations, and also to provide more than enough functionality for many lightweight simulation needs.


Homepage http://cs.gmu.edu/%7Eeclab/projects/mason/
Origin George Mason University
Year 2003
Version 11
License Academic Free License
Language Java


MASON has execution speed as a high priority. MASON 1-35% faster than Repast.

It has an example of Schelling's model in /home/pedro/codigo/mason/sim/app/schelling/Agent.java. The model is composed by reds, blues, empty sites where the players can move, and non-available sites. Following there is an example of calculating the unsatisfaction and moving to another site:

  // get all the places I can go.  This will be slow as we have to rely on grabbing neighbors.
  sch.neighbors.getNeighborsMaxDistance(loc.x,loc.y,sch.neighborhood,false,neighborsX,neighborsY);
    
  // compute value
  double val = 0;
  int threshold = sch.threshold;  // locals a little faster
  int numObjs = neighborsX.numObjs;
  int[] objsX = neighborsX.objs;
  int[] objsY = neighborsY.objs;
  int myVal = locs[x][y];
      
  for(int i=0;i<numObjs;i++)
  {
      if (locs[objsX[i]][objsY[i]] == myVal // just like me
          && !(objsX[i] == x && objsY[i] == y))  // but it's NOT me
      {
          val += 1.0/Math.sqrt((x-objsX[i])*(x-objsX[i]) + (y-objsY[i])*(y-objsY[i]));
          if (val >= threshold) return;  // we're not moving
      }
  }
      
  // find a new spot to live -- a random jump? Move to a nearby location?  Websites differ
  int newLocIndex = state.random.nextInt(sch.emptySpaces.numObjs);
  Int2D newLoc = (Int2D)(sch.emptySpaces.objs[newLocIndex]);
  sch.emptySpaces.objs[newLocIndex] = loc;
      
  // swap colors
  int swap = locs[newLoc.x][newLoc.y];
  locs[newLoc.x][newLoc.y] = locs[loc.x][loc.y];
  locs[loc.x][loc.y] = swap;
  // adopt new position
  loc = newLoc;

doing

MASON (Multi Agent Simulation Of Neighbourhood - Table 2) was developed by the Evolutionary Computation Laboratory (ECLab) and the Centre for Social Complexity at George Mason University. At present MASON does not provide functionality for dynamically charting (e.g. histograms, line graphs, pie charts, etc) model output during a simulation, or allow GIS data to be imported / exported (Luke et al., 2004). However, the developers of MASON are continuing to develop further functionality, and they hope users will develop and contribute tools themselves (e.g. GIS integration). Unfortunately there is little technical documentation and a relatively small user group in comparison to some of the other systems identified within this paper. However, how-to documentation, demonstration models (e.g. the seminal heat bugs example, network models, etc), and several publications detailing the implementation and / or application of MASON are available for a prospective modeller to evaluate the system further (MASON, 2006).

Luke, S., Cioffi-Revilla, C., Panait, L. and Sullivan, K. (2004), 'MASON: A New Multi- Agent Simulation Toolkit', SwarmFest 2004, Eighth Annual Swarm Users / Researchers Conference, University of Michigan, Ann Arbor, Michigan USA.

geopro/pedro/mason.1184341778.txt.gz · Última modificação: 2007/07/13 15:49 por pedro