1 Introduction

Emergency transport for patient, emergency events and urgencies related to health system, and transportation of blood and blood products should be done in minimum time; when the hospital call for Blood Transfusion Organization to demands needing to blood bank, this demands must transfer as soon as possible because any delaying caused to deed the patient in providing the products. Today, an intelligent transportation system (ITS) represents an important component of human life and social conflicts. Health information systems can be created better coordination between health centers and reduce the number of medical errors and also can reduce health care costs and can provide instruments for improving hospitals management system. Intelligent transport systems are systems to support and monitor traffic of roads. Intelligent transportation systems are including topics such as Auto Trail Guide [1], optimization the traffic [2, 3], capacity transport network management [4], Real-time traffic signals control ( [5, 8, 51], and improve the safety of the road. Transportation costs are increasing associated with health emergencies or emergency conditions. In many countries health care budgets is declining and health institutions are under pressure to provide the better services with fewer resources. Health Traffic Management (HTM) in transport networks related to health emergencies are including improved mental system, allocating to variable traffic flows, and reducing the number of places in the traffic congestion as well as having the negative effects [6, 7]. A documented and effective management improves the performance of transportation resources in time and space with real-time intervention. This intelligent method makes it easier for drivers that applied to the vehicle guide system. Due to change the traffic and increase the time of travel according to increase the number of vehicles in the transport network, has been made the most complex health traffic management. So the best path cannot be the shortest path based on the length of the path. Also, the use of distributed smart solution is highly regarded in the reason of the geography situations of paths and possibility of affecting in different views of people. So, the agent-based methods have been modelled the complex systems in which numerous independent units have work together or cooperate with each other [10]. This paper has been used to provide a new multi-agent system to manage traffic that uses by Ant colony optimization for having high adaptation and reduce computing time [11]. In this paper, multi-agent technology could be used and applied for traffic management in emergency conditions in the system of vehicles. The individual specification of multi-agent system have been had the hidden system in architecture in which the system has hierarchical structure and applied by traffic control methods in such a system. That it has been used in the upper and lower level of system. So, the proposed system has been operated by the abilities of both traffic control and hierarchy structure for application in the traffic management systems in the emergency conditions. In addition, it has been performed to integrate and simulate the software of JACK in the development of system. Multi-agent system completely applied the strengths of this software, such as software JACK that it is perfect environment to display the matching plans between agents and software JACK is desirable tool for technical computing and network modeling and simulation. Ant colony optimization algorithm (ACO) stimulated the actual colony of ants when they exit from their nests to find food sources. To complete this task, ants communicated through their pheromone trails as far as possible and ACO algorithms have proven the effective optimization techniques in many real-world applications [9, 14].

Due to the hierarchical structure, many vehicles are created, and distributed by selected input variables in the set of roads. This paper proposes a novel adaptive multi-agent system for road traffic management instigated from swarm intelligence, specifically ant colony behavior which is well known for its good adaptivity and providing a reduction in computation times, used for itinerary evaluations by integrating important contextual factors influencing the route choice. The objective is to increase the quality of the entire road network, especially in case of congestions and jams, taking into account real-time traffic information and travel time of drivers to reach their destinations. The aim of increasing quality traffic and bustle, calculated the travel times and real-time traffic information for vehicles in the area of ​​health is to reach their aims. The paper is organized as follows: Section 2 gives an overview of research and performed work in the field of road traffic management. Then in section 3 explains the model of multi agent real-time road monitoring system that is proposed in this paper. In section, gives the simulations and discussions about the results and finally in section 5, concluded the performed activities and comments and structures for the next research.

2 Literature Review

In recent years, two issues were assigned in the research of traffic safety and traffic management in the emergency conditions: overcasting process and multi-agent systems. In an article of Ducasse, 2010, an updated mobile system has been proposed that maintained the health by electronic data, made ability to read information using overcasting process. In this article, an applied mobile software application enable to receive health information and consider based on Android, drivers and aid workers and review the related images remotely. In the article of Roulym, 2010, a wireless sensor network has been used to automate the data collection process, and the collected Information is transferred through the application of overcasting process to staff in the clinic (health). Another method, proposed by Kofi 2009, has capabilities in the data interaction and services to obtain through a distributed operating system. Multi-agent systems has been used a technology support monitoring, treatment and receive road information [21, 28]. In recent years, researchers have been demonstrated more interest in the use of techniques and methods of artificial intelligence to able to solve complex issues related to traffic systems [17, 37,38,39]. A system has been distributed based on solving techniques that divided the problem of decision making under sub-issues and sole by using independent organizations as called agent. Each agent could be used the different methods, knowledge and resources for processing data tasks. An agent is pointed to an independent organization that can take certain performances to do a set of goals and can compete and cooperate with other agents when they are searched their individual goals. An agent could be performed with a series of features including the ability to exploit the considerable amount of domain knowledge, overcoming the incorrect entry, learning from the decision-making environment in real time and having communicated with others in natural language. Multi –agent methods have been formed in the mid- 90s and have ability to model the complex systems and generally are known when they are seeking to provide solutions to numerous independent units [23, 24, 33,34,35,36, 40, 45]. Table 1 is presented the main features of some doing works in the management of multi-agent road traffic system and basic features related to some works in the field of traffic management based on swarm intelligence. In these systems (multi-agent systems) that they are performed based on the existence agents in the solving problem system allocated to each sub-issues and in this approach, used completely independent agents and factors and divided issues based on the operating characteristics.

Table 1 The performed works based on multi-agent traffic management and ants colonization

Fig. 1 shows the generic architecture of an agent in the developed MAS. Knowledge base modules are implemented with rules base systems and there is no learning of agents (Knowledge update) implemented at this moment. It will be implemented in the future if there is needed of learning of any agent for better performance. Details implementation of decision making module is explained in the proposed methodology section.

Fig. 1
figure 1

architecture of a Multi-agent system [23]

Much of the work has been focused on the simulation and modeling, but some of them installed in real samples. A few works have been used the simulation methods for multi-agent methods for simulation and then have been developed a multi-agent architecture and simulation. Swarm intelligence has been employed very well in modeling the intricacies of traffic and transportation processes [49]. Ants colony optimization (ACO) [20, 46,47,48] have been used well in the solving of transportation problems in particular industries, such as the traveling salesman problem (TSP) and used vehicle routing problem. In addition, during the past two years, moving and operating parameters have been used based on ant behavior for having comparative interact with each other to adapt the dynamic environments. The main limitation of this research is that it is not consider the real-time dynamic information and tries to fix the ant behavior with multi-agent systems as well as multi-agent simulation model to interact with traffic management.

3 Real-Time Multi-Agent Monitoring Model

To model the separate tasks as a smart and intelligence, making the balance each performance and action of ambulance drivers will be possible through the concept of cooperation to obtain a common goal. The multi-agent model approved because it is better individual behavior and partnership than standard conditions [25,26,27, 56, 57].

This proposed model considers that all drivers do not follow the proposed navigation because path network traffic flow is the result of contrast between the behavior of the drivers and efficiency of the network. This means that driver behavior will be affected in the network efficiency.

3.1 Determine the Proposed Specifications for Traffic Management Architecture

Traffic management has been installed based on a series of fixed tools on the main path as follows:

  • Sensor for counting the number of vehicles

  • Cameras for detecting the traffic flow

  • Variable message signs (VMS) that show the road situation

Since the using a traffic management model seems essential; therefore, a satellite navigation system such as the Global Positioning System (GPS) is very convenient to collect location information, vehicle speed and direction at regular intervals. The current advances in these tools of research have been led real-time traffic information to improve decision-making in the selection of road [23, 24, 58,59,60, 63, 64], Hamidi 2011 [29, 30].

Traffic management system has been supposed in the emergency conditions to calculate real-time traffic flow for all vehicles equipped with GPS devices. Traffic control center is responsible for sending and receiving location information of vehicles. When GPS information is not available, particularly in developing countries (such as Iran), we can calculated speed through cellular data networks, such as GSM (global system for mobile communication) [42, 61]; 2012), [29, 31, 43, 44] . GSM system can be provided an approximate size of the average traffic density information that it is obtained by cellphone companies. Every turning on cellphone like an anonymous probe traffic information source is changed into traffic explorer. In fact, a cellphone company can trace the location for its customers. Anonymous analysis of those who have companionship in the roads are faster than a passenger walking in the penetration without taking into consideration the equipment of the person’s mobile in-vehicle or each person holds more than one mobile and this technique is provided the average speed of each vehicle as real time form without new infrastructure. Traffic management system is also required to consider a road guide system (RGS) for interaction the comments between driver and car as well as a geographic information system (GIS) to provide a digital map of the road network. Wireless communications equipment (as radio frequency) can communicate between remote sensors and RGS. These systems can be placed on the dashboard of car or third-generation mobile phones.

