Download PDF
Download page Forage.
Forage
Forage Rules model a community moving in response to an attraction generated by the presence of another community, such as movement towards a food source. Examples of this behavior include livestock or wildlife seeking out food sources such as grasses, fruits, or insects.
Factors affecting forage attraction are quantity of food, time of year, and distance from food. Foraging behavior is also affected by the speed at which a community moves.
Forage rules are created for an individual size class within a community. One or more forage sources can be defined within a rule. These forage sources will share in the characteristics of attraction they create for the rule’s community class. If forage sources differ in the strength or seasonality of attraction, multiple forage rules can be created for each attraction configuration.
The total quantity of forage generated by forage sources within a rule are aggregated in the model using a common project unit, called Forage Units. An example project unit suitable for use as a forage unit is biomass, as it is a generic unit that can apply to many types of food.
The strength of attraction generated by a rule is defined using two functions, strength vs. quantity of food and strength vs. time of year. These two functions are multiplied to calculate total attraction. Food quantity can generate either a positive or negative attraction. The seasonality function applies an adjustment factor ranging from 0 (no attraction) to 1 (full attraction). Options for modes of dissipation are available in the rule to define how strength weakens with distance from the forage source.
Results from the forage rule represent strength of attraction per model element and can be viewed for a rule’s community size class both in the simulation map and in the output HDF file. Forage attraction results can be viewed per individual rule, aggregated for all forage rules, combined with instinctual attraction, and combined with all rules generating an attraction. This gives the modeler options for reviewing the interplay between rules in the overall attraction response.
Forage Rule Tab
The Forage Rule tab in the Logic console contains controls for defining the forager, forage source(s) and strength of forage attraction (Figure).

Figure. The Forage Rules interface.
Rule Name: displays name of selected Forage rule as part of dropdown list of all Forage rules in the study.
Add, Rename, Copy, and Delete Rule: described above in the common features section (Figure).
Community: dropdown list of communities in the study.
Size Class: this dropdown field lists the size class members of the selected community.
Pick Forage: allows users to pick the forage community-classes.
Strength (Function of Forage): plot and table with relationship between forage and strength of attraction.
Strength (Function of Season): plot and table with relationship between forage attractions and season.
Weight: this field applies a multiplier to the attraction strength. This is set to 1 by default.
Dissipate: this dropdown field determines the interpolation method used when the attraction strength dissipates from the geographic location of an instinctual rule.
Radius: this radio button dictates that the attraction strength dissipates using a radius value with the map units. This is set to 1 by default.
Slope: this radio button dictates that the attraction strength dissipates using a slope value with the unit of strength/map unit. This is set to 1 by default.
Apply: clicking this button saves the forage rule.

Figure. Interface for creating a new instinctual rule.
Community and Size Class
Community and Size Class drop down lists are available for defining the forager for the forage rule. Each forage rule can have only one community-size class combination, however the community-size class chosen for a rule can be used in other forage rules.
Community - The forager community is selected from the drop-down list containing all communities defined within the EFMSim project Communities console.
Size Class - Once a community is selected, the associated size classes, also defined in the Communities console, will become available for selection in the Size Class drop-down list.
Pick Forage for Community-Class
The forage sources to be used in the rule are defined in the Pick Forage for Community-Class section. Community-size classes available as forage are shown in the list on the left. This list has a top node labeled as “Project” and contains all community size classes defined in the Project. Community-size classes selected to be used as forage by the model simulation appear in the list on the right, under the top node labeled “Forage”. Selecting a community-class and using the Add and Remove buttons allows for modification of the Forage list.
Forage Units
A Forage Unit is a project unit that is used to aggregate all forage sources when calculating strength of forage attraction. All project units defined by the user in the Units Manager tab of the Communities console will be available in the Forage Units drop down list (the default project unit “Density” will not appear in the list). If the user hasn’t created any project units, the list will be empty and the forage rule cannot be created.
All communities involved in a Forage Rule are converted by EFMSim to the project unit according to the relationship defined in the Units Manager. This allows the model to convert from community units, such as weight or height, to a common project unit suitable for representing forage, such as biomass.
Strength (function of forage and season)
The Strength section of the Forage Rules tab defines the level of attraction generated by forage. This is accomplished using two user-defined functions linking strength of attraction with quantity of forage and with time of year. Relationships for each of these functions are created using tables of value vs. strength. Relationships must be defined for both factors to apply the rule.
The first function is defined using data pairs of forage quantity vs. strength. The forage quantity column is a value in Forage Units per prey community individual. For example, when using biomass as forage unit and grass as forage community, the forage quantity column units are biomass per individual grass entity, or biomass per blade of grass. In this case, values for Forage quantity can be quite small. The strength of attraction column value is a number from -1 to 1 where -1 is the maximum negative attraction (the forage repels the predator community) and a 1 is the maximum positive attraction towards the forage. Data pairs are plotted in the graph to the left of the table.
The seasonality portion of strength of attraction is defined using data pairs of date (e.g., 01Mar) vs. attraction factor, where the factor can range from 0 for no attraction to 1 for maximum attraction. If a single data pair is defined, it will be used for the entire year.
Weight and Dissipate
These controls provide the same functionality as in other rules and are described in another section. When parameters are entered, click the Apply button to save the Forage rule (Figure).

