The Build Patch Map Scenario


Introduction

The Build Patch Map scenario illustrates one way that HexSim can be used to construct a patch map for use in models like HexSimPLE. This is a small scenario that runs for just one time step, and exists only to produce a single Generated Hexmap. In this example, the Generated Hexmap is constructed using the Habitat Map, a Hexmap needed by the HexSimPLE model. But this dependence on a starting Hexmap isn't essential. One example patch map (included with the workspace) is shown to the right. This map was constructed using the Build Patch Map scenario, and it was then manually moved into the workspace spatial data folder. The colors in the image result from the patch ID values, which were randomized to make the patches visually more distinct.

The HexSimPLE illustration provided here uses an artificial landscape, and it is not based upon an actual organism. Users developing HexSimPLE models for actual ecological systems will probably not need this machinery. Instead, the stress maps used by HexSimPLE would be based on actual imagery of some real place, and on real spatially-distributed disturbance regimes.

Population Parameters

2500 individuals are initially placed randomly throughout the landscape. The Range Data tab parameters control patch size and shape because the patches are derived from individual's ranges. In this illustration, patch size is limited to 50 hexagons (Maximum Range Area parameter), and patch shape is constrained to not become too linear (Maximum Range Span parameter). The hexagon scores in the Habitat Map vary from 0-100, and this range of scores informed the selection of the range eligibility and max range resource parameters. The resource targets are set extremely large, so that individuals looking to construct a range will always explore every hexagon that they can.

The population makes use of two accumulators and one accumulated trait.

Event Sequence

The simulation begins with a Movement event that makes every individual attempt to construct a new group and range. Individuals are allowed to explore 100 hexagons, and their large resource targets (see Population Parameters) will ensure that they do actually visit all of these sites. The Adaptive algorithm makes individuals tend to explore the higher quality hexagons first, while still keeping their search patterns somewhat random. Most individuals will end up being floaters, because the initial population size is large and available habitat is limited.

The next event places individuals into either a group member or floater class. Then a Survival event is used to remove all of the floaters. The remaining individuals are all group members, and each will have a unique allocated area (their ranges). These allocated areas will become the patches in the patch map.

The Accumulate event named Set Patch ID is used to set each individual's Patch ID accumulator to its individual ID. The individual IDs will not be sequential because a majority of individuals were unable to obtain a range, and were subsequently removed from the population.

Finally, a Generated Hexmap event is used to construct the output patch map. This event writes each individual's patch ID to every hexagon in its allocated area.

Using the Scenario

When the Build Patch Map scenario is run, a Generated Hexmap called Patch Map Candidate will be written to the Results folder. A Hexmap with the name Patch Map is required by the Build Stress Maps scenario. After the scenario is run, the following steps must be taken.

  • Close any open scenario tabs.
  • Quit HexSim.
  • Navigate to the Build Patch Map results folder.
  • Move the Patch Map Candidate sub-folder to the workspace spatial data (under Hexagons).
  • Start HexSim.
  • Rename Patch Map Candidate to Patch Map.

If HexSim starts up with the Build Patch Map scenario open, then a conflict will arise between the new workspace spatial data called Patch Map Candidate and the Generated Hexmap of the same name being created within the model itself. This is why the scenario should be closed prior to exiting HexSim.

As mentioned above, the Patch Map's ID values will not be sequential, so users may want to take the following additional steps to improve the visual clarity of the displayed map. These steps are entirely optional. The second and third bullets below reference computer programs that can be found at the Utilities page of this website.

  • Export the Patch Map from the workspace to a CSV file.
  • Run the CSV file through the renumber_patches program.
  • Run the renumbered CSV file through the randomize_patches program.
  • Remove the old Patch Map from the workspace.
  • Import the renumbered, randomized Hexmap, and name it Patch Map.

Naturally, there are other ways to renumber a patch map, and you should use whatever methods you're most comfortable with.