3.2 Multi-Agent Architecture to Manage the Transportation in the Emergency Conditions

To implement and evaluate the intelligent control for vehicles, especially in hierarchical system, a technology is available based on multi-agent system by using such a system that justified as follows:

  • To increase the complexity and size of the entire transport network requires distributed intelligence agent and local solutions, and the requirement of solving these issues needs to enter this field of technology based on multi-agent system.

  • Flow of information, optimization and negotiations that occur in the intelligence network, can be integrated and displayed in a multifactorial system very well.

  • Before having the real implementation, the system can be used the multi-agent pre-trial and pre- analyzed system.

In its proposed hierarchical management structure, three species involved in the study: hierarchical organizational architecture of road network based on AGRE (agent - group - role - environment) that provided by [22, 52]. The proposed model is assigned with 3 factors:

  • Agent of emergency condition (ECA)

  • Agent of path supporting (PSA)

  • Intelligent vehicle agent (IVA)

Figure 2 shows the hierarchical multi-agent architecture includes agents and groups as well as communication links between agents. Multi-agent system (MAS) is one of the most exciting and fastest growing domain in agent oriented technology, which deals with modeling of autonomous decision making entities. MAS modeling of a microgrid is one of the best choice to make much intelligent traffic system, where each necessary element is represented by an intelligent autonomous agent. It provides a platform to use combination of artificial intelligence and mathematical tools to decide agents’ optimal actions (Fig.2).

