This section of code (which ends with the close of the '#ifdef' statement from the header) defines the customized Edge Content Manager. Fundamentally, then, space specifies not the location of an agent but its relationship to other agents. Movement past the specified boundaries is prohibited. The first example (Demo 00) walks through the process of building a demo, and the two-steps of compiling and linking are made clearer there.

The code to do this is straightforward. Here we will again extend Repast's built-in class: This section of code extends the RepastEdgeContent class. The class itself is templated to take any object as a vertex. This is a region of space that is managed by an adjacent process that is copied onto the local process. The next section of the code defines the Edge Content that will be associated with this class. Each 'move Repast HPC, however, does not permit this: the boundary is specified for the space as a whole and applies to all axes. Creating custom edges in Repast HPC requires several steps; this is because you must provide extended functionality to replace several actions that Repast HPC perfoms invisibly for its built-in edge type.

Equally important, distances and queries are all calculated as if there is no boundary at all. For example, you may wish to track the age of network connections, and drop older ones when they expire, or you may wish to track the number of times a link has been used. In this Repast HPC is not unlike most other ABM simulation frameworks, including Repast Simphony. important differences, someone who is familiar with Java can usually read C++ code and begin to write it quickly. We use space to divide the simulation: each process is responsible for a portion of the space: Each process is responsible for- and therefore 'knows about'- only the portion of space that is within its boundaries. It is an int, with a basic getter and setter (the last two lines of the class's code). Note that to decompress the file you may need to use the command line program 'tar'; a command like "tar -xvf SRC.tar.gz" should extract the contents of the folder to the current directory. If we consider a network, we could have B be related to A, C, and D; there is no difficulty with this. (It is possible to avoid using templated code, but it will be far simpler and more typical to use code templates.) This figure illustrates the 4 process case, taking the view of Process 1, at the center. (Moving in the reverse direction is equivalent, passing from x=0 to x=99.)

The depiction above shows the case with StrictBorders; with WrapAround borders the picture is more complicated, as there are buffer zones on all sides of a given process. However, Repast HPC behaves very differently when the space is used to parallelize the simulation. A system capable of compiling and running MPI-based code. This tutorial walks through a series of examples that demonstrate several ways that Repast HPC models can be constructed.

Consider the red and blue agents: In the unified space they are only 2 units apart. The new, custom edge class; generally this should extend the default RepastEdge class, A new Custom Edge Content class, which will be used to send Edge information across processes, A custom Edge Manager that can package instances of edge content classes, send information about them, and, upon receiving this information, construct edge instances. This also mirrors Repast's built-in edges. In Demo 02, we created a network projection and explicitly connected agents using network links. The buffer zone makes agents in adjacent processes available to a local process. In theory, the space should be unified across processes, but if we have divided space up into pieces, is it really unified? The instantiation of the content manager occurs here in the class declaration.

Although the example here only uses four processes, the procedure is the same when the number of processes is larger. However, in a one-dimensional space, B can have exactly two neighbors. Detailed information about how to write C++ code is not included.

'Linking' refers to the fact that code is usually built in pieces that must be 'linked' together in order to run.

in this tutorial is on laying out how Repast HPC and ReLogo are structured, and how to begin to compose, compile, and run models in Repast HPC. For simplicity, we will place all of the code in a single file, called Demo_02_Network.h, which we will place in the 'includes' directory. You can download the source code for the examples in this tutorial here: Once you have downloaded and decompressed the file, you should look at the instructions here: getLinkToPage("HowToUse");. Custom Edges: An Advanced Topic In the previous steps we have used Repast HPC's built in default edges. The hope is that this In the current implementation of Repast HPC space is always divided evenly across processes: each process's space is the same size in the x and y directions. The last step of Demo 03 is an example in which there is both a network and a set of spatial projections in operation simultaneously. However, it is much easier to get code running in Java than it is in C++, and the A system that includes the 'make' and 'diff' utilities (standard on most Unix-like systems). In this portion of the tutorial, we will present the procedure for creating and using a spatial projection. A system that includes the 'make' and 'diff' utilities (standard on most Unix-like systems) A system capable of compiling and running MPI-based code.

Demo 00: A 'null' demo that has no Repast HPC code, but that demonstrates how to compile and run the demos to be presented, Demo 01: A basic demo in which agents interact without a spatial or network structure, Demo 02: A Network demo: agents interact according to a network of connections among them, Demo 03: A Spatial demo: agents interact on the basis of spatial proximity. However, for some simulations you may wish network edges to have multiple attributes. It is written, however, show a range of features that are included in the Repast HPC toolkit, and provide worked examples of how models that make use of these features in These have only one attribute, the Edge Weight. An agent at x=99 and an agent at x=0 are 99 units apart.

Agent-Based Modeling is a special kind of modeling that is commonly used in social sciences but can also be applied to biological and physical sciences. Note that Process 2 is adjacent at all four corners (NW, NE, SE, SW): There is no official implementation of a 3-Dimensional space in Repast HPC, but some users have attempted to implement them. The following compiled libraries and associated header files: Boost (version 1.54 or later), including all headers and the 'serialization', 'mpi', 'system', and 'filesystem' libraries. This will include an installation of MPICH-2, OpenMPI, or other MPI implementation. Some of the features discussed are related to Repast HPC infrastructure- how to set and change model parameters, In a network, any abstract set of connections is possible; in space, the relationships are constrained. The implementation can use the same components, because Point objects in Repast HPC are n-dimensional; they can also use the same conceptual framework of 'buffer zones' discussed here. After downloading the tarball, untar it, follow the installation instructions in the enclosed INSTALL.txt file, and then consult the Tutorial and Repast HPC Manual. For example, suppose that the 'space' is actually one-dimensional (a line), and there are 5 elements on it which, labeled in order, are A, B, C, D, and E. The labeling is arbitrary, but in a line (assuming you cannot have two elements in the same place) the elements must be in a sequence, and each element can have 2 neighbors: 'B' is neighbors with A and C; 'D' is neighbors with C and E; etc.

It may be counterintuitive to think of a position in space as a relationship: we might more intuitively think of an agent as having an X,Y attribute, and this attribute is a quality of the agent. In our simple demonstration, with only four processes, the buffer zones on either side of a given process along one axis are, in fact, the same process; in a larger simulation, with more processes in each axis dimension, this would not be the case.