Figure. Click the Apply button to save the Forage rule.
Simulation
Instinctual, forage, road, and density are horizontal rules that generate attractions. Simulation involves calculating the magnitude of attraction created by available forage, adjusting the attraction for time of year, dissipating the attraction spatially, and then moving the foraging community class in response to the attraction.
Foraging behavior is movement of communities spatially in the x and y horizontal directions within the study area. This is important to consider when evaluating simulation results as it affects intermediate values that the forage uses in its calculations.
Foraging occurs when a community class member is present in an element that is within the attraction field of a forage source. The strength of attraction at the site of forage is determined by calculating the amount of forage present in an individual class member and translating it into strength using the forage-strength function. This strength is then multiplied by the season factor for the simulation day to determine the final attraction. This process is described in more detail below.
Attraction at the site of forage is extended to surrounding model elements using the dissipation settings defined in the rule. The community-size class then moves in response to the attraction according to speed settings defined in the Movement tab of the Communities console.
Forage Attractions
As mentioned above, the first step to calculating strength of attraction is calculating the forage-based strength factor. This requires calculating in Forage Units the amount of forage present in an individual class member. Once the size of the class member is determined after any higher-order rules are run, it is plugged into the Community to Project equation (defined in the Units Manager) to calculate a quantity in forage project units.
| Forage(sizeClass)=CommunityToProject(Size_{intermediate}) |
Where: Sizeintermediate = most recent forage community class size
For example, in a scenario where the forage source is grass with a community size unit of height and the EFMSim project has a growth rule in addition to a forage rule, calculations for a model time step could look like this:
- Because growth is a vertical rule which is higher in processing order than the forage rule, it is applied first. Grass starting at a height of 0.5 at the beginning of a timestep with a growth factor of 0.25 will grow to a height of (0.5 + 0.5*0.25) = 0.625.
- Next the forage quantity is calculated. For this scenario, the Forage Unit selected in the Forage Rule is Biomass. The equation defined in the Units Manager for converting grass community size units of height to Biomass project units, with size units of pounds, is (0.0001*$CU). This means quantity of forage is (0.0001*0.625) = 0.0000625 pounds.
Once the quantity of forage is known, it is converted to an attraction using the Forage vs. Strength function defined in the rule. Linear interpolation is used for values between user data points. The resulting strength of attraction is then multiplied by the seasonality factor to calculate forage attraction.
| Attraction_{Forage}=StrengthFunction(Forage) |
| SeasonFactor=SeasonalityFunction(Date) |
| Attraction_{rule}=Attraction(Forage)*SeasonFactor |
Total forage attraction for the simulation is an aggregation of all forage rules that is based on weighting factors defined for each rule.
Simulation Output
Once a simulation has completed, strength of forage attraction and the locations of foraging communities can be viewed in the simulation map and output data file to better understand foraging behavior as it relates to model parameter values.
Plot Count, Plot Density, and Plot Size can be used to review the timeline of foraging community-size class movement through and/or to model elements. Because these plots show all communities involved in the simulation, comparisons are more easily made between them to help understand relationships.
For viewing outputs specific to the Forage Rule, select the Simulation radio button in the animation layer’s Properties dialog and choose the rule’s community size class from the Community drop-down list. Additional options are described below.
Tables in the simulation HDF file specific to forage rules are forage attraction and forage unit. In addition, size and density of forager and forage communities can also be used to evaluate foraging behavior.
Forage attraction for the forager community is saved to community size class folder. It is saved per rule as well as aggregated with other forage rules and other EFMSim rules.
SizeClasses\< className> - folder containing aggregations for all rules associated with the size class:
ForageAttraction - attraction aggregated for all forage rules associated
InstinctualAndForageAttraction - attraction aggregated for all forage and instinctual rules
TotalAttraction - attraction aggregated for all rules that have an attraction component
SizeClasses\< className>\Rules\Forage\<forageRuleName>:
ForageAttraction - attraction for the individual rule named <forageRuleName>
Values for the forage unit can be saved to the simulation HDF file when the check box for Project Units has been selected in the Spatial Output Controls tab of the Project Properties dialog (accessed through the Settings menu). A folder named ProjectUnit will be added to each community and size class folder. Evaluated. Evaluating the ProjectUnit tables for forage communities can be useful in understanding forage rule results.
SizeClasses\< className>\ProjectUnit\<projectUnitName> - quantity of the Project Unit for the associated community class.
Configuring Spatial Output Controls
The Spatial Output Controls, which are accessed from the Project Properties dialog, control whether additional tables are generated in the simulation HDF file after computing a simulation with configured road rules.
The Spatial Output Controls have checkboxes for Forage under the Rules that generate attraction section. By default, the Per Rule checkbox is unchecked and the Total checkbox is checked.
When the Per Rule checkbox is checked, the Forage tables for the individual forage rules are generated in the simulation HDF file.
When the Total checkbox is checked, the table with aggregated attraction strength from all forage rules are generated in the simulation HDF file.
Configuring the Animation Properties
In the Animation Properties, a simulation with computed forage rules has options to display the attraction strength from a single or all forage rules in a simulation.
Model Variable - Sets the animation layer to show to either Density or Size.
Attraction Layer - Sets the animation layer to show forage attraction. Several options are available in the Attraction Layer drop-down list for displaying forage rule model output:
- Forage Rule Total - Shows attraction aggregated for all forage rules.
- Forage Rule - Shows attraction for an individual rule. When chosen, the adjacent Rule drop-down will become enabled and the desired forage rule can be chosen.
- Instinctual and Forage - Shows attraction aggregated for all instinctual and forage rules.
- Total Attraction - Shows attraction aggregated for all rules that are modeled using attraction.
Color scheme, tic intervals and contour limits can be adjusted to emphasize the model behavior of interest.