Fig. 2
figure 2

Hierarchical organizational architecture

Then for cooperating between different agents in continued diagram has been shown in Fig. 3 that the sequence of activities is repeated in each intersection to reach the destination (health center).

Fig. 3
figure 3

The sequence diagram between agents

It is necessary to consider the performance of all agents in the same cycle and exchange the messages based on asynchronous communication similarly point to point. According to borders of cycles of activities in each agent is received a duplicate procedure / measure / action that includes its details in [32, 53,54,55].

3.3 Using the ant Colony to Manage Traffic

A proposed measurement agent initiates by primary values especially in the source and destination of driver in its process that includes the searching the best road in each destination.

In point view of multi-agent technology, this method consists of three parallel and distributed processes on the different agents. Vehicle adaptive routing method [64]:

Intelligence Vehicle Agent:

  1. 1-

    Primary Source and Destination Values (for all q road  = 1)

  2. 2-

    Searching the possible destination complex

  3. 3-

    Calculate the road quality

$$ {q}_{i tinerary}^i=\frac{\sum_{k=1}^n{q}_{road\_1}^k}{n} $$
(1)
  1. 4-

    The number of path

  2. 5-

    Calculate the possibility of transfer

$$ {q}_{i tinerary}^i=\frac{{\left({q}_{i tinerary}^i\right)}^{\alpha}{\left(\frac{w_{shortest\_ itinerary}}{w_{i tinerary}^i}\right)}^{\beta}}{\sum_{j=1}^{nb}{\left({q}_{i tinerary}^j\right)}^{\alpha}{\left(\frac{w_{shortest\_ itinerary}}{w_{i tinerary}^j}\right)}^{\beta}} $$
(2)

\( {w}_{i tinerary}^i \): Weight shows the length of travel path.

Nb: the number of possible travel destination

  1. 6-

    Select the best path

  2. 7-

    After intersection, normalized the speed and calculate in the final road:

$$ {\widehat{V}}_{\iota}=\frac{{\overline{V}}_i}{{\overline{V}}_i^{max}} $$
(3)
$$ {\overline{V}}_i=\frac{\mathrm{Length}\;\mathrm{of}\;\mathrm{path}}{\mathrm{Time}} $$
(4)
  1. 8-

    Calculate the strengthen values

$$ {d}_q^j=\frac{{\sum_i\widehat{V}}_{\iota}}{n} $$
(5)
  1. 9-

    Number of Paths

