1 Introduction

Rapid progress in information technology is being leveraged by businesses and industries to digitize their operations, products and services. Healthcare operations and services are also benefiting from this rapid change [1]. Healthcare information systems enable demographic identities, clinical operations such as appointments, admissions and discharge, and medical professional services such as diagnostics, procedures, pharmacy, and vaccinations. They provide critical real-time support to providers for managing chronic diseases such as diabetes and cancer and pandemics like COVID-19 [2, 3]. The primary goal of effective healthcare is the correct diagnosis, timely monitoring and management of disease stages (prognosis), and prevention of diseases. Good medical care, whether during hospitalization or at home, rely on tracking several physiological indicators, for instance, heart rate, blood sugar, blood calcium, height, and weight among several others. Timely access to numerous indicators and data from multiple sources helps healthcare professionals understand and manage their patient’s health with precision. Healthcare data is typically transmitted to cloud servers from local healthcare infrastructures for processing and storage. Healthcare staff can access and use the data in the cloud simply by using a good internet connection. Cloud computing appears to be a reliable data processing backbone that can be used for healthcare information infrastructure [4,5,6]. Indeed, it offers impressive computing and storage power [4, 6, 7]. However, cloud computing is not yet a reliable solution for critical and real-time applications in the healthcare system because of its inherent limitations of the network architecture such as dependency, bandwidth and unpredictable response time [8,9,10,11,12]. Recently, encryption and Blockchain-based methods are proposed to enhance the security and reliability in healthcare systems [13, 14]. Optimization issues and appropriate site selection is common real-world problems [15, 16].

On one hand, traditional centralized cloud infrastructure is facing significant power/energy consumption and virtual machine (VM) migration issues [17, 18]. On the other hand, it is also not a trustworthy solution for real-time healthcare applications with a poor response time [19,20,21]. The fog computing paradigm can overcome such shortcomings in traditional clouds and provide quality services at critical physical locations (such as the edge) of the network. Including a fog node in cloud computing infrastructure is an extension of distributed computing which constitutes a backbone of most modern critical information processing and exchange activities like in healthcare services. Fog cloud is a local cloud computing infrastructure which is made up of partially delegated - otherwise traditional - cloud responsibilities at local facilities with an intention to satisfy the critical demands in healthcare [4, 22, 23]. Healthcare data is not only abundant in volume but also diverse in modalities which opens up new avenues for existing and upcoming technologies to be leveraged such as Big Data, Fog computing, Edge computing, 5th Generation and beyond communication, and the Internet of Things (IoT) [5, 24], etc. These technologies offer a range of functionalities such as larger computing power, storage, and communication capacities to peripheral devices to improve the quality of service in a real network environment. Thus, Fog computing lends itself better to latency-sensitive or real-time applications [25] such as healthcare. In addition, fog computing uses intermediate nodes such as gateways to provide services with short latency and response time, and efficient energy consumption [6, 26, 27]. Recent studies show that the most difficult constraints to take into account in medical applications are response time and latency in energy/power optimization problems [28, 29]. Therefore, Fog computing-enabled infrastructure has the potential to perform delay-sensitive computing with reduced power consumption and improvements in traffic congestion [20, 27, 30].

The limited life of the battery is a significant problem that IoT nodes may suffer during communication. At the same time, the exhaustion of the battery of an IoT/sensor in healthcare can lead to loss of data with serious consequences for the patient. To this end, extending the battery life of these IoT nodes can be considered an important priority in IoT networks applied to healthcare. In this paper, a Fog node is introduced in the Internet of Things healthcare (IoH) infrastructure to automate several critical healthcare services. The data traffic generated in the power-aware IoH can be routed directly to installed gateways or indirectly through access points (AP) as shown in Fig. 1. The IoH network is composed of three nodes: (1) IoH traffic as virtual machines (VMs), (2) gateways with reduced computing resources (GR), and (3) gateways with extended computing resources (GE). The goal of introducing gateways with different computing resources is to: (1) plan different sizes of network clusters, (2) minimize power consumption, and (3) minimize the hardware cost.

Fig. 1
figure 1

Fog-supported IoT-enabled healthcare infrastructure

1.1 Contributions

This paper proposes a power-aware fog-supported mathematical formulation for IoH. The optimization problem is formulated as an integer programming problem for healthcare applications and it has been solved using two swarm intelligence-based algorithms. The main contributions of this paper are as follows:

  1. 1.

    Mathematical formulation with binary decision variables.

  2. 2.

    Encoding binary representation to non-binary integer representation.

  3. 3.

    The ”insert”, ”swap”, and ”interchange” local search methods are used for experimenting with the Discrete fireworks algorithm (DFWA) and Discrete artificial bee colony (ABC).

  4. 4.

    A repair algorithm is used to fix the out-of-bounds candidate solutions.

  5. 5.

    Statistical test is used to analyze the performance of the algorithms.

