1 Introduction

In many applications, the capacity resources (distribution centers, manufacturing plants, manufacturing resources, etc.) have to satisfy several types of uncertain demand and disruption risks (stochastic demand, reliability, unforeseen events, etc.). Capacity investment decisions are made in advance before various types of unforeseen events occur. Then, the decision to increase the capacity investments to handle uncertain events or customer demand loss leads to inevitable economic consequences. Some examples of applications are supply chain disruption risk management [1], order fulfillment in distribution centers for online retailers [2], the resource allocation to meet customer demand in online applications [3], capacity allocation in flexible production networks [4], and capacity sharing [5].

The introduction of flexibility into the system can mitigate the effect of uncertain demand and disruption risks limiting the increment in the capacity investment. Flexibility is the ability of the resources to satisfy several categories of demand inquiries. The full flexibility model, in which each resource can satisfy every type of demand, leads to the best performance of the network. This solution is more expensive (full flexible resources capacity or distance between resource and customer) and sometimes is an infeasible solution. On the other side, the dedicated system is less expensive but is vulnerable to the demand changing or unforeseen events. The trade-off between costs and flexibility can be partial flexibility, in which each resource satisfies a reduced set of demand classes or customers.

In the literature, the most studied partial flexibility approach concerns the long chain [1, 6,7,8,9] in which each demand class is served by two providers (or suppliers). The work proposed by Jordan and Graves demonstrates that reduced flexibility designed in the right way can be more effective. They proposed the long chain in which a provider fulfills two customers.

Figure 1 shows the network structures from the dedicated to the full flexibility configurations.

Fig. 1
figure 1

Network structure

The long-chain model consists of a fixed link between resources’ provider and demand classes that can reduce the ability to react to unforeseen events.

This paper proposes a model in which a demand class is served by two providers as the long chain, keeping a limited number of links between resources and demand classes, but these links are dynamically assigned. The proposed model based on the game theory approach uses the Gale-Shapley algorithm. The main characteristic of the algorithm is to terminate after at most n2 proposals (the duration of computation is directly proportional to the size of the input, then this is a fast algorithm), and the matching is stable. These features make it suitable for applications in network design and reconfiguration in online applications such as cloud manufacturing [10]. This paper is organized as follows. Section 2 presents an overview of the works proposed in the literature on the structure with a degree of flexibility. Section 3 deals with the reference context and the Gale-Shapley model proposed. Section 4 describes the simulation experiments, while the numerical results are discussed in Sect. 5. Section 6 provides the conclusions and the future developments.

2 Literature review

The literature has investigated different types of flexibility in resource allocation in the network structure. Jordan and Graves [9] discussed how full flexibility can be more expensive or difficult to implement in real applications, while a small increase in flexibility leads to performance very close to full flexibility.

Chou et al. [8] considered partial flexibility focused on a stochastic model without uncertainties. The long chain proposed, first by Jordan and Graves [9], was studied by Wang and Zhang [11] that obtain a bound on the asymptotic performance of the long chain that only depends on the mean and variance of the demand distribution and Désir et al. [12] that demonstrated that the long chain is the better solution among all connected structure with the same number of links. Chen et al. [13] proposed a model to design the flexibility needed arcs using a probabilistic graph expander approach.

The case of two stages that include plant, inventory, and customers is studied by Simchi-Levi et al. [1]. They proposed a mathematical optimization model to design the flexibility of the network. This can be applied also in a multi-stage environment but with higher computational complexity.

Shi et al. [14] studied the make-to-order (MTO) environment developing a model to design a sparse flexibility structure with m (plants) + n (customers) arcs that assure the same performance of a full flexibility configuration. They argued as the proposed model deteriorates as the system size grows.

Xu et al. [2] studied the online demand fulfillment satisfied by several resources type. They extended the concept of the long chains proposed in the literature developing a more general sparse network model.

Asadpour et al. [3] studied the long chain structure for demand classes that require resources to supply inventories. They demonstrated that the long chain is effective in an online context with a simple myopic online fulfillment policy.

DeValve et al. [15] investigated the problem of distribution centers (DCs) that collaborate to reduce the lost sales in an online retailing environment in which the costs of full flexibility are considered prohibitive. They introduced additional flexibility to the network evaluating the trade-off between costs and additional flexibility.

Lyu et al. [4] studied the flexible structure in the case of capacity sharing among different plants.

They compared the long chain and full flexibility to design the required capacity; the required capacity level in a long-chain network is close to that in a fully flexible network and is much lower than a dedicated system.