Road monitoring agent:

  1. 10-

    During the period T:

According to receive a lot of massages from intelligence cars, in Fig. 4, is provided a general framework. Control rings are shown in Fig. 4 that occurs frequently during the time. Real-time application data, sent as an input of the simulations based on agent to set simulation results and application parameters. The simulation of various parameters is operating in agent level by drawing the traffic agent parameters based on performance criteria to permit controlling for application these parameters. In the give framework, several simulations performed in parallel Nodal that they are agent-based simulations for modelling the traffic and having to sets of input system for the primary value taking:

  • Real-time data from application

  • Traffic control parameters for simulated agents

Fig. 4
figure 4

Framework for traffic control ring

All simulations are performed at the same time and received the same real-time data that all its necessary information includes to display the current application situation in the simulation. The simulation also receives a traffic control parameter value that it has changes by multiple simulations and it may be repeated the simulations with a same traffic control parameter due to randomness of this simulation. Real-time data is obtained from information transmitted by any agent.

  1. 11-

    Updating the quality of paths:

$$ {q}_{road}^{new}={q}_{road}^{old}+\gamma \left({\widehat{d}}_q-{q}_{road}^{old}\right) $$
(6)

\( {q}_{road}^{old} \): Previous Road Quality

\( \widehat{d_q} \): The average of received values d q in time T

γϵ[0, 1]: Important factor for quality changes

Emergency Conditions Agent:

  1. 12-

    During the time T, all qualities of path is updated through the network.

According to the proposed algorithm, the used searching techniques for the collection of paths are as follows:

  • In the existing intersection, the shortest path from each intersection is searched up to destination along the path.

  • To delete the short paths that again revert to the current intersection.

It is important to consider the quality of traffic for providing the normal average speed of vehicles. This value is between 0 (high-density traffic) and 1 (for free flow) and remained as the value of quantity of pheromones by moving a large number of ants in one path. After a period of time the quality of traffic path calculated and updated according to vehicles travel time that passed this way.

The classic ant colony algorithm with the possibility of transmission \( {\mathrm{P}}_{\mathrm{i}\mathrm{tinerary}}^{\mathrm{i}} \) has been calculated for each possible path and related to the quality and length of the path. That α , β ∈ [0, 1] they are presented according to the relative importance of the quality and length of the path. An effective balance between the both quality and length of the path can improve traffic flow. The possibility of transmission is calculated based on traffic quality and length of path. For updating the quality of traffic path\( {q}_{\mathrm{road}}^{\mathrm{new}} \), and improvement of the dq values, it is calculated based on the last movement times of vehicles and γ ∈ [0, 1] that it is related to the importance of changes and can be disrupted the impact of rapid or slow movement of vehicles that it is determined by different paths.

4 Multi-Agent Simulation

Simulating software and agent interactions (JACK): multi-agent system architecture shows in Fig. 2 that all its agents have been made ​​in the JACK software (Fig. 5a). The software is called as agent development environment that is fully integrated with and written by Java programming language. JACK software is provided an environment to facilitate the send / receive messages between agents. MATLAB functions is possible to implement more decision modules; this module is supported the functions of constructed agents in the JACK software. Simulink is used for modeling the transport network and the needed functions for calculating the power flow. In JACK software, Java application program interface is used MATLAB to interact with MATLAB that the existence agents in JACK functions can be accessed through this interface, for example, could have access to functions in MATLAB.

Fig. 5
figure 5

a The development environment for JACK software, b agent management reference model [51]

As shown in Fig. 5b, JACK platform provides a set of functions and classes to implement agent functionality, such as agent management service, directory facilitator and message passing services. Agent management service (AMS) is responsible for managing the agent platform, which maintains a directory of Agent Identifiers and agent states. Directory facilitator provides the default yellow page services in the platform which allows the agents to discover the other agents in the network based on the services they wish to offer or to obtain. Finally, the message transport service that is responsible for delivering messages between agents, provides services for message transportation in the agent system.

Agents are used JACK software is modelled based on the theoretical belief desire intention (BDI) model in artificial intelligence modeling that in this environment, any agent of JACK software is called as a component that can be activated a argument behavior by stimuli (guided by the target) and a reaction (Event-based). JACK agent language identified five main levels as key components as follows:

  • Agent: The main existed arguments of JACK are modelled.

  • Event: To model events and massages that should be able to show reactions to them.

  • Project: To model the descriptions of the practical process for facing the certain events: able to have collation the projects of each agent with functions.

  • Ability: To collect the operational components (Events, Maps, belief collections and other capabilities) to use agents.

  • Believe collection: To model the knowledge about the world of agents.

The simulated network has 18 one -way street with 2 lines and 43 two -way street that 5 of them have one line and the rest of them have 2 lines as well as equipped to 31 intersections with traffic lights. Each path is limited by the maximum amount of speed. The authorized speed is 20 m/s for some streets at the center of the network (on-net) and the rest of streets are 35 m/s with relatively considered street. In the simulation of traffic lights have proven time for green color and will change its color every 30 s.

Vehicle path guidance algorithm is performed by α =1, β = 1and γ = 1. It means that we have the same importance for the quality and length of the path as we considered in the above. We have been used the standard normal distribution (Gaussian) with mean zero and standard deviation [32].

$$ \mathrm{F}(x)=\frac{1}{\sigma \sqrt{2\pi}} e-\frac{{\left( x- n\right)}^2}{2{\sigma}^2} $$
(7)

The amount of variance σ is increased at peak times, to added more vehicles to network at this time. Simulation series have been performed with different levels of different travel demand, origin and various destinations, to reach the destinations in various times based on crowded locations and textual information. The proposed possibility methods have been compared with results of static method that it is based on the length of path by using Digester Algorithm [19] for predicting the time of each path from linear models with different coefficient, for example the simple functions, to reach the destination and use the proposed discovered methods. About 30,000 cars has randomly been added to the network of path during the day (24 h) and the crowded times are presented for a typical day (three times at the same day that is shown in the Fig. 6). Continuously, in the first part, the results of the first phase of the selection of path are provided based traffic management. In order to make the validation, all curves of results have been shown the average results of five simulations in which the different origin -destination matrix is used based on the standard normal distribution.

Fig. 6
figure 6

The number of cars and vehicles on the road network during the day when monitoring traffic time

According to the quality of the transportation in the road and path network with normal and suddenly changing and altering, Fig. 7 shows the benefits and advantages of proposed method based on ants behavior that has been utilized through selected discovered strategy for raising the average speed in all patches during 24 h towards comparing the proposed method with possibility selected strategy and forecasting methods during the time of travel as well as the shortest path method.

Fig. 7
figure 7

The changes of quality transportation system during a day

Figure 6 shows the number of vehicles that have reached their destination faster than other vehicles in comparing with other methods. The simulations have been assumed that all drivers have confirmed the proposed path by the IVA (Intelligent Vehicle Agents).

In order to test the effectiveness of the proposed method and reaction conditions to slow down the crowded time, the simulations have been created with three crowded and traffic times (morning, lunch time and evening) and increased the number of cars in the third crowded time.

Calculated intervals equal to the length of each path has been shown in Fig. 7 that is confirmed the procedure to improve the proposed ants’ methods in average speed and travel time compared with the static method at an equal distance. Especially in the selection method, the possible selection of travel path is considered and counted to real-time traffic and quality of transportation in the personal travel proposed without reducing the time of travel including vehicles` distribution in different paths. Sometimes the possible selected methods have the same results simulated the discovered sample but in the crowded time, this method is proposed the best transportation path to avoid the traffic. These simulations are confirmed that the possible selection is better than discovered selection methods due to the high cZompliance form.

As regards to the quality of traffic flow in the road network with normal random variation, Fig. 7 shows the advantage of the proposed ant behavior method using the heuristic selection strategy, in the raise of the average speed in the entire road network during 24 h, compared to the proposed method using the probabilistic selection strategy, to the predicted itinerary travel time method, and to the shortest path method.

Fig. 7 illustrates that a highest number of vehicles reached their destinations early, compared to the other methods. These simulations suppose that all drivers accept the proposed itinerary given by the Intelligent Vehicle Agent. In order to test the efficiency of the proposed method and its reactivity to minimize jam situations, simulations were made including 3 rush (peak) hours traffic congestion (morning, lunch time, evening). The number of cars was increased in these three rush hours’ time period in nearest roads in order to simulate the travel from/to home/industrial area. Fig. 7 bears out the adaptively of the entire network in terms of road traffic quality and number of circulating vehicles, when injecting a high number of vehicles, in the same area, which have different origin–destinations.

The results of these simulations in this section include 6 effective external factors that are described above (All work information in the path, the maximum speed on the road, the familiarity of driver with the paths, typical driving speed, receiving time to destination and weather information). According to achieved results, 42% of proposed paths have been changes in comparing with presented paths by Ants Colony Algorithm. This term is includes 3.4% improvement of average speed for cars in road network that it has been used the same and equal complexes with occurred typical distribution in guiding the cars to roads. The results of the effectiveness of selected textual factor importance are confirmed in an improved traffic management system. Figure 8 shows the comparison of the curve in path manual based on Ant algorithm. Similarly, all the drivers have confirmed the previous simulations with suggested Intelligence Vehicle Agent system.

Fig. 8
figure 8

Changes the average speed on the road network during the crowded traffic time

As shown in Fig. 9, first, we wants to solve the traffic problems after 5 steps while second, only the second step is needed. The cause of the differences described below that in the first case, cars are used real time traffic control data and send information by each agent. At this result, cars will be schedule to have uncrowded traffic road. In the next case, it is assumed that only some cars are used the real-time traffic data, then the results of possibility is decreased by rescheduling program during the new crowded period. First, there is not crowded and heavy traffic time, so blue curves shows the traffic time in Fig. 9 at the left side.

Fig. 9
figure 9

The centralized traffic control between network and vehicles: a Total momentary traffic, b Comparison of schedule program with a capacity of directions in the network, c Total momentary traffic density and traffic in each repeated step and d Comparison of the schedule program at each step with a capacity of directions in the network

5 Discussion

Multi-agent system is usually used to model distributed complex real-world problems. An approach to cope with large scale complex system is to organize agents and decompose the problem in some smaller sub-problems. This section draws comparison of the proposed method with the reactive dynamic route guidance strategy proposed by Fernandes et al. [23]. This paper was selected since it adopts a decentralized structure for routing strategy. The Fernandes et al. [23] method was applied to the same example of road network and using the same lists of Origin–Destination-Time. Table 2 details the normalized average speed during the day using each approach. The average speed increases about 8% using the proposed method in comparison to the Fernandes et al. [23] method. Table 2 also shows the variation of the percentage of drivers accepting the proposed itinerary given by the Intelligent Vehicle Agent (IVA). The remaining drivers select randomly one of the 3 shortest itineraries. The results confirm that when all drivers use the proposed route guidance system, the average speed in the entire road network is better.

Table 2 Normalized average speed of cars during 24 h

6 Conclusion

Road traffic management consists on improving the traffic fluency on road networks, assigning dynamically the traffic flows, and reducing the number of traffic congestions states as well as their negative effects, i.e. blocking the emergency vehicles, delays, waiting time, drivers’ stress of emergency vehicles, air and noise pollution. The proposed algorithm consists in improving the traffic flow, i.e. the road network can support more vehicles without decreasing the average speed of vehicles, while taking into account the real-time road traffic information; and on the other hand, in reducing the number of traffic congestion situations by avoiding the massive use of the same road at the same time (i.e. providing the suggestion of itineraries with a lower travel times). This allows adjusting intelligently and promptly the road traffic in the network according to the real-time changes. This paper proposes a multi-agent system for path traffic management from swarm intelligence. The objective is to increase the quality of the entire path network, especially in case of congestions and jams, taking into account real-time traffic information and travel time of drivers to reach their destinations. In this method, a hierarchical multi-agent architecture is grouped by cars and vehicles in the road according to geographical distribution of health center. In other works, comparative traffic lights are taken into consideration with green and red variable schedule program to improve the management of road network.

Further work includes exploring different time frames for implementing simulations with a real-time application. Time frames include how long, or how far into the future, a simulation should run, and how such effectiveness can be evaluated. For example, a simulation running too short may not capture important behavior, but a simulation running too long may quickly diverge from observed behavior and no longer be useful. Time frame exploration can also explore the interval between simulation executions, and the trade-off between the interval between simulations, and the length of the simulation.