The remaining part of the article is organized as follows: related work is presented in Section 2, and a system model and a mathematical formulation are presented in Section 3. Brief descriptions of swarm intelligence-based algorithms and encoding for the formulated problem to operate with swarm intelligence-based algorithms are presented in Section 4. Section 5 will present a discussion of the experiment and its results. Last Section 6 is the conclusion of this work.

2 Related work

Multiple dimensions of power/energy consumption in IoT networks are the significant focus of recent research. In [31], an architecture with Bluetooth Low Energy (BLE), for IoT networks, is proposed by using ultra-low power and hybrid topology. The IoT network operation with BLE intends to avoid power wastage in real-time communication. While [32] investigates a dynamic model for the energy demands of exponentially growing IoT networks that enables the efficient management of power resources in a sustainable energy ecosystem. Two user-scheduling algorithms were adopted: (1) minimum distance scheduling (MDS), and (2) maximum channel gain scheduling (MCS). Improved network efficiency is observed when these algorithms were used alongside a power optimization. For a similar goal, a power control strategy is investigated for a Massive MIMO-enabled IoT system in [33]. The objective is to increase total throughput and better-differentiated levels of service in IoT networks. A closed-form SINR of Massive MIMO was used with the Lagrange multiplier to find the optimum power control coefficients for several scenarios. Authors in [34] investigate integrating re-configurable intelligent surface (RIS) on minimizing the average sum age of information (AoI) in uplink non-orthogonal multiple access-based IoT networks. An optimization problem is formulated to optimize the RIS configuration, the transmit power per IoT device and the clustering policy of IoT devices. The formulated problem is a mixed-integer non-convex problem, which is solved by adopting a semi-definite relaxation (SDR) approach with better results.

The digital healthcare system is deploying data-intensive applications (machine learning) for the prediction of the health status of patients where usually IoTs are the main source of real-time data [35]. Emerging IoT applications commonly face energy and power-related challenges in path discovery [36] and cluster formation [37], but healthcare is one of the areas where accurate and real-time results remain the key factors and no compromises can be made. Therefore, the fog computing paradigm has been adopted for real-time, reliable, and efficient results. Optimizing power in IoT networks in healthcare can be implemented by efficiently positioning fog devices in order to have minimum latencies and reasonable response times [4, 22, 26, 38]. It can therefore result in faster communication, allowing adequate and timely actions to relieve patients in critical conditions. Indeed, one of the crucial challenges in IoT networks applied to healthcare lies in improving power consumption. Specifically, reducing power consumption is crucial in the case of IoTs/sensors, the number of which continues to skyrocket in the context of patient monitoring [6, 20, 27, 39].

Table 1 shows existing literature to minimize both infrastructure cost and power in IoT networks. In [40, 41], power is minimized while planning service placement on various gateways in IoT networks. However, infrastructure, coverage and capacity are not the objectives of the optimization in [40, 41]. In [42, 43], infrastructure cost and power are being optimized while planning capacity and coverage of IoT network during gateway deployment on candidate sites. A significant research gap is noted despite some similarities with the proposed power-aware IoH scheme. For example, the proposed IoH network scheme considers heterogeneous gateway placement in healthcare while homogeneous gateway placement is considered in [42, 43].

Table 1 Optimizing power in IoT network

In the proposed mathematical scheme, GE and RE are two different gateways in terms of their computing capability and appropriate locations for these nodes are chosen by the decision variables. In addition, transmission power is also a decision variable among communication nodes. The proposed optimization scheme can be distinguished from the existing closely related work as follows: (1) power-aware healthcare infrastructure, (2) appropriate locations for heterogeneous gateways, and (3) mathematical framework. The only disadvantage of this work is that power consumption may not be explicitly considered a big issue for a small-scale healthcare infrastructure.

3 System model and mathematical formulation

3.1 System model

The power-aware Fog-supported IoT network in Healthcare (IoH) comprises three communicating nodes including two gateways as in Fig. 2: gateways with extended computing resource (GE), gateways with reduced computing resource (GR), and virtual machines (VMs). Any data traffic either from IoHs or from Wi-Fi access points (APs) is considered a VM. GE and GR nodes make up the fog layer for the IoH network as shown in Fig. 2. This network model considers a specific topology where GEs are intended to cater capacity if links are established among VMs-GR-GE and alternatively cater coverage if multi-hop links are established among VMs-GR-GR-GE. In this network model, GR can relay data to another GR and has comparatively less computing power when compared to GE. An IoH can be connected to GE/GR nodes either directly or via a Wi-Fi access point (AP). However, two GRs can be connected to each other assuming that no two IoHs, APs and GEs are connected to each other. This work assumes that GEs are main-powered while GRs are either main-powered or battery-powered [13, 14].

Fig. 2
figure 2

System model workflow

The total cost of the Power-aware Fog-supported IoH includes the cost of the site, the cost of the hardware installations, transmission power, etc. The overall objective is to minimize the total cost of the network, which is the weighted sum of the infrastructure (i.e., construction, rent, installation, etc.) cost and transmission power (among connecting nodes). The proposed planning scheme also considers the capacities of the GEs, GRs, and wireless links (or channel capacities). The energy model used to evaluate the total cost of the Power-aware Fog-supported IoH network and the used parameters are similar to the one in [44]. Indeed, the transmission power of each node is calculated based on a path-loss model given by the formula:

$$ P_{T X}=P_{R X} \times\left( \frac{4 \pi}{\lambda} \times d\right)^{2} $$
(1)

where PTX, PRX, λ and d in Eq. 1 represent the transmission power, the reception power, the wavelength and the distance between the transmitter and the receiver respectively. The parameters used in our simulation are specified by the IEEE 802.11ac standard [45]. The power is sued as a function of path loss to cater to the heterogeneous and Multiple Radio Access Technology (multi-RAT) characteristics of the 5G and beyond wireless networks.

3.2 Mathematical formulation

Table 2 shows the list of notations and definitions of the symbols used in the planned IoH network. The objectives of the optimization and associated constraints for the power-aware IoT enables Fog-supported infrastructure planning are as follows:

Table 2 Terminologies and notations for Power-aware IoH network

3.2.1 Cost function

In the proposed optimization scheme for healthcare contexts, the objective function is divided into two parts: 1st part defines the hardware cost, and this will include the deployment cost of gateways with extended computing resources (GEs), and gateways with reduced computing resources (GRs), or any other hardware related costs. Binary decision variables \({s_{g}^{G}}\in {\{0,1}\}\) and \({s_{h}^{H}}\in {\{0,1}\}\) are used to find optimal sites for GEs and GRs, respectively. The \({c_{g}^{G}}\) and \({c_{h}^{H}}\) represent the cost for the GEs and GRs respectively. The Υ1 cost mathematically can be represented as:

$$ {\Upsilon}_{1} = {\sum}_{g\in G}{s_{g}^{G}} . {c_{g}^{G}}+ {\sum}_{g\in G}{\sum}_{h\in H}{s_{h}^{H}} . {c_{h}^{H}} $$
(2)

The second part minimizes power consumption in the network operation. Operational cost is represented by the transmission power of the wireless links among candidate locations, wherever gateways with extended computing resources (GE) and gateways with reduced computing resources (GR) are installed. The variables \(x_{g,h}^{GH}, x_{g,q}^{GQ},\) \(x_{h,q}^{HQ}, x_{h,h\prime }^{HH}\in {\{0,1}\}\) are finding optimal wireless connections (as transmission power) within links (g,h), (g,q), (h,q) and \((h, h^{\prime })\), respectively. The following mathematical expression Υ2 represents the operational power of the network:

$$ \begin{array}{@{}rcl@{}} {\Upsilon}_{2}&=&{\sum}_{g\in G}{\sum}_{h\in H}{p}_{g,h}^{GH}.{x}_{g,h}^{GH}+{\sum}_{g\in G}{\sum}_{q\in Q}{p}_{g,q}^{GQ}.{x}_{g,q}^{GQ}\\ &&+{\sum}_{h\in H}{\sum}_{q\in Q}{p}_{h,q}^{HQ}.{x}_{h,q}^{HQ}+{\sum}_{h\in H}{\sum}_{h^{\prime}\in H}{p}_{h,h^{\prime}}^{HH}.{x}_{h,h^{\prime}}^{HH} \end{array} $$
(3)

The proposed objective function is a power-aware Fog-supported IoT network plan which minimizes the overall cost of the network. The objective function is optimizing over the decision variables \(x_{g,h}^{GH}, x_{g,q}^{GQ}, x_{h,q}^{HQ},x_{h,h\prime }^{HH}\in {\{0,1}\}\), where ϕ1 and ϕ2 are used as a weighted sum parameter to represent hardware and power costs separately. Finally, the objective function will be a weighted sum of the Eqs. 2 and 3 for the proposed IoH network plan. The objective function can be written as:

$$ \begin{array}{lcl} \quad\quad\quad minimize\\ \quad\quad\quad {s_{g}^{G}}, {s_{h}^{H}} \quad\quad\quad\quad \phi_{1}\times({\Upsilon}_{1}) + \phi_{2}\times({\Upsilon}_{2})\\ x_{g,h}^{GH}, x_{g,q}^{GQ}, x_{h,q}^{HQ}, x_{h,h^{\prime}}^{HH} \end{array} $$
(4)

For GE and GR gateways, the variables \({s_{g}^{G}},{s_{h}^{H}}\in {\{0,1}\}\) are assigned the value ’1’ in case any of the GE and GR is installed on their associated candidate sites, but ’0’ otherwise. The corresponding infrastructure costs are included in the first part of the Eq. 4 as explicitly expressed in Eq. 2. On the other hand, the variables \(x_{g,h}^{GH}, x_{g,q}^{GQ}, x_{h,q}^{HQ},x_{h,h\prime }^{HH}\in {\{0,1}\}\) will be assigned a value ’1’ if connections among links (g,h), (g,q), (h,q) and \((h, h\prime )\) are established, and the same is ’0’ otherwise. The corresponding operational (power) cost is included in the second part of the Eq. 4 as explicitly expressed in Eq. 3.

