## 1 Introduction  
Swarm robotics is an area of robotics that offers efficient solutions to complex real-world problems with minimal cost. One of the most popular swarm robotics tasks is swarm foraging, where swarms can be modeled for different foraging tasks, such as intrusion detection, search and rescue, the collection of hazardous materials, agricultural harvesting, and space exploration [1]. In swarm foraging, the robots collaboratively explore an environment and collect resources for transfer to a collection zone. This task was inspired by adaptive behavior observed in nature, as in insect colonies or bacteria. Foraging using a swarm of simple robots is important for improving performance while efficiently distributing the workload with a low cost [2]. It achieves effective task allocation by interacting with the environment to collaboratively perform complex tasks that are beyond the capability of one robot [3]. The robots should perform dynamic task allocation (DTA) to autonomously determine the search region. DTA partitions the robots into subgroups so that they can collaborate and perform the task together as quickly as possible. Despite recent advances in swarm robotics, this field is not yet mature, and challenges remain, as is evident from a recent literature review [4; 5]. In this paper, we focus on two main issues: modeling and DTA. In regard to modeling, swarm foraging has not matured, due mainly to the absence of generic robots and a universal methodology that can model tasks and be used in many, if not all, applications [4]. There is a need for standardization and simplification, and it is important to propose an adaptable approach that is applicable to real-life problems and can be performed by simple robots that require minimal sensors and controllers. Scalability is a significant challenge in this task because increasing the number of robots can increase the number of inter-robot collisions, while increasing the search area would increase the travel cost. Thus, new scalable and consistent approaches are needed for swarm foraging. In addition, DTA is another issue that relates to the strategy of dynamically assigning robots to different subtasks to solve the main complex task [6; 7]. In foraging, robots have limited communication and sensing ranges, which increases the difficulty of DTA. In recent robotics literature, DTA problems have gained a significant amount of attention [3; 8], yet DTA in swarm foraging is still an open research area [9]. Although some work has been conducted on foraging with deadlines, the solutions are still limited [10]. Few studies have analyzed how DTA in swarm foraging fits real-time tasks that must be executed before a deadline. Moreover, currently, DTA methods for dynamic deadlines in swarm foraging do not fully exist, to the authors' knowledge. Ultimately, to date, there appears to have been limited investigations of swarm foraging for multiple targets including practical aspects of implementation, such as dynamic deadlines [11]. In real life, however, resources have a limited time frame, and this frame can change due to different parameters and the effects of the environment. Thus, a complex scenario with dynamic deadlines is one aspect that needs to be considered in swarm foraging. A formal mathematical model should be proposed, and its DTA should be tested with different aspects of the environment. Therefore, this paper contributes to the literature on swarm foraging as follows:  
First, a new epidemiology-based approach is proposed for swarm foraging with online deadlines, called epidemiological foraging with dynamic deadlines (ED_Foraging). In ED_Foraging, a new mathematical model called the dynamic deadline model (DD_Model) is developed for this approach, inspired by the susceptible-exposed-infected-recovered-dead (SEIRD) model [12; 13], to predict the expiry rate of resources depending on the information collected by each robot.