Wang et al. [16] presented an overview of flexible processes and operations. They focused on the capacity allocation design. They argued that the relationship between flexibility and capacity needs more investigation. In particular, the effect of the flexibility on the capacity needed in the production network.

Désir et al. [12] compared the performance of the long chain with all designs with at most 2n edges.

They provided some examples where the long chain is not the optimal solution compared to other 2n edges structures. The demand distribution is the main factor that determines what is the optimal structure between the long chain and the other 2n edges.

Shen et al. [17] studied the effect of disruption in demand and supply on a designed sparse flexible structure to meet a performance level. They proposed an algorithm to generate sparse and yet reliable flexibility structures. The method proposed allows with a lower number of edges of the flexibility design without losing substantial total sales.

Shi et al. [18] studied the process flexibility in a multiperiod make-to-order production system. The design of the sparse flexibility structure needs m + n arcs to obtain the same performance as the full flexibility structure. The growth of the system size reduces the effectiveness of the proposed method.

The Gale-Shapley algorithm was proposed in the literature to support the decisions in several production network applications. Argoneto and Renna [5] proposed the Gale-Shapley model to support the decision in production networks to share capacity among plants. The model works as sparse flexibility with 2 edges to match the under- and overloaded capacity of the plants.

Liu et al. [19] proposed the Gale-Shapley algorithm to share resources among plants in a cloud manufacturing system environment. The Gale-Shapley model allows sharing the benefits among all the partners. It is relevant in the production networks that each partner can obtain an adequate benefit to keep the partners in the network [20].

From the discussion in the Sect. 2, a broad literature exists on the flexibility in networks for different production and distribution environments. The literature focused on the sparse structure with 2 edges design model or the evaluation of the limited chain compared to the dedicated or full flexibility structures. A great part of the literature focused on the design of the network, but the reconfiguration to assure more responsiveness was not considered. Any studies evaluated the possibility of game theory models to support the design and reconfiguration of the network structure. Therefore, this paper proposes the use of the Gale-Shapley algorithm that leads to 2 edges structure similar to the models proposed in the literature. Then, the first research question of this paper is:

  • RQ1: Is the Gale-Shapley algorithm adaptable effectively to design and reconfigure a flexible structure?

If the Gale-Shapley algorithm can be applied for the design of the structure, the robustness and performance evaluation should be evaluated compared to the long chain and full flexibility models. Therefore, the second research question asks:

  • RQ2: What is the performance and the robustness compared to the full and long chain flexibility approaches?

3 Reference context and models

The reference context concerns a general resource allocation problem to satisfy requests that arrive sequentially. There are n different types of resources supplied by providers denoted by si (i-th type) with a based capacity Ci. The resources are characterized by stochastic reliability that reduces the real capacity available denoted by ai ∈ (0,1]. The effective capacity Cavi,t of the resource i-th at time t is obtained by Eq. (1):

$${Cav}_{i,t}={C}_{i}*UNIFORM[\left(1-{a}_{i,t}\right),1]$$
(1)

The sequential base demand consists of n different types of requests denoted by ri,t, that is the amount of capacity requested at time t by si. The demand is affected by fluctuation denoted by a coefficient fi ∈[0,1]; the demand due to the fluctuation rfi,t is drawn from the following expression (Eq. 2):

$${rf}_{i,t}={r}_{i,t}*UNIFORM[\left(1-{f}_{i,t}\right),\left(1+{f}_{i,t}\right)]$$
(2)

Following the allocation model described in the following sub-sections, the demand defined by Eq. (2) is allocated to a specific resource. If the capacity of a resource is not enough to satisfy the demand allocated, the resource can use additional capacity (as overtime) oi,t to satisfy the demand with additional costs. This choice means that the demand loss is not allowed and the customer’s request is always satisfied.

The terms suppliers and providers (of the resource) are interchangeable in this manuscript. Also, the underutilization of the resources leads to costs. The allocation of the resources depends on the specific network design.

3.1 Dedicated model

The dedicated model assigns each request to the related resource provider without any possibility of flexibility and cooperation with the other si. At each planning period t, the following steps are performed. The required quantity is determined for every customer considering the fluctuation as in Eq. (3):

$${rf}_{i,t}={r}_{i,t}*UNIFORM\left[\left(1-{f}_{i,t}\right),\left(1+{f}_{i,t}\right)\right] \forall i$$
(3)

Then, each resource computes the capacity to allocate considering the reliability (see Eq. 1).

Three cases can occur:

$$\left\{\begin{array}{c}{case a: Cav}_{i,t}>{rf}_{i,t}, this\; case\; leads\; to\; an\; under\; utilisation\; of\; the\; capacity\\ case b: { Cav}_{i,t}={rf}_{i,t}, this \;case\; uses\; all\; the\; base\; capacity\; available\\ {case c: Cav}_{i,t}<{rf}_{i,t}, this\; case\; leads\; to\; allocate\; over\; capacity\end{array}\right.$$

In case a, the underutilization capacity is computed, which is as follows (Eq. 4):

$${Cund}_{i,t}={C}_{i}-\frac{{rf}_{i,t}}{{a}_{i,t}}$$
(4)

In case b, all the base capacity is used with any costs of under- or overutilization.

In case c, overcapacity is necessary as sub-furniture or overtime use; the overcapacity is computed as follows (Eq. 5):

$${Cover}_{i,t}=\frac{{rf}_{i,t}}{{a}_{i,t}}-{C}_{i}$$
(5)

3.2 Full flexible model

The fully flexible model allows distributing the requests to all resources’ providers because all the requests and providers are fully connected.

This model with resources connected with all demand types increases the costs due to the transport costs, reconfiguration costs of the resources, etc. The fully flexible model can be used as a benchmark to evaluate the proposed model compared to the better potential performance measures.

For this model, after the definition of the request as shown in Eq. (2) and the reliability coefficient for each resource, the allocation of the requests considered three cases that depend on the total capacity available (Eq. 6) and the total request (Eq. 7) of the entire network.

$${offered}_t={\textstyle\sum_{i=1}^I}MAX\left[{(Cav}_{i,t}-{rf}_{i,t});0\right]$$
(6)
$${requested}_t={\textstyle\sum_{i=1}^I}MAX\left[{({rf}_{i,t}-Cav}_{i,t});0\right]$$
(7)

If the total request (Eq. 7) is null, it means that each request can be satisfied by the related resource. In this case, the capacity is assigned with the computation of the underutilization of each provider as shown in Eq. (3).

If the total request is greater than zero and the total offered (Eq. 6) is greater than the requested, it means that some capacity is enough to satisfy the request, but the other providers can supply the entire request. Then, the request is shared among the providers that can offer proportionally to the available capacity (Eq. 8).

$${all}_{i,t}=\frac{{(Cav}_{i,t}-{rf}_{i,t})}{{offered}_{t}}, for\; the\; provider\; with \;{(Cav}_{i,t}-{rf}_{i,t})>0$$
(8)

If the total requested is greater than zero and the total offered is lower than the requested, it means that overcapacity is necessary to allocate. In this case, the overcapacity (requestedt-offeredt) is distributed proportionally to the based capacity.

3.3 Long chain model

The long-chain model consists of fixed links (see Fig. 1) where each resource can be supplied by two providers. If the request is null, it means that each request can be satisfied by the related resources. In this case, the capacity is assigned and the underutilization is computed as shown in Eq. (3).

If some providers cannot satisfy the request with the base capacity, it is evaluated if the second link of the long chain is underutilized. In a positive case, the capacity is equally distributed between the two providers; otherwise, the overcapacity is allocated to the primary provider. This means that the secondary link is used only if it has the underutilized capacity to minimize the number of links activated.

3.4 Gale-Shapley model

Game theory models the conflict and cooperation among rational decision-makers using a set of mathematical formulations. The “game” works through interactive actions among the participants.

The game theory has the advantage to solve distributed algorithms, as the problem addressed in this research, with less time and computations compared to heuristic-based approaches [21].

The stable matching problem can be treated as a game theory problem [22]. The Gale-Shapley game is known to be a centralized matching algorithm in which the solution always starts from an empty set, and iteratively reaches the stable matching solution [22, 23]. The resource allocation/sharing resources can be solved as a stable matching problem. Several studies have proposed the Gale-Shapley algorithm to share resources in cloud manufacturing [19], capacity sharing in a network of enterprises [5], and power allocation to machines of a manufacturing system with a peak power constraint [24].

This model applies the Gale-Shapley algorithm to define a couple of providers between the one that can offer and the other that requests capacity. The maximum number of links is the same as the long chain model. The Gale-Shapley [23] algorithm is used to solve the stable matching problem [25]. The algorithm considers two sets defined as women (w) and men (m) and the objective is to obtain a stable matching between each couple of woman and man.

The first step is how providers become woman or man; for the problem addressed in this paper, the women is the provider underutilized, while the men are the providers overutilized. The basic form of the stable matching problem considers the equal number of the two sets; to avoid the complication of the algorithm and use the standard algorithm, it is considered a “ghost” member to have always the same number in the two sets. If a couple includes the ghost member, the couple is infeasible.

The second step is how the preference of each man and woman is computed.

For each man and woman, the capacity offered and capacity requested are computed as shown in Eqs. (9) and (10).

$${OC}_{w,t}={(Cav}_{w,t}-{rf}_{w,t}), \forall \; provider\; that\; becomes\; woman$$
(9)
$${RC}_{m,t}={({rf}_{m,t}-Cav}_{m,t}), \forall\; provider\; that\; becomes\; man$$
(10)

Then, the utility function is computed as shown in Eqs. (10) and (11) (defined model game1). The behavior of these equations is shown in Fig. 2a, b.

$${U}_{m,t}^{w}=\frac{MIN({RC}_{m.t}, {OC}_{w,t})}{{RC}_{m.t}}$$
(11)
$${U}_{w,t}^{m}=\frac{MIN({RC}_{m.t}, {OC}_{w,t})}{{OC}_{w,t}}$$
(12)

The Gale-Shapley model is tested with alternative utility functions as shown in Eqs. (13) and (14) (defined model game 2). The behavior of these equations is shown in Fig. 3a, b.

$${U}_{m,t}^{w}=MAX( 1-\frac{\left|{RC}_{m.t} -{ OC}_{w,t}\right|}{{RC}_{m.t}} , 0)$$
(13)
$${U}_{w,t}^{m}=MAX( 1-\frac{\left|{RC}_{m.t} -{ OC}_{w,t}\right|}{{OC}_{w,t}} , 0)$$
(14)

The Gale-Shapley algorithm is shown in the Appendix.

For each couple determined, two cases are considered:

  • If the offered is greater or equal to the requested, the entire request is allocated to the offered.

  • If the offered is lower than the requested, the difference (requested-offered) is equally shared between offered and requested that compose the couple determined.

4 Simulation environment

The model described is tested by own simulation environment developed in Java language using a multi-agent architecture. The agents of the architecture are the following: supplier, plant, model, scheduler, and statistical. The supplier agent manages the activities of the supplier in terms of capacity available, reliability, and capacity offered. The plant agent manages the activities of the plant in terms of capacity requested, fluctuations, and capacity requested. The model agent manages the messages and capacity of the exchange among plants and suppliers. The scheduler agent manages the discrete event simulation activities. The statistical object collects all the information of the simulation runs to provide the statistical report of the performance measures.

Table 1 shows the based parameters used for the simulation:

  • Two dimensions of the network to evaluate the effect of the dimension on the performance measures.

  • Three values for the reliability of the providers.

  • Three values for fluctuations of the demand.

  • The coupling-based demand-capacity considers the same value for providers and customers, and misalignment by a uniform distribution of 10% and 20%.

  • The network is simulated over 120 orders.

Table 1 Simulation parameters

Considering the parameters presented in Table 1, the experimental classes for each network dimension are 27 for a total of 54 experimental classes for the 4 factors (see Table 2).

Table 2 Experimental classes for one network dimension

The performance measures considered are the following:

  • Average overcapacity allocated; it is the overcapacity over the base capacity used by the suppliers.

  • The coefficient variation for the overcapacity allocated; this index evaluates the uniformity of the overcapacity used among the suppliers of the network.

  • Average undercapacity allocated; it is the undercapacity over the base capacity used by the suppliers.

  • The coefficient variation for the undercapacity allocated; this index evaluates the uniformity of the undercapacity used among the suppliers of the network.

  • Number of links activated among the suppliers and plants; the average number of links is an index of complexity and costs of the collaboration among the suppliers.

The performance measures are obtained by terminating statistical approach with a number of replications that assures a 5% of confidence interval with a 95% of confidence degree.

5 Numerical results

The first analysis of the results concerns the development of the analysis of variance (ANOVA with α = 0.05); ANOVA is used for determining the most significant factor that affects the system performance. The main effects of the demand fluctuation, supplier reliability, demand-capacity difference, and network dimensions are presented in Tables 3 and 4. Table 3 presents the ANOVA for the overcapacity, while Table 4 presents the ANOVA for the undercapacity. The network dimension does not influence the over- and undercapacity measure for the base model. This is obvious because in the basic model, there is no sharing between suppliers. The network dimension does not influence the overcapacity for the limited model and has a lower influence on the undercapacity measure. These results highlight that the performance measures of the limited flexibility model are more robust to the network dimension. For the other models, all the sources of variance analyzed are significant. Then, the evaluation of the source of variance is relevant for the design and the performance of the network.

Table 3 ANOVA for overcapacity
Table 4 ANOVA for undercapacity

Figures 4 and 5 show the impact of the main effects on the over- and undercapacity. The factor more important is the supplier reliability on the overcapacity measure. Then, the demand variability and the demand-capacity misalignment respectively influence the overcapacity measure. The range of the values assumed by the factors shows how the game models reduce the impact of the factors closer to the best model (full flexibility) than the limited flexibility.

Fig. 2
figure 2

a Utility function woman-man. b Utility function man-woman

Fig. 3
figure 3

a Utility function woman-man. b Utility function man-woman

The impact of the factors on the undercapacity measure is lower than the effect on the overcapacity measure. The demand-capacity misalignment is the more important factor, while the supplier reliability and demand variability have the same impact on this measure. In this case, the game models reduce the impact of the factors compared to the other, especially compared to the full flexibility model.

Figures 6 and 7 show the performance of overcapacity over all the cases simulated (see Table 2) compared to the benchmark model.

Fig. 4
figure 4

Main effects on overcapacity

Fig. 5
figure 5

Main effects on undercapacity

Fig. 6
figure 6

Network 6

Fig. 7
figure 7

Network 12

The better reduction for the models is obtained when the demand fluctuation is higher (points 3, 6, 12, 19, and 31). The low difference compared to the benchmark model occurs when the demand fluctuation is very low (points 4, 7, 13, 17, and 22). The game models lead to better results than the limited flexibility for all cases tested. Moreover, the game models in several cases are very close to the performance of the full flexibility model.

The behavior is the same when the network consists of 12 participants with a higher reduction of the overcapacity to pursue the satisfaction level of the customers.

The full flexibility and game models gain greater benefit from the extension of the network than the limited flexibility model.

Table 5 reports the average links activated among suppliers and plants for each model tested. Full flexibility leads to better performance but with a higher number of links that means more complexity and more costs. The proposed game models allow improving the performance with a slight increment of links compared to the limited flexibility model. Then the benefits described above of the game models are obtained with complexity and costs of the network comparable with the limited flexibility approach. This result is robust to the change of the network dimension.

Table 5 Number of links activated

The coefficient of variation (CV) measures the fluctuation of the links established in the network.

The full flexible model that exploits a high number of connections has a low CV value.

The game models have a CV value greater than the flexibility case for the network with 6 participants, while the values are very similar in the case of the network with 12 participants. This means that the game model adapts the number of links established to the conditions to improve the performance.

The numerical results demonstrated the effectiveness of the game theory model in mitigating the demand uncertainty, suppliers’ reliability and misalignment between capacity, and demand with results comparable with long chain or additional flexibility (limited flexibility) proposed in the literature [4, 15, 17]. Compared to the models proposed in the literature, the game model solves the capacity configuration problem with less time and computations. Furthermore, the models proposed in the literature provide a static structure of the network, while the game model provides a dynamic solution adapted to the conditions studied.

6 Conclusions and future development

The game theory approaches were not considered to improve the flexibility in production networks in the literature. This research proposes the use of the Gale-Shapley algorithm to support the decisions about the links among plants and suppliers. The proposed algorithm works both for design and reconfiguring the network. In response to the first research question “Is the Gale-Shapley algorithm adaptable effectively to design and reconfigure a flexible structure?” The model developed to adapt the Gale-Shapley algorithm to the design and reconfigure the network demonstrated by the simulation is a promising approach in this context. However, in response to the second research question: “What is the performance and the robustness compared to the full and long chain flexibility approaches?”.

The simulation results have demonstrated that the model proposed improves the performance in terms of over- and undercapacity compared to the long chain with a moderate increment of the average number of links activated. The improvements are robust to changes in the factors analyzed. Moreover, the game models allow reducing the impact of the factor’s variations on the performance of the network. The utility functions proposed for the game model lead to the same results.

6.1 Managerial implications

This study is motivated to propose a model with moderate numerical complexity that works with different dimensions of the network with the same performance level of the long chain proposed as the best model in the literature. The results suggest that the Gale-Shapley model can support the design and reconfiguration of a network. The manager can use the simulation results to design the production network under different conditions evaluating in advance the performance measures and the complexity of the network (number of links). The managers can include other parameters in the decision model of the Gale-Shapley algorithm considering these parameters in the utility functions. This allows extending the proposed model to many applications.

6.2 Limitations and future research

The main limitations of the presented research to investigate in future research activities are the following. The first issue is to consider the reconfiguration activities of the suppliers to provide more demand types. Another issue concerns the introduction of the costs link activated in the game theory model. Therefore, the utility functions of the Gale-Shapley algorithm will include the costs of the suppliers and the link between suppliers and customers.