Minimizing the objective function as Eq. 4 subject to the following constraints:

3.2.2 Topology constraints

The following mathematical expressions represent the topology of the proposed IoH network.

$$ {\sum}_{g\in G}{x}_{g,H}^{GH}\leq {s_{h}^{H}}, \forall h \in H $$
(5)
$$ {x}_{h,h^{\prime}}^{HH}\leq \frac {{s_{h}^{H}} + s_{h^{\prime}}^{H})} {2}, \forall h, h^{\prime} \in H, h\neq h^{\prime} $$
(6)
$$ {\sum}_{h\in H}{x}_{h,h^{\prime}}^{HH}\leq 1, \forall h, h^{\prime} \in H, h\neq h^{\prime} $$
(7)
$$ {x}_{h,q}^{HQ}\leq {s_{h}^{H}}, \forall h \in H, \forall q\in Q $$
(8)
$$ {x}_{g,h}^{GH}\leq {s_{g}^{G}}, \forall g \in G, \forall h\in H $$
(9)
$$ {x}_{g,q}^{GQ}\leq {s_{g}^{G}}, \forall g \in G, \forall q\in Q $$
(10)
$$ {\sum}_{g\in G} {x}_{g,q}^{GQ}+ {\sum}_{h\in H}{x}_{h,q}^{HQ} = 1, \forall q\in Q $$
(11)

Equation 5 confirms that each GR must have a wireless connection to only one GE, and Eq. 6 declares that two GRs may establish a wireless connection. These two constraints indicate that the installed GRs and GEs are in operation. Equation 7 makes sure that any installed GR may establish a link to an installed GR only. Equation 8 ensures that a VM can establish a link to the installed GR only. Similarly, Eqs. 9 and 10 ensure that both VM and GR cannot establish a link to a non-deployed GE. Equation 11 requires that every VM in the system should not establish a link to any of the non-deployed GEs or GRs, but also any VM should not link to a GR and a GE together.

3.2.3 Flow constraints

The \(m_{g,h}^{GH}\), \(m_{g,q}^{GQ}\), \(m_{h,q}^{HQ}\) and \(m_{h,h\prime }^{HH}\) are the parameters for maximum link (or channel) capacities on links (g,h), (g,q), (h,q) and \((h, h\prime )\) respectively. The information flow \(f_{g,h}^{GH}\), \(f_{g,q}^{GQ}\), \(f_{h,q}^{HQ}\), and \(f_{h,h\prime }^{HH}\) are representing the flow of data for the respective wireless connection. Current data flow must be less or equal to the respective maximum capacity of the wireless connection that is denoted as \(m_{g,h}^{GH}\), \(m_{g,q}^{GQ}\), \(m_{h,q}^{HQ}\) and \(m_{h,h\prime }^{HH}\). The flow \(f_{g,q}^{GQ}\) as a function of decision variable \(x_{g,q}^{GQ}\in {\{0,1}\}\) is defined as:

$$f_{g,q}^{GQ}\left( x_{g,q}^{GQ}\right)= \left\{\begin{array}{cc} 0 & if x_{g,q}^{GQ} = 0 \\ {u_{q}^{Q}} & if x_{g,q}^{GQ} = 1 \end{array}\right.$$

The data flow value \(f_{g,q}^{GQ}\) for any established wireless connection between GE and VM (i.e.,\(x_{g,q}^{GQ}\) = 1) must be less or equal to the respective maximum capacity \(m_{g,q}^{GQ}\) as in Eq. 12:

$$ f_{g,q}^{GQ}\left( x_{g,q}^{GQ}\right)\leq m_{g,q}^{GQ}, \forall g \in G, \forall q\in Q $$
(12)

The flow \(f_{h,q}^{HQ}\) as a function of decision variable \(x_{h,q}^{HQ}\in {\{0,1}\}\) is defined as:

$$f_{h,q}^{HQ}\left( x_{h,q}^{HQ}\right)= \left\{\begin{array}{cc} 0 & if x_{h,q}^{HQ} = 0 \\ {u_{q}^{Q}} & if x_{h,q}^{HQ} = 1 \end{array}\right.$$

The data flow value \(f_{h,q}^{HQ}\)for any established wireless connection between GR and VM (i.e., \(x_{h,q}^{HQ}\) = 1) must be less or equal to the respective maximum capacity \(m_{h,q}^{HQ}\) as in Eq. 13:

$$ f_{h,q}^{HQ}\left( x_{h,q}^{HQ}\right)\leq m_{h,q}^{HQ}, \forall h \in H, \forall q\in Q $$
(13)

The flow \(f_{h,h\prime }^{HH}\) as a function of decision variable \(x_{h,h\prime }^{HH}\), \(x_{h\prime ,q}^{HQ}\in {\{0,1}\}\) where \(h\neq h\prime \), and h (i.e., h=i+j) index denotes the parent GR that is connected via wireless link directly to a GE and h’ (i.e., \(h\prime \)=i+j+ 1) denotes the child GR that is connected via wireless link to the GR s as follows:

$$f_{h,h^{\prime}}^{HH}\!\left( x_{h,h^{\prime}}^{HH},x_{h,q}^{HQ}\right) = \! \\ \left\{\begin{array}{cc} {\sum}_{h^{\prime}\in H} {\sum}_{q\in Q} {u_{q}^{Q}}.x_{h,q}^{HQ} & if x_{h,h^{\prime}}^{HH} = 1 \\ 0 & if x_{h,h^{\prime}}^{HH} = 0 \end{array}\right.$$

The data flow value \(f_{h,h\prime }^{HH}\) for any established wireless connection between a GR h and a GR \(h^{\prime }\) (i.e., \(x_{h,h\prime }^{HH}\)= 1) must be less or equal to respective maximum capacity \(m_{h,h\prime }^{HH}\) as in Eq. 14:

$$ f_{h,h^{\prime}}^{HH}\left( x_{h,h^{\prime}}^{HH},x_{h,q}^{HQ}\right) \leq m_{h,h^{\prime}}^{HH}, \forall h,h^{\prime} \in H, h \neq h^{\prime} $$
(14)

The flow \(f_{g,h}^{GH}\) as a function of decision variables \(x_{g,h}^{GH}\), \(x_{h,q}^{HQ}\), and \(x_{h,h\prime }^{HH}\in {\{0,1}\}\) is defined as follows:

$$ \begin{array}{@{}rcl@{}}&&f_{g,h}^{GH}\left( x_{g,h}^{GH}, x_{h,h^{\prime}}^{HH},x_{h,q}^{HQ}\right) \\ &&~=\left\{\begin{array}{cc} {\sum}_{q\in Q} {u_{q}^{Q}}.x_{h,q}^{HQ}+f_{h,h^{\prime}}^{HH}\left( x_{h,h^{\prime}}^{HH},x_{h,q}^{HQ}\right) & if x_{g,h}^{GH} = 1 \\ 0 & if x_{g,h}^{GH} = 0 \end{array}\right.\end{array} $$

The data flow value \(f_{g,h}^{GH}\) for any established wireless connection between a GE and a GR (i.e., \(x_{g,h}^{GH}\) = 1) must be less or equal to maximum capacity \(m_{g,h}^{GH}\) as in Eq. 15:

$$ f_{g,h}^{GH}\left( x_{g,h}^{GH}, x_{h,h^{\prime}}^{HH}, x_{h,q}^{HQ}\right) \leq m_{g,h}^{GH}, \forall h,h^{\prime} \in H, h \neq h^{\prime} $$
(15)

3.2.4 Load constraints

$$ \begin{array}{@{}rcl@{}} &&{\sum}_{h\in H} f_{g,h}^{GH}\left( x_{g,h}^{GH}, x_{h,h^{\prime}}^{HH},x_{h,q}^{HQ}\right) \\ &&\qquad+{\sum}_{q\in Q} f_{g,q}^{GQ}\left( x_{g,q}^{GQ}\right) \leq c_{1}, \forall g \in G \end{array} $$
(16)
$$ \begin{array}{@{}rcl@{}} &&{\sum}_{q\in Q} f_{h,q}^{HQ}\left( x_{h,q}^{HQ}\right)+f_{h,h^{\prime}}^{HQ} \left( x_{h,h^{\prime}}^{HH}, x_{h,q}^{HQ}\right)\\ &&\qquad\leq c_{2}, \forall h \in H, h \neq h^{\prime} \end{array} $$
(17)
$$ \begin{array}{@{}rcl@{}} &&{\sum}_{g\in G} f_{g,h}^{GH}\left( x_{g,h}^{GH}, x_{h,h^{\prime}}^{HH}, x_{h,q}^{HQ}\right) \\ &&={\sum}_{h^{\prime}\in H} f_{h,h^{\prime}}^{HH}\left( x_{h,h^{\prime}}^{HH}\right) + {\sum}_{q\in Q} f_{h,q}^{HQ}\left( x_{h,q}^{HQ}\right),\\&& \forall h\!\in\! H, h \neq h^{\prime} \end{array} $$
(18)
$$ \begin{array}{@{}rcl@{}} {\sum}_{g\in G} f_{g,q}^{GQ}\left( x_{g,q}^{GQ}\right)+{\sum}_{h\in H} f_{h,q}^{HQ}\left( x_{h,q}^{HQ}\right) = {u_{q}^{Q}}, \forall q \in Q \end{array} $$
(19)

Constraints in Eqs. 16 and 17 maintain that information (or channel) capacities on each installed GE and GR must be less than the maximum channel capacities c1 and c2. Flow conservation is an important network property which states that information flow going into a network node must come out of it without loss or modification of information. Equation 18 defines information flow conservation for every installed GR. Finally, Eq. 19 demonstrates that every VM in a system must have enough capacity for information flow from GE/GR.

4 Swarm intelligence-based evolutionary algorithms

Swarm intelligence (SI) is a popular and effective computing technique applied in many research fields. Swarm intelligence has the ability to mimic the collective behaviour of groups such as bees, birds, fish, ants, etc. Here word ”swarm” refers to any restrained collection of interacting agents such as a swarm of bees in a colony around their hive, a swarm of ants and their collective (and coordinated) activities to collect and store food and so on. The swarm-based metaphor can be extended to other such behaviours in swarming species like bio-geography-based optimization (BBO) [46], or swarming objects like fireworks algorithm (FWA) and particle swarm optimization (PSO) [48, 49], quantum-inspired, etc.

The fireworks algorithm (FWA) and the artificial bee colony (ABC) algorithm are SI-based evolutionary algorithms (EAs) in which a population of simple agents act, communicate, exploit, and explore interactively and collectively [37, 47, 49]. An agent in an SI EA can communicate with other agents directly or indirectly using their local environment. The target problem formulated in Section 2 is a discrete (binary) combinatorial optimization problem and algorithms that are intended to use can operate only on non-binary combinatorial optimization problems [12, 49]. Therefore, the target optimization problem is encoded in non-binary integer space.

4.1 Encoding the problem for non-binary discrete evolutionary algorithms

Three nodes in the proposed power-aware fog-supported healthcare Internet of Things (IoH) network are denoted by the sets: (1) candidate sites G as the gateways with extended computing resource (GE), (2) candidate sites H as the gateways with reduced computing resource (GR), and (3) Q as the virtual machines (VMs) that represent the data traffic transmitted to the nodes included in G or H. As the proposed IoH network plan is based on integer programming, a solution can be represented as a finite vector of positive integers:

$$ Y = (\upsilon_{1}, \upsilon_{2},\dots,\upsilon_{|Q|}, {\Lambda}_{1}, {\Lambda}_{2},\dots,{\Lambda}_{|H|}) $$
(20)

where |Q| and |H| are the cardinalities of sets Q and H in Eq. 20. In Y, υq denotes the qth VM established a wireless link to some GE g or GR h. The Λh in Y denotes the hth GR that established a wireless link to some GE g or GR \(q\prime \), where \(q\neq q\prime \), and Λh is zero when hth GR is not installed on the associated GR candidate site. In Y, each IoH and an installed GR can be wirelessly connected to any one of the GEs or GRs, which is the reason the current representation of Y, as in Eq. 20, is in consecutive order of positive integers.

The candidate solution Y = \((\upsilon _{1}, \upsilon _{2},\dots ,\upsilon _{|Q|}, {\Lambda }_{1}, {\Lambda }_{2}, \\ \dots ,{\Lambda }_{|H|})\) is used for the implementation of the power-aware fog supported IoH network plan. In Y, integer variable υq \(q=1,2,\dots ,\left |Q\right |\), take a value in a set N= \(\left \{1, 2, \dots , \left |G\right |, \left |G\right |+1, \dots ,\left |G\right |+\left |H\right |\right \}\), where element \(1, 2, \dots , |G|\) represents the GE candidate sites and \(|G| +1, \\ \dots , |G|+|H|\) represents the GR candidate sites. Integer variable υq indicates VM q established a wireless connection to GE or GR candidate site. υq=i, if i < |G|, indicates that VM q is established a wireless connection to GE candidate site i and now a gateway is installed on the candidate site GE i. υq=i if i > |G| indicates that a VM q is established a wireless connection to GR candidate site i −|G| and GR is installed at the candidate site i −|G|. Integer variable Λh takes a value in \(N\prime \)=\({\{0,1, 2, \dots , |G|,|G|+1, \dots ,|G|+|H|}\}\). Here, Λh= 0 implies that a GR is not installed in the GR candidate site h. Moreover, Λh= 0 also implies that the GR is not connected to both VMs and (or) a GE. Both the υq and Λh are the variables to decide the installation of a GE at the candidate site g. Encoding the decision variables implicitly enforces some constraints of the planning problem, reducing the number of constraint checks during computer implementation. For example, no need to explicitly verify constraint in Eq. 11 which states that every VM in the system should not establish a link to any of the non-deployed GEs or GRs when the decision variables are encoded as in Eq. 20.

4.2 Proposed scheme

More than one local search method can be used to improve the computational capability of the swarm intelligence-based algorithms. An ensemble of three local search methods is being used to solve the fog-supported healthcare Internet of Things (IoH) network by incorporating in discrete fireworks algorithm (DFWA) and discrete artificial bee colony (DABC) that are taken from [12, 49]. Genetic algorithm [50, 51] is used as a benchmark to compare against DFWA-3-LS and DABC-3-LS algorithms. The defined candidate solutions, as in Eq. 20, can violate constraints, as defined in Eqs. 5 to 19, due to probabilistic perturbation during the operation of DFWA-3-LS and DABC-3-LS, and Genetic algorithms. A heuristic repair algorithm (HRA) is used to repair candidate solutions for all the experimented algorithms, as defined in Eq. 20, and the HRA is taken from [12]. The readers are redirected to [47] for a detailed discussion on local search methods.

4.2.1 DFWA-3-LS

Algorithm 1 is the pseudo-code for the DFWA-3-LS. Parameters are initialized, and a population of N fireworks (i.e., candidate solutions) is randomly generated. After computing the cost of the N fireworks using Eqs. 4 to 19, the number of sparks, spi, and the explosion radius, Hi, are computed using Eq. 20 for each of i = 1,2,...,N). The DFWA-3-LS uses any of the local-search methods insert, interchange, and swap—to perturb multiple firework components. This perturbation process exploits the existing small region (around a firework) and conducts a thorough search in a small region to generate sparks. Sparks generated from N fireworks are evaluated using the cost function Eq. 4.

Algorithm 1
figure m

DFWA-3-LS pseudo code for IoH network planning.

Now, the DFWA-3-LS selects a set Z of fireworks to be mutated from the N fireworks to execute the exploration process. For each firework, YiZ, the mutation operator Eq. 11 is used to generate mutation sparks with a user-determined mutProb probability. After executing the exploration process on the |Z| fireworks, the mutation sparks are evaluated using the cost function Eq. 4. After performing exploitation and exploration for one algorithm generation, the DFWA-3-LS selects a new population of N fireworks. First, the solution with the minimum cost value is selected, then (N − 1) fireworks are selected randomly from the remaining candidate solutions for the next algorithm generation [12].

5 Results and discussion

Table 3 defines the problem-specific parameters and Table 4 shows the algorithm-specific parameters for power-aware fog-supported Intent of Things in healthcare (IoH). The problem configuration and input/parameter are selected randomly. The problem formulation for the IoH problem was presented in Section 3. There are three inputs to the IoH problem: (1) the number of virtual machines (VMs), (2) gateways with extended computing resources (GE), and (3) gateways with reduced computing resources (GR). Here, VMs represent corresponding data traffic from IoHs and are transmitted directly or indirectly to any of the gateways directly or indirectly via access points. To ensure unbiased comparison, each experimented algorithm is terminated with the number of objective function evaluations as defined in Eq. 4. We choose performance metrics based on the objective function of the problem. This experiment defines the number of configurations as the physical assembly of IoH, and GE, GR gateways. Further, the arrangement is a form or combination with a certain path loss among grouped/clustered nodes. Each configuration is simulated separately due to high computational requirements, and aggregated result of all configurations is presented against a problem. The computer used for the simulation has the following configuration - Software: MATLAB 2019, RAM: 32 GB, Processor i7 Series. The VMs traffic was randomly generated as a real vector in the interval [0.01 4.0]. The hardware cost for each deployed GE candidate site (CS) and GR CS is set as GE = 50 and GR = 10. Algorithm-specific parameters for the experimented algorithm are taken from [12]. A repair algorithm in [12] is used to fix the out-of-bounds candidate solutions.

Table 3 List of problem instances
Table 4 Algorithm specific parameters

In this paper, three local search methods are used for the discrete fireworks (DFWA-3-LS) and discrete artificial bee colony (DABC-3-LS) algorithms and the performance of these algorithms is compared against a genetic algorithm. In this work, performance measures are average cost: first both hardware, installation, and maintenance as defined in Eq. 2, second average transmission power consumption among all communication nodes as defined in Eq. 3, whereas average transmission power consumption among all communication nodes as mathematically in Eq. 3, third standard deviation, and fourth Average CPU time in seconds. The system’s average cost of the power-aware fog-supported IoT healthcare (IoH) is plotted for the experimented algorithms in Fig. 3a. Note that the system’s average cost includes both hardware infrastructure cost and the cost of power transmission among the communicating nodes. The algorithm DFWA-3-LS outperformed the DABC-3-LS, and the genetic algorithm in terms of average cost. On the other hand, the DABC-3-LS algorithm performs better in terms of average cost against the genetic algorithm, as shown in Fig. 3a. In Fig. 3b system’s transmission power (dBm) has been plotted for the experimented algorithms. The DFWA-3-LS algorithm outperforms DABC-3-LS and GA in terms of transmission power (dBm). However, the genetic algorithm is way behind both the experimented algorithms in terms of minimizing both the average cost and operational cost (transmission power (dBm). The average cost standard deviation (STD) for the DFWA-3-LS algorithm is larger than the STD of the DABC-3-LS and genetic algorithm for most of the problems as listed in Table 3. This indicates in Fig. 4a that the DFWA-3-LS has a better search mechanism for the target problem. However, the STD of the DABC-3-LS algorithm for average power (dBm) consumption is relatively small than the standard deviation of the DFWA-3-LS, and GA for most of the problems as listed in Table 3. This indicates in Fig 4b that the DABC-3-LS doesn’t have a better search mechanism for the target problem. Figure 6 shows that the DFWA-3-LS algorithm saves more transmission power (dBm) when compared against GA than the DABC-3-LS algorithm. This also confirms comparatively the best performance of the DFWA-3-LS in terms of saving transmission power (dBm). Figure 5 shows that the DFWA-3-LS algorithm consumed more average MATLAB CPU time (in seconds) when compared with the average MATLAB CPU time (in seconds) consumed by the DABC-3-LS, and GA for most of the problems listed in the Table 3. However, careful observation shows that both the DABC-3-LS and GA consumed comparable average MATLAB CPU time (in seconds). The summary of the performance of the experimented algorithms is as follows:

  • DFWA-3-LS is the best performer in term of avg. cost.

  • DFWA-3-LS shows the lowest average transmission power (dBm) consumption.

  • DFWA-3-LS used the highest average MATLAB CPU time (in seconds).

Fig. 3
figure 3

Costs comparisons for experimented algorithms

Fig. 4
figure 4

Standard deviation comparisons for experimented algorithms

Fig. 5
figure 5

Average CPU time (sec.) for experimented algorithms

The t-Test showed a significant difference between the performance of the DFWA-3-LS against the performance of each of the DABC-3-LS and the genetic algorithm. The statistical test is based on the following null hypothesis: either compared algorithms produce the same average transmission power (dBm) or alternatively, the DFWA-3-LS computes with a lower average transmission power (dBm). The p-values for the compared algorithms are listed in Table 5, for the problems listed in Table 3, against each compared algorithm. The p-values can be recorded based on the desired significance level, which is α = 0.05 for this work. The significance of the performance of the compared algorithm can be gauged based on two conditions. First, the average transmission power (dBm) by the DFWA-3-LS is lower than any compared algorithm, and (2) the associated pα, then it can be safely concluded that there is a statistically significant difference between the performance of the DFWA-3-LS against any other experimented algorithms. Alternatively, it can be concluded that the observed difference is not statistically significant. The performance of the DFWA-3-LS is comparatively the best in terms of average power transmission power (dBm) as shown in Fig. 3b; therefore, we conduct a students’ t-Test of the DFWA-3-LS against the other two experimented algorithms to check the significance level of it’s performance. The DFWA-3-LS showed a lower average transmission power (dBm) as compared to the other experimented algorithms, and the p-value was also lower than 0.05 as shown the Table 5. This statistical test concludes that the DFWA-3-LS algorithm outperforms both the DABC-3-LS and the genetic algorithm significantly (Fig. 6).

Table 5 t-Test for experimented problem instances
Fig. 6
figure 6

Percentage of DFWA-3-LS’s avg. power (dBm) saved against experimented algorithms

Figure 7 showed box plots (a-d) which demonstrate the comparative performance of the experimented algorithms for the fog-supported IoT infrastructure in healthcare (IoH). Variability and consistency can be observed among the experimented algorithms, but the DFWA-3-LS algorithm reaches a high variability and improved consistency when compared to the DABC-3-LS, and the genetic algorithm. In addition to average lower power (dBm) transmission, significance t-Test, and high variability, the DFWA-3-LS can be judged as a better alternative to solve this complex power-aware fog-supported IoH. Data for the DFWA-3-LS is symmetric in characteristics, for most of the problems. While the data for the DABC-3-LS and the genetic algorithm is skewed in some problems as listed in Table 3.

Fig. 7
figure 7

Boxplots graphically demonstrate performance of DFWA-3-LS, DABC-3-LS, and GA algorithms

6 Conclusion and future work

This paper proposed a healthcare infrastructure that was comprised of three wirelessly connected communication nodes: virtual machines (VMs), gateways with reduced computing resources (GR) and gateways with extended computing resources (GE). Here, VMs were representing the data traffic transmitted to a GE or GR. This data traffic either came from the Healthcare Internet of Things (IoH) or from Wi-Fi access points (APs). The proposed problem was formulated as an integer programming problem which was about deciding the deployment of GEs and GRs gateways in a critical healthcare infrastructure on their candidate sites. The target of the mathematically formulated problem was to minimize the infrastructure/hardware cost and its power transmission.

Two newly developed swarm intelligence-based algorithms were used to find a high-quality sub-optimal solution to the formulated integer programming problem. An ensemble of three local search methods was incorporated in the Discrete fireworks algorithm (DFWA) and discrete artificial bee colony (DABC) algorithm to solve the IoH network. The performance of the proposed DFWA was compared against the DABC, and the genetic algorithm (GA). Experimental results and statistical tests reveal that the DFWA with the ensemble of local searches can provide a relatively better solution. DFWA and DABC are better in balancing exploitation and exploration by using an ensemble of local search methods as compared to GA using only a single local search method.

The proposed mathematical model using Swarm intelligence-based algorithms plans a power-aware infrastructure for delay-sensitive applications in healthcare. This model can be further extended to lay down infrastructure for several delay-sensitive applications like online gaming, smart cities, autonomous vehicles, etc.

This work can be extended in future as follows: (1) Prove/disprove NP-completeness of this mathematical problem. (2) extend this work to implement some exact algorithms and their performance would be compared with the current approximate algorithms. (3) Experiment with existing swarm-intelligence algorithms with various local search methods individually as well as also try to expand the ensemble size.