Return to docs home
FRED Modeling Language Guide
Welcome to FRED, the Framework for Reconstructing Epidemiological Dynamics. This document provides detailed information on using the FRED Modeling Language™ to create FRED programs. This guide is focused on the syntax and structure of a FRED program. For information on compiling and executing FRED programs, please see the documentation for the FRED Modeling Platform™.
If you have questions about the company or are interested in speaking with our sales, recruiting, or other teams, please visit the Epistemix web site.
For background on agent-based modeling in general and FRED in particular, please see the FRED Modeling Language Introduction document. This also includes the definition of key concepts and other documentation available for the language, including the reference guide and tutorials.
The FRED Simulation Cycle
The FRED language represents a fully functioning agent-based simulation system that can be completely customized as needed. FRED offers a discrete-time model with a time step of one hour. The duration of simulations can be from one day to 100 years. To use FRED, the user creates a FRED model in the FRED programming language. The FRED Modeling Platform™ compiles and executes the simulation cycle represented by a FRED program.
The simulation cycle consists of the following:
Select a geographic location for the simulation. This is one or more locations represented in the synthetic population.
Select the start and end dates for the simulation.
The simulation begins at midnight on the start date.
The simulation end at 11pm on the end date.
For each hour of the simulation, perform the following for each condition in the program.
Identify the agents that need to be updated according to the program-defined rules.
For each identified agent:
Select the agent’s next state.
Perform the actions associated with the agent’s next state.
If the condition involves interactions among agents, then:
simulate the agent interactions within the defined interaction groups
update this or other agent’s current state based on these interactions.
After each day of simulation, record statistics about the conditions in the population.
A complete simulation cycle for a single program as described above is called a run. Since FRED models are stochastic, it is often desirable to perform several runs in order to produce meaningful statistics about the performance of the model. A set of runs of the same model is called a job. Upon completion of a FRED job, the user can obtain reports of the output, including spreadsheets, plots, and videos that display the location of user-selected events on a report of the simulation area.
The following chapters will provide details on the FRED Modeling Language and the components of a FRED model, including:
- Chapter 1: Synthetic Populations
- Chapter 2: Declarative Programming in FRED
- Chapter 3: Agents
- Chapter 4: Conditions and States
- Chapter 5: Variables
- Chapter 6: Factors
- Chapter 7: Expression and Functions
- Chapter 8: Predicates
- Chapter 9: Mixing Groups
- Chapter 10: States and Actions
- Chapter 11: Wait Rules
- Chapter 12: State Transitions
- Chapter 13: Transmission
- Chapter 14: Modularity
For information on compiling and executing FRED programs, please see the FRED Modeling Platform™ documentation.
Modeling with FRED
FRED is not a model. Rather, FRED is a language and a platform for building models. The model comes from you, the FRED user, the modeler. It should be recognized that building a model is a challenging activity requiring a lot of effort on the modeler’s part. FRED makes it easier to define and build a model, by efficiently executing simulation runs of the user’s model, and by providing numerous ways to collect data and to visualize the results of the model. The ultimate quality of the results depends on the success of the modeler in building an appropriate model for the purpose at hand and in communicating the model to FRED for execution. Having said that, we believe that using FRED can save the modeler significant effort by eliminating the need to develop custom simulation software, and that interacting with the FRED user community may also contribute to the user’s successful modeling efforts.
Building a serious model is almost always an iterative process. Working toward building a model with FRED usually includes the following steps:
Decide if FRED is suited to your problem
Create a conceptual model
Create rules for individuals
Create and run a FRED Model
Analyze model output and test against other known data
Revise model and repeat
Hopefully this and our other documentation will inspire you to learn FRED and to build great models.