AWS HPC Blog
Unpacking the power of agent-based models for environmental and socio-economic impact
This post was contributed by Namid Stillman, Quantitative Researcher at Simudyne, and Sam Bydlon and Ilan Gleiser from the Global Impact Computing team at AWS.
Agent-based modeling (ABM) is a powerful computational modeling approach that centers on the simulation of interactions between autonomous agents to understand the behavior of the broader system and its governing principles. Agent-based simulation can be traced back all the way to the mid-20th century and John von Neumann’s universal constructor, but due to the large computational requirements of running agent-based simulations widespread development and application did not come until the 1990s.
Since then, ABMs have evolved and gained prominence in helping us model and understand complex systems by representing the behaviors and interactions between agents. With the emergence of cloud technology, in particular high-performance computing services on AWS, agent-based simulation is poised to enter a new era of scale and accessibility. By developing simulations that mimic systems such as economies and scaling the number of agents to be comparable to reality, we can explore hypothetical scenarios that would not be possible, or might be too risky, to test in the real world.
With the drop in computing costs and the democratization of HPC on AWS, ABMs have become a significant tool for analyzing the complexities of the environmental and socio-economic impacts of our decisions. By simulating interactions between individual ‘agents’, like households, governments, firms, trees, and vehicles, for example, ABMs can grant a deeper insight into effects of economic policy decisions, changes to supply chains, urban plastics flow, and climate risks, among others.
In this post, we’ll help you understand agent-based models and their potential to impact the environment and socio-economic systems. We’ll explore a few use cases of ABMs and show how they can improve our comprehension of environmental and social decision making.
Economic Policy Simulation
Economic policy simulation is a crucial application of ABMs for understanding the complex dynamics of social and economic systems. ABMs provide a unique approach to modeling the interactions between individuals and institutions within an economy, allowing for a more realistic representation of economic behaviors and policy outcomes.
In stark contrast to traditional methods of economic modeling, ABMs revolutionize the way we analyze and model economic scenarios. Unlike classical approaches that analyze macroeconomic trends and assume the homogeneity of individuals, ABMs are built as bottom-up models that capture the intricate heterogeneity and complexity of human decision-making processes. This approach enables businesses, policymakers, and economists to simulate a broad range of economic models and analyze their potential impacts, giving them an edge over classical economic methods. ABMs are also useful for evaluating the outcomes of different policy interventions and projecting probable future scenarios, thereby improving policymaking in many domains.
One area where ABMs have been particularly valuable is in the study of macroeconomic policy, which we described in a previous post. ABMs can simulate the effects of fiscal and monetary policy – like changes in tax rates, government spending, or interest rates – on key economic variables like income distribution, inflation, and GDP growth. This allows policymakers to simulate the potential impacts of policy changes before implementing them in the real world, making for more informed decisions. For instance, policy makers can study the impact of introducing a universal basic income on the distribution of wealth among agents in an economy.
ABMs can also capture the dynamics of financial markets and banking systems, providing insights into the effects of regulatory policies on financial stability and systemic risk. By simulating the interactions between banks, investors, and borrowers, ABMs can shed light on the transmission channels through which shocks (like climate events) propagate within the financial system, helping policymakers design more robust regulatory frameworks.
As the science of economic agent-based modeling advances, incorporating reinforcement learning (RL) agents into simulations is becoming increasingly popular because the technique allows agents to learn from experience and make better decisions. In an RL framework, agents initially operate by trial and error but are rewarded or punished based on their actions. This means the agents learn to make optimal decisions under uncertain conditions, mimicking the way humans learn. Incorporating reinforcement learning into agent-based simulations can enhance the predictive power of the simulations through these feedback loops, where agents can learn and adjust their behavior based on past outcomes and their own mistakes. With each iteration, agents become more adept at predicting future outcomes and choosing the best course of action to achieve their goals.
The scalability and computational power of cloud computing platforms like AWS have made it possible to build ABM simulations for economic policy research. AWS HPC services – AWS Batch and AWS ParallelCluster – allow researchers to run complex and computationally-intensive ABMs. This means researchers can simulate populations with millions of individuals and firms, where individuals can have differences in preferences, access to information and learning rates. They can also leverage these services to more efficiently explore a broader range of policy scenarios, conduct sensitivity analysis, and perform parameter calibration. Since they can distribute simulations across multiple virtual machines, researchers can reduce the time required for running simulations, accelerating the research process and enabling faster policy evaluation.
Supply-Chain Decarbonization
Supply-chain decarbonization is a critical aspect of sustainability efforts of businesses and policymakers who are aiming to reduce the greenhouse gas emissions associated with the production, transportation, and distribution of goods and services. The transition to a low-carbon economy requires significant changes in supply-chain operations and practices. In fact, many firms and governments are aiming for net-zero carbon emissions by 2040, so ABMs can play a crucial role supporting these firms to accurately model and optimize their supply chains and perhaps even achieving those targets sooner.
ABMs enable businesses and policymakers to simulate the complex interactions between the various actors within a supply chain: manufacturers, suppliers, logistics providers, and consumers. By modeling the behavior and decision-making processes of these actors, ABMs can help identify opportunities and strategies for decarbonizing supply chains while minimizing disruptions and maximizing economic efficiency.
One of the key benefits of ABMs for supply-chain decarbonization is their ability to capture the heterogeneity and dynamics of real-world supply chains. Each agent in a supply chain has different characteristics, capabilities, and goals, and ABMs can represent this diversity. This lets companies analyze the impact of different agents’ behaviors and decision-making processes on the overall carbon footprint of the supply chain. For example, Amazon can model their entire supply chain so that every facility (like inbound cross-docking facilities, or fulfillment centers) are modelled as agents. Each facility agent will have its own unique parameters – just like in the real world. Millions, or billions of products are then tracked moving through the supply chain. Various scenarios and policy changes that are aimed at reducing costs or carbon footprint can be simulated safely to identify the policies that meet the desired targets without sacrificing key business metrics, like on time delivery.
For example, ABMs can simulate the effects of adopting more sustainable manufacturing processes or using renewable energy sources in transportation. By modeling the interactions between manufacturers, suppliers, and logistics providers, supply chain optimization teams can use their supply chain simulator to identify potential bottlenecks, trade-offs, and synergies that arise from different decarbonization strategies.
ABMs can also capture the influence of external factors on supply-chain decarbonization, like government tax policies, consumer preferences, and technological advancements. They can simulate the impact of policy interventions, too – such as carbon pricing, or subsidies for renewable energy – on supply-chain emissions. By incorporating these factors into the simulation, ABMs can provide valuable insights into the potential effectiveness and unintended consequences of different policy options.
To effectively run large scale ABM simulations for supply-chain decarbonization, HPC capabilities, such as those provided by AWS, are essential. The vast scale and intricacy of supply chains necessitate the use of large-scale simulations, which enable researchers to analyze data at various levels of granularity, ranging from individual warehouses up to the national and even international distribution networks. This allows for a more comprehensive evaluation of different decarbonization strategies, identifying those that are most effective and practical in different contexts. At the national and international level, the use of HPC on AWS is essential for providing the necessary scale of compute power to integrate these granular details and achieve accurate and actionable insights. These technologies are empowering supply chain optimization teams to make critical advances towards more sustainable and resilient supply chains that benefit society, and the planet, too.
“Overall, ABMs along with HPC is a novel approach to solving supply chain related problems and to decarbonize the supply chain by optimizing it.”
Siva Veluchamy, Sr. Simulation Scientist, Amazon World-Wide Design Engineering
Plastic Flow Simulations
Plastic flow simulations are an important tool in understanding the movement and distribution of plastic waste in the environment. According to the UN, “every year 19-23 million tonnes of plastic waste leaks into aquatic ecosystems, polluting lakes, rivers and seas“. There is increasing concern about plastic pollution with 175 countries agreeing to implement legally binding guidelines by 2024. Given this, and plastic’s impact on ecosystems and human health, it’s crucial to develop strategies and policies that effectively manage and reduce plastic waste.
ABMs offer a unique approach to simulating plastic flow by modeling the behavior and interactions of various agents involved in the plastic lifecycle. These agents can include manufacturers, consumers, waste management facilities, and natural processes like weather patterns and ocean currents.
According to researchers at Purdue University and the National University of Singapore, one of the key benefits of ABMs for plastic flow simulations is their ability to capture the complex and dynamic nature of plastic waste movement. Plastic waste can travel through multiple pathways, like rivers, wind, and ocean currents, and can accumulate in place like beaches, riversides, or ocean gyres. ABMs can simulate these movement patterns and help identify areas of high plastic concentration, letting policymakers target their efforts for maximum impact.
As Purdue researchers have shown, using data from the American Chemistry Council and the National Association for PET Container Resources, ABMs can also simulate the behavior of different actors within the plastic supply chain and waste management system. This includes modeling consumer behavior, like plastic consumption patterns and recycling habits, and the operations of waste management facilities and their capacity to handle plastic waste. By incorporating these factors into the simulation, ABMs can provide insights into the effectiveness of different interventions, such as implementing recycling programs or reducing single-use plastic consumption.
Green Urban Planning Simulation
The Green Urban Scenarios simulator (GUS), powered by AWS HPC, is a digital twin of a city that can be used to run environmental scenarios. The GUS simulator was launched by Lucid Minds, a start-up company from Germany, and uses agent-based modeling on top of a digital twin of proposed green urban projects, such as tree planting and maintenance in a city, to understand the effects of a project before it is implemented. The simulators allows urban planners to explore potential impacts of proposed projects, including the amount of carbon sequestered, or the quantity of pollution that might be removed from the local environment, or the ability of tree planting to retain water and mitigate the impacts of storms.
Circular Economy Simulations
A circular economy is a system where the goal is to minimize waste and pollution by keeping materials in use for as long as possible. This involves a shift away from the traditional linear economic model of “take, make, use, and dispose” and towards a more circular approach. As outlined by the University of Cambridge Judge Business School, the goal of a circular economy “is to put back into the system everything relating to production, distribution and consumption, in order to extract as much value as possible from the resources and materials we utilize.”
Circular economy simulations are a critical tool in understanding the potential impact of circular economy strategies on social and environmental systems. Using ABMs, businesses and policymakers can analyze the effects of different circular economy strategies on the overall sustainability of a system.
ABMs let organizations model the interactions between various actors and factors involved in circular economy initiatives, like businesses, consumers, waste management systems, and policymakers. By simulating the behavior and decision-making processes of these actors, ABMs can help evaluate the effectiveness of different circular economy strategies in reducing resource consumption, minimizing waste generation, and promoting sustainable economic growth. This allows researchers to explore a wider range of circular economy scenarios, evaluate different strategies, and identify the most effective interventions for transitioning to a sustainable and regenerative economic system.
“Agent Based Modeling (ABM) has been instrumental in several circular economy analysis projects at NREL. It has helped us to identify the potential barriers and enablers to increasing the circularity of renewable energy technologies, such as wind turbines and photovoltaic panels.”
Julien Walzberg, Ph.D., Researcher, National Renewable Energy Laboratory
Simulating climate risk scenarios
As the world experiences increasingly severe and frequent climate events, all businesses will be affected to some degree. Simulations provide a powerful tool for decision makers to evaluate the range of possible scenarios they may face and prepare accordingly. More importantly, simulations give insights into the cost of inaction, like failing to invest in supply chain resilience or promoting recycling schemes. Agent-based models extend the impact of simulations to human-dependent systems like logistic networks, waste management facilities, or even entire economies.
Simudyne, a provider of simulation technologies, is a company leading the way in this space. They have developed a platform and software development kit (SDK) that uses patented graph-based computing to allow businesses to simulate different aspects of their operations using ABMs. These models range from national supply chains to firm-specific exposure to national climate shocks. Simulations of the supply chain are designed to account for various factors like different suppliers, transportation routes, and inventory levels. This granular view provides a comprehensive understanding of how different sections of the network are affected by extreme weather events and can be used to identify steps towards decarbonisation in line with net zero goals.
Alternatively, Simudyne can model shocks at the scale of an entire economy, the kind caused by events like flooding or heatwaves. They can also account for government incentive schemes that reward early adopters in green innovation to develop new production processes and technologies with the explicit aim of reducing environmental risks. These models give insights into key vulnerabilities at the scale of the sector or an individual firm and options for offsetting these risks. This provides a valuable tool for business leaders and policy makers alike.
By simulating climate risk events with ABMs, companies like Deloitte can make better-informed decisions on every aspect of their business, quickly assess the financial consequences of a risk scenario, and respond in a more coordinated and efficient manner. This means that companies can develop contingency plans for managing unexpected climate events rather than be caught off guard.
“Agent-based modelling gives us a clear view of the interplay between climate change and our economies. It’s a tool that sharpens our understanding, helping us pinpoint inefficiencies in supply chains, reduce costs, and cut carbon emissions. With it, we can make better decisions for a safer world.”
Justin Lyon, CEO, Simudyne
Leveraging the Simudyne SDK with AWS HPC services
Developing agent-based models can be difficult both in terms of model construction and deployment. The Simudyne SDK is a Java-based simulation engine that makes model development easy and accessible, meaning businesses can spend more time understanding the results rather than developing them. Importantly, the Simudyne SDK leverages patented graph-computation to efficiently scale ABMs from tens to millions of agents. This allows for huge and complex systems to be modelled and forecast, such as simulating three weeks of nationwide supply chains with hundreds of millions of products flowing through the supply chain every week at the resolution of a single item in less than an hour.
One of the central benefits of the Simudyne SDK is its flexibility. The SDK can be used to simulate supply chains, customer networks, fast moving consumer goods, or even entire economies. However, not all simulations are alike and identifying the right computational architecture depends on understanding the specifics to each model. The number of agents in the simulation, the type of data that is passed between agents, the size or amount of data being passed, how the simulation is used by other processes such as ML workflows, and how both input and output data is accessed, are all factors that impact compute requirements. For now, let’s go through some of these considerations in turn.
One of biggest considerations when building agent-based models is understanding how many agents will be in the simulation and how they interact. This relates to the agent interaction network, the communication framework for messages to be passed between agents. Some interaction networks can be very simple, such as financial exchanges which have a `star-like’ interaction network (all agents link to the market and not to each other) or they can be very complex, like a social network, where links between agents are dynamic, changing over time. The Simudyne SDK’s graph-based computational approach efficiently simulates millions of agents, allowing users to easily simulate real-world systems.
Just as critical as the number of agents in the simulations is the type of data that passes between them. The Simudyne SDK uses a message passing framework to distribute information across the simulations. The size of the messages drives the amount of memory needed to run the simulations. Whether there are several million agents passing a small amount of data or tens of agents passing large volumes, memory consideration is key to enabling efficient scaling of the simulation. AWS supports high-performance high-memory computing resources. When deciding on which EC2 instances to use, it is critical that there is sufficient memory for each instance. Simulation profiling and benchmarking can help determine the amount of memory required.
A simulation is only as useful as how it is used. Some simulations, like models of an entire economy, are standalone. They can be used for economic forecasting, highlighting the impact of shocks to the economy such as rising inflation. Other simulations, like supply chain models, can be used to chart the best course of action. By running multiple simulations with different supply chain structures (for example, choosing many small distributors or a few large ones), strategies can be compared, and an optimal structure can be identified. Optimization modules can find optimal strategies in an efficient way.
When deciding on how to structure a simulation pipeline, it’s imperative that the data fed into the simulation is well described and understood. Related considerations include the format, frequency and mechanism by which data is passed to the simulation. For example, is the data a static source that is kept in an Amazon S3 bucket? Or is it continually updated, using real-time data streaming from Amazon Kinesis?
Similarly, the output of the data must be properly structured to fit into other downstream tasks. If the data is required for reports, then a simple CSV or text file might suffice. More complex data pipelines might require parquet or H5 files which can be easily read by other code sources, such as in Python or C/C++ scripts.
Conclusion
With the rise of HPC on AWS, agent-based modeling has become an even more powerful tool for understanding complex systems and their impact on our environment and society. The ability to simulate the behaviors and interactions of individual agents has led to deeper insights into the effects of economic policy decisions, urban plastics flow, and climate risks. ABMs have democratized the process of analyzing environmental and socio-economic impacts, making it easier and more affordable to understand the complex interactions that drive our world. AWS’ HPC services and wide selection of instance types make it an excellent tool to harness the power of ABMs and help us make better decisions for the future.
Looking to learn more about how to use Simudyne’s SDK and AWS HPC resources to solve your current and future business problems? Simudyne has a team of expert simulation engineers ready to help. Reach out today to find out more. For an evaluation of your ABM simulation workloads, please reach out to the AWS Global Impact Computing Team and we will schedule a discovery session with you.