# An Application of Stochastic Programming in Solving Capacity Allocation and Migration Planning Problem under Uncertainty

Authors: Yin-Yann Chen; Hsiao-Yao Fan
Journal: Mathematical Problems in Engineering
 (2015)

---

## Abstract

The semiconductor packaging and testing industry, which utilizes high-technology manufacturing processes and a variety of machines, belongs to an uncertain make-to-order (MTO) production environment. Order release particularly originates from customer demand; hence, demand fluctuation directly affects capacity planning. Thus, managing capacity allocation is a difficult endeavor. This study aims to determine the best capacity allocation with limited resources to maximize the net profit. Three bottleneck stations in the semiconductor packaging and testing process are mainly investigated, namely, die bond (DB), wire bond (WB), and molding (MD) stations. Deviating from previous studies that consider the deterministic programming model, customer demand in the current study is regarded as an uncertain parameter in formulating a two-stage scenario-based stochastic programming (SP) model. The SP model seeks to respond to sharp demand fluctuations. Even if future demand is uncertain, migration decision for machines and tools will still obtain better robust results for various demand scenarios. A hybrid approach is proposed to solve the SP model. Moreover, two assessment indicators, namely, the expected value of perfect information (EVPI) and the value of the stochastic solution (VSS), are adopted to compare the solving results of the deterministic planning model and stochastic programming model. Sensitivity analysis is performed to evaluate the effects of different parameters on net profit.


---

## Body

## 1. Introduction

The semiconductor packaging and testing industry belongs to a flow line environment. The operating procedure of this industry indicates that the die bond (DB), wire bond (WB), and molding (MD) stations are the three bottleneck stations in the manufacturing process. Consequently, capital expenditure on equipment for the DB, WB, and MD stations results in high purchasing cost. In machine utilization, the limitations of machine type and product category affect the output per hour. Given the multifactory and multiline environment of this industry, demand uncertainty and inappropriate production planning result in wasteful or insufficient machine capacity in all lines. Therefore, this research investigates the DB, WB, and MD stations in the semiconductor packaging and testing industry as the objects of the study.The best resource configuration and capacity allocation decision in the semiconductor packaging and testing industry can effectively utilize all resources in all production lines, as well as assisting planners in reducing the readjustment of the production scheduling to efficiently accomplish order allocations as a response to substantial changes in demand. Such decision can also indirectly reduce the migration cost of machines and tools. Therefore, this study aims to investigate the capacity allocation and migration planning problem by considering demand uncertainty to solve the current problems and challenges faced by the semiconductor packaging and testing industry.The importance of capacity planning to semiconductor packaging and testing industry is discovered based on the aforementioned background and motivation. Thus, the current study aims to attempt capacity allocation and resource configuration planning at the same time for multiperiod order demands, to improve the current capacity plan being separately implemented by packaging and testing factories and consideration of a single period and to determine the proper machine migration and capacity allocation decision.Demand in packaging and testing factories fluctuates because of different limitations in capacity planning and the make-to-order (MTO) production environment. Therefore, deviating from previous studies that consider the deterministic programming model, the current study employs demand as an uncertain factor to solve the problem through a two-stage stochastic programming (SP) model. The feasibility of the capacity planning method proposed in this study is also demonstrated through a practical case study. Moreover, based on the different parameters change, sensitivity analysis for the stochastic programming model is provided, to understand if capacity planning will be affected by different scenarios, demands, migration costs of machines and tools, sale prices of products, flexibility of capacity migration, and other factors.This paper is organized as follows. Section2 reviews the related literature. Section 3 establishes the definition of the capacity planning problem of the semiconductor packaging and testing industry, as well as the development of a two-stage stochastic programming model and the proposed hybrid approach. Section 4 discusses the application and analysis of a certain large-scale semiconductor packaging and testing factory case. Section 5 provides the conclusion of this study.


## 2. Literature Review

### 2.1. Overview of the Semiconductor Packaging and Testing Industry Characteristics

Semiconductor products currently comprise four categories, namely, integrated circuit (IC), discrete, sensor, and optoelectronics. However, this study aims to investigate the IC category. The IC manufacturing process with vertical integration features has front- and back-end processes. The upstream to downstream processes of the target industry cover the following five steps: IC design, mask making, IC making, chip packaging, and chip testing.The manufacturing process and production characteristics of the semiconductor packaging and testing industry are described as follows.


#### 2.1.1. Make to Order

The semiconductor packaging and testing industry prepares materials based on orders placed by customers. Thereafter, production proceeds based on customers’ needs and services, thereby preventing the industry from predicting the demand in advance. Furthermore, demand forecasting for this industry cannot be learned from past experience. Accordingly, this study considers the demand to be uncertain and expresses fluctuations in customer needs through different scenarios. This consideration will avoid insufficient or wasted capacity during the production while addressing customer needs and maximizing net profit.The production in the IC packaging and testing industry is customer-oriented. Product categories are diversified based on different customer needs. Packaging types can be divided into lead frame package, ball grid array, flip chip, system in package, and multichip packages. Moreover, each packaging type is divided into various product types because of the use of different chip sizes or pin numbers. Product types also have different capacity constraints.


#### 2.1.2. Flow Shop

In an IC packaging and testing factory, an order is often divided into several work orders. Figure1 shows that each work order is manufactured based on the production flow. Meanwhile, IC packaging and testing factories have multiple production lines. For example, a certain large-scale domestic packaging and testing factory has approximately 25 lines. This study only investigates the bottleneck stations in these factories, namely, the DB, WB, and MD stations. It is described as a flow shop production environment. Thus, products will enter the WB station after leaving the DB station. After the products are processed in the WB station, they eventually enter the MD station. Therefore, products have sequential dependencies in the factory area.Figure 1
Production flow of semiconductor packaging and testing factory.


#### 2.1.3. Unrelated Parallel Machine

Given the rapid manner by which products are updated, process changes and equipment upgrade will compel semiconductor packaging and testing factories to frequently purchase new or different brands of machines to respond to market changes. Having different machine types and brands leads to the presence of different grades of machines in the production line, thereby resulting in the production pattern of unrelated parallel machines. When managements arrange orders, they exert effort to satisfy customer needs and meet the maximal service level. In addition, they manufacture by utilizing machines with the highest capacity. Hence, they first move the machines and allocate the proper machines in groups to avoid failure in production caused by inconsistencies in machine types. Most machines for the semiconductor packaging and testing industry are movable. For domestic IC packaging and testing factories, the number of moving machines reaches approximately 60 each month.


### 2.2. Capacity Planning

Karabuk and Wu [1] indicate that capacity planning can be described as an iterative process between the following two main components: (1) capacity expansion: given projected product demands, identify the required manufacturing technologies and their capacity levels to be physically expanded or outsourced through the planning period; (2) capacity configuration: determine which facility is to be configured with which technologies mix. The overall objective is to meet a revenue model based on strategic demand planning (which blends demand forecasting and proactive market development strategies). This objective can be viewed as meeting projected demands with minimized total costs.Chen et al. [2] present a capacity allocation and expansion problem of thin film transistor liquid crystal display (TFT-LCD) manufacturing in the multisite environment. The objective is to simultaneously seek an optimal capacity allocation plan and capacity expansion policy under single-stage, multigeneration, and multisite structures. Capacity allocation decides on profitable product mixes and allocated production quantities of each product group at each production site. Capacity expansion is concerned with determining the timing, types, and sizes of capacity investments, especially in the acquisition of auxiliary tools. A mixed integer linear programming (MILP) is proposed, which considers many practical characteristics. Finally, an industrial case study modified from a Taiwanese TFT-LCD manufacturer is illustrated and sensitivity analysis of some influential parameters is also addressed.The foundry is an industry whose demand varies rapidly and whose manufacturing process is quite complicated. Chen et al. [3] explore issues on midterm capacity planning for an increment strategy of the number of auxiliary tools—“photo mask” to increase the flexibility of production. The related decisions include how to allocate appropriately the forecast demands of products among multiple sites and how to decide on the production quantities of products in each site after receiving customer-confirmed orders. By constructing the mathematical programming model of capacity planning, the rates of capacity utilization and customer order fulfillment are found to be effectively enhanced by adding new masks to increase production flexibility.Lin et al. [4] study strategic capacity planning problems under demand uncertainties in TFT-LCD industry. Demand forecasts are usually inaccurate and vary rapidly over time. Their research objective is to seek a capacity allocation and expansion policy that is robust to demand uncertainties. Special characteristics of TFT-LCD manufacturing systems are considered. A scenario-based two-stage stochastic programming model for strategic capacity planning under demand uncertainties is proposed. Comparing to the deterministic approach, their stochastic model significantly improves system robustness.Lin et al. [5] refer to capacity planning as the process of simultaneously implementing a robust capacity allocation plan and capacity expansion policy across multiple sites against stochastic demand. Their study constructs a stochastic dynamic programming (SDP) model with an embedded linear programming (LP) to generate a capacity planning policy as the demand in each period is revealed and updated. Numerical results are illustrated to prove the feasibility and robustness of the proposed SDP model.


### 2.3. Stochastic Programming

Given that demand uncertainty is considered, this paper aims to formulate a stochastic programming model for solving capacity allocation and migration planning problem. Dantzig [6] divided stochastic programming into two types: two-stage stochastic programming and multistage stochastic programming. Uribe et al. [7] indicated that the decision variable of two-stage stochastic programming consists of two types: “here and now” and “wait and see.” Here and now decision in the first stage refers to decision making when all information is unknown. Wait and see decision in the second stage refers to decision making after all information has been fully revealed. Thus, decision variables for the two-stage stochastic programming are a dependent issue, and the results are more robust.Two-stage stochastic programming can be illustrated through a scenario tree. Figure2 shows that the time point revealing uncertain factors is t
=
k. The time point is used to divide decisions into two stages. The first-stage decision is from t
=
1 to t
=
k. The results affect the decisions after t
=
k
+
1. Thus, they extend many branches. Moreover, each branch represents a kind of scenario and a group of decision variables in the second stage.Figure 2
Illustration of two-stage stochastic programming.Listeş and Dekker [8] present a stochastic programming based approach by which a deterministic location model for product recovery network design may be extended to explicitly account for the uncertainties. They apply the stochastic models to a representative real case study on recycling sand from demolition waste in Netherlands. In Salema et al. [9] work, the design of a reverse distribution network is studied. A generalized model is proposed. It contemplates the design of a generic reverse logistics network where capacity limits, multiproduct management, and uncertainty on product demands and returns are considered. A mixed integer formulation is developed which is solved using standard B&B techniques. The model is applied to an illustrative case.Lee et al. [10] propose a stochastic programming based approach to account for the design of sustainable logistics network under uncertainty. A solution approach integrating the sample average approximation scheme with an importance sampling strategy is developed. A case study involving a large-scale sustainable logistics network in Asia Pacific region is presented to demonstrate the significance of the developed stochastic model. Cardona-Valdés et al. [11] consider the design of a two-echelon production distribution network with multiple manufacturing plants, customers, and a set of candidate distribution centers. The main contribution of the study is to extend the existing literature by incorporating the demand uncertainty of customers within the distribution center location and transportation mode allocation decisions, as well as providing a network design satisfying both economical and service quality objectives of the decision-maker.In Kara and Onut [12] study, a two-stage stochastic revenue-maximization model is presented to determine a long-term strategy under uncertainty for a large-scale real-world paper recycling company. This network design problem includes optimal recycling center locations and optimal flow amounts between the nodes in the multifacility environment. The proposed model is formulated with two-stage stochastic mixed integer and robust programming approaches. Pishvaee et al. [13] develop a stochastic programming model for an integrated forward/reverse logistics network design under uncertainty. An efficient deterministic mixed integer linear programming model is developed for integrated logistics network design to avoid the suboptimality caused by the separate design of the forward and reverse networks. Then the stochastic counterpart of the proposed MILP model is developed by using scenario-based stochastic approach. Numerical results show the power of the proposed stochastic model in handling data uncertainty.In Amin and Zhang [14], a closed-loop supply chain network is investigated which includes multiple plants, collection centers, demand markets, and products. A mixed integer linear programming (MILP) model is proposed that minimizes the total cost. The model is extended to consider environmental factors by weighed sums and ε-constraint methods. In addition, the impact of demand and return uncertainties on the network configuration is analyzed by scenario-based stochastic programming. Computational results show that the model can handle demand and return uncertainties, simultaneously.Ramezani et al. [15] present a stochastic multiobjective model for forward/reverse logistic network design under an uncertain environment including three echelons in forward direction (i.e., suppliers, plants, and distribution centers) and two echelons in backward direction (i.e., collection centers and disposal centers). The authors demonstrate a method to evaluate the systematic supply chain configuration maximizing the profit, customer responsiveness, and quality as objectives of the logistic network. Mohammadi Bidhandi and Rosnah [16] propose an integrated model and a modified solution method for solving supply chain network design problems under uncertainty. The stochastic supply chain network design model is provided as a two-stage stochastic programming. The main uncertain parameters are the operational costs, the customer demand, and capacity of the facilities. In the improved solution method, the sample average approximation technique is integrated with the accelerated Benders’ decomposition approach to improvement of the mixed integer linear programming solution phase.Sazvar et al. [17] develop a stochastic mathematical model and propose a new replenishment policy in a centralized supply chain for deteriorating items. In this model, they consider inventory and transportation costs, as well as the environmental impacts under uncertain demand. The best transportation vehicles and inventory policy are determined by finding a balance between financial and environmental criteria. A linear mathematical model is developed and a numerical example from the real world is presented to demonstrate its applicability and effectiveness. Lin et al. [5] construct a stochastic dynamic programming model with an embedded linear programming to generate a capacity planning policy as the demand in each period is revealed and updated. Using the backward induction algorithm, the model considers several capacity expansion and budget constraints to determine a robust and dynamic capacity expansion policy in response to newly available demand information. Numerical results are also illustrated to prove the feasibility and robustness of the proposed SDP model compared to the traditional deterministic capacity planning model currently applied by the industry.A distributed energy system is a multi-input and multioutput energy system with substantial energy and economic and environmental benefits. The optimal design of such a complex system under energy demand and supply uncertainty poses significant challenges. Zhou et al. [18] propose a two-stage stochastic programming model for the optimal design of distributed energy systems. A two-stage decomposition based solution strategy is used to solve the optimization problem with genetic algorithm performing the search on the first-stage variables and a Monte Carlo method dealing with uncertainty in the second stage. Detailed computational results are presented and compared with those generated by a deterministic model.One of the most challenging issues for the semiconductor testing industry is how to deal with capacity planning and resource allocation simultaneously under demand and technology uncertainty. In addition, capacity planners require a tradeoff among the costs of resources with different processing technologies, while simultaneously considering resources to manufacture products. The study of K.-J. Wang and S.-M. Wang [19] focuses on the decisions pertaining to (i) the simultaneous resource portfolio/investment and allocation plan, (ii) the most profitable orders from pending ones in each time bucket under demand and technology uncertainty, and (iii) the algorithm to efficiently solve the stochastic and mixed integer programming problem. The authors develop a constraint-satisfaction based genetic algorithm to resolve the above issues simultaneously.Dynamic programming approach is a class of optimal design tools, such as reinforcement learning. Liu et al. [20] proposed an online reinforcement learning algorithm for a class of affine multiple input and multiple output (MIMO) nonlinear discrete-time systems with unknown functions and disturbances. Liu et al. [21] addressed an adaptive fuzzy optimal control design for a class of unknown nonlinear discrete-time systems. The controlled systems are in a strict-feedback frame and contain unknown functions and nonsymmetric dead-zone. Wang et al. [22] developed a finite-horizon neurooptimal tracking control strategy for a class of discrete-time nonlinear systems. Chen et al. [23] studied an adaptive tracking control for a class of nonlinear stochastic systems with unknown functions. Tong et al. [24] proposed two adaptive fuzzy output feedback control approaches for a class of uncertain stochastic nonlinear strict-feedback systems without the measurements of the states.Previous studies have surveyed about capacity planning issue, but only a few studies have focused on the capacity allocation problem considering machine/tool migration planning and demand uncertainty simultaneously. This paper aims to determine the best capacity allocation with limited resources to achieve net profit maximization in the semiconductor packaging and testing industry. Customer demand is regarded as an uncertain parameter in formulating a two-stage scenario-based stochastic programming model. This model seeks to respond to sharp demand fluctuations. Even if future demand is uncertain, migration decision for machines and tools will still obtain better robust results for various demand scenarios. Sensitivity analysis is also performed to evaluate the effect of different parameters on net profit.


## 2.1. Overview of the Semiconductor Packaging and Testing Industry Characteristics

Semiconductor products currently comprise four categories, namely, integrated circuit (IC), discrete, sensor, and optoelectronics. However, this study aims to investigate the IC category. The IC manufacturing process with vertical integration features has front- and back-end processes. The upstream to downstream processes of the target industry cover the following five steps: IC design, mask making, IC making, chip packaging, and chip testing.The manufacturing process and production characteristics of the semiconductor packaging and testing industry are described as follows.


### 2.1.1. Make to Order

The semiconductor packaging and testing industry prepares materials based on orders placed by customers. Thereafter, production proceeds based on customers’ needs and services, thereby preventing the industry from predicting the demand in advance. Furthermore, demand forecasting for this industry cannot be learned from past experience. Accordingly, this study considers the demand to be uncertain and expresses fluctuations in customer needs through different scenarios. This consideration will avoid insufficient or wasted capacity during the production while addressing customer needs and maximizing net profit.The production in the IC packaging and testing industry is customer-oriented. Product categories are diversified based on different customer needs. Packaging types can be divided into lead frame package, ball grid array, flip chip, system in package, and multichip packages. Moreover, each packaging type is divided into various product types because of the use of different chip sizes or pin numbers. Product types also have different capacity constraints.


### 2.1.2. Flow Shop

In an IC packaging and testing factory, an order is often divided into several work orders. Figure1 shows that each work order is manufactured based on the production flow. Meanwhile, IC packaging and testing factories have multiple production lines. For example, a certain large-scale domestic packaging and testing factory has approximately 25 lines. This study only investigates the bottleneck stations in these factories, namely, the DB, WB, and MD stations. It is described as a flow shop production environment. Thus, products will enter the WB station after leaving the DB station. After the products are processed in the WB station, they eventually enter the MD station. Therefore, products have sequential dependencies in the factory area.Figure 1
Production flow of semiconductor packaging and testing factory.


### 2.1.3. Unrelated Parallel Machine

Given the rapid manner by which products are updated, process changes and equipment upgrade will compel semiconductor packaging and testing factories to frequently purchase new or different brands of machines to respond to market changes. Having different machine types and brands leads to the presence of different grades of machines in the production line, thereby resulting in the production pattern of unrelated parallel machines. When managements arrange orders, they exert effort to satisfy customer needs and meet the maximal service level. In addition, they manufacture by utilizing machines with the highest capacity. Hence, they first move the machines and allocate the proper machines in groups to avoid failure in production caused by inconsistencies in machine types. Most machines for the semiconductor packaging and testing industry are movable. For domestic IC packaging and testing factories, the number of moving machines reaches approximately 60 each month.


## 2.1.1. Make to Order

The semiconductor packaging and testing industry prepares materials based on orders placed by customers. Thereafter, production proceeds based on customers’ needs and services, thereby preventing the industry from predicting the demand in advance. Furthermore, demand forecasting for this industry cannot be learned from past experience. Accordingly, this study considers the demand to be uncertain and expresses fluctuations in customer needs through different scenarios. This consideration will avoid insufficient or wasted capacity during the production while addressing customer needs and maximizing net profit.The production in the IC packaging and testing industry is customer-oriented. Product categories are diversified based on different customer needs. Packaging types can be divided into lead frame package, ball grid array, flip chip, system in package, and multichip packages. Moreover, each packaging type is divided into various product types because of the use of different chip sizes or pin numbers. Product types also have different capacity constraints.


## 2.1.2. Flow Shop

In an IC packaging and testing factory, an order is often divided into several work orders. Figure1 shows that each work order is manufactured based on the production flow. Meanwhile, IC packaging and testing factories have multiple production lines. For example, a certain large-scale domestic packaging and testing factory has approximately 25 lines. This study only investigates the bottleneck stations in these factories, namely, the DB, WB, and MD stations. It is described as a flow shop production environment. Thus, products will enter the WB station after leaving the DB station. After the products are processed in the WB station, they eventually enter the MD station. Therefore, products have sequential dependencies in the factory area.Figure 1
Production flow of semiconductor packaging and testing factory.


## 2.1.3. Unrelated Parallel Machine

Given the rapid manner by which products are updated, process changes and equipment upgrade will compel semiconductor packaging and testing factories to frequently purchase new or different brands of machines to respond to market changes. Having different machine types and brands leads to the presence of different grades of machines in the production line, thereby resulting in the production pattern of unrelated parallel machines. When managements arrange orders, they exert effort to satisfy customer needs and meet the maximal service level. In addition, they manufacture by utilizing machines with the highest capacity. Hence, they first move the machines and allocate the proper machines in groups to avoid failure in production caused by inconsistencies in machine types. Most machines for the semiconductor packaging and testing industry are movable. For domestic IC packaging and testing factories, the number of moving machines reaches approximately 60 each month.


## 2.2. Capacity Planning

Karabuk and Wu [1] indicate that capacity planning can be described as an iterative process between the following two main components: (1) capacity expansion: given projected product demands, identify the required manufacturing technologies and their capacity levels to be physically expanded or outsourced through the planning period; (2) capacity configuration: determine which facility is to be configured with which technologies mix. The overall objective is to meet a revenue model based on strategic demand planning (which blends demand forecasting and proactive market development strategies). This objective can be viewed as meeting projected demands with minimized total costs.Chen et al. [2] present a capacity allocation and expansion problem of thin film transistor liquid crystal display (TFT-LCD) manufacturing in the multisite environment. The objective is to simultaneously seek an optimal capacity allocation plan and capacity expansion policy under single-stage, multigeneration, and multisite structures. Capacity allocation decides on profitable product mixes and allocated production quantities of each product group at each production site. Capacity expansion is concerned with determining the timing, types, and sizes of capacity investments, especially in the acquisition of auxiliary tools. A mixed integer linear programming (MILP) is proposed, which considers many practical characteristics. Finally, an industrial case study modified from a Taiwanese TFT-LCD manufacturer is illustrated and sensitivity analysis of some influential parameters is also addressed.The foundry is an industry whose demand varies rapidly and whose manufacturing process is quite complicated. Chen et al. [3] explore issues on midterm capacity planning for an increment strategy of the number of auxiliary tools—“photo mask” to increase the flexibility of production. The related decisions include how to allocate appropriately the forecast demands of products among multiple sites and how to decide on the production quantities of products in each site after receiving customer-confirmed orders. By constructing the mathematical programming model of capacity planning, the rates of capacity utilization and customer order fulfillment are found to be effectively enhanced by adding new masks to increase production flexibility.Lin et al. [4] study strategic capacity planning problems under demand uncertainties in TFT-LCD industry. Demand forecasts are usually inaccurate and vary rapidly over time. Their research objective is to seek a capacity allocation and expansion policy that is robust to demand uncertainties. Special characteristics of TFT-LCD manufacturing systems are considered. A scenario-based two-stage stochastic programming model for strategic capacity planning under demand uncertainties is proposed. Comparing to the deterministic approach, their stochastic model significantly improves system robustness.Lin et al. [5] refer to capacity planning as the process of simultaneously implementing a robust capacity allocation plan and capacity expansion policy across multiple sites against stochastic demand. Their study constructs a stochastic dynamic programming (SDP) model with an embedded linear programming (LP) to generate a capacity planning policy as the demand in each period is revealed and updated. Numerical results are illustrated to prove the feasibility and robustness of the proposed SDP model.


## 2.3. Stochastic Programming

Given that demand uncertainty is considered, this paper aims to formulate a stochastic programming model for solving capacity allocation and migration planning problem. Dantzig [6] divided stochastic programming into two types: two-stage stochastic programming and multistage stochastic programming. Uribe et al. [7] indicated that the decision variable of two-stage stochastic programming consists of two types: “here and now” and “wait and see.” Here and now decision in the first stage refers to decision making when all information is unknown. Wait and see decision in the second stage refers to decision making after all information has been fully revealed. Thus, decision variables for the two-stage stochastic programming are a dependent issue, and the results are more robust.Two-stage stochastic programming can be illustrated through a scenario tree. Figure2 shows that the time point revealing uncertain factors is t
=
k. The time point is used to divide decisions into two stages. The first-stage decision is from t
=
1 to t
=
k. The results affect the decisions after t
=
k
+
1. Thus, they extend many branches. Moreover, each branch represents a kind of scenario and a group of decision variables in the second stage.Figure 2
Illustration of two-stage stochastic programming.Listeş and Dekker [8] present a stochastic programming based approach by which a deterministic location model for product recovery network design may be extended to explicitly account for the uncertainties. They apply the stochastic models to a representative real case study on recycling sand from demolition waste in Netherlands. In Salema et al. [9] work, the design of a reverse distribution network is studied. A generalized model is proposed. It contemplates the design of a generic reverse logistics network where capacity limits, multiproduct management, and uncertainty on product demands and returns are considered. A mixed integer formulation is developed which is solved using standard B&B techniques. The model is applied to an illustrative case.Lee et al. [10] propose a stochastic programming based approach to account for the design of sustainable logistics network under uncertainty. A solution approach integrating the sample average approximation scheme with an importance sampling strategy is developed. A case study involving a large-scale sustainable logistics network in Asia Pacific region is presented to demonstrate the significance of the developed stochastic model. Cardona-Valdés et al. [11] consider the design of a two-echelon production distribution network with multiple manufacturing plants, customers, and a set of candidate distribution centers. The main contribution of the study is to extend the existing literature by incorporating the demand uncertainty of customers within the distribution center location and transportation mode allocation decisions, as well as providing a network design satisfying both economical and service quality objectives of the decision-maker.In Kara and Onut [12] study, a two-stage stochastic revenue-maximization model is presented to determine a long-term strategy under uncertainty for a large-scale real-world paper recycling company. This network design problem includes optimal recycling center locations and optimal flow amounts between the nodes in the multifacility environment. The proposed model is formulated with two-stage stochastic mixed integer and robust programming approaches. Pishvaee et al. [13] develop a stochastic programming model for an integrated forward/reverse logistics network design under uncertainty. An efficient deterministic mixed integer linear programming model is developed for integrated logistics network design to avoid the suboptimality caused by the separate design of the forward and reverse networks. Then the stochastic counterpart of the proposed MILP model is developed by using scenario-based stochastic approach. Numerical results show the power of the proposed stochastic model in handling data uncertainty.In Amin and Zhang [14], a closed-loop supply chain network is investigated which includes multiple plants, collection centers, demand markets, and products. A mixed integer linear programming (MILP) model is proposed that minimizes the total cost. The model is extended to consider environmental factors by weighed sums and ε-constraint methods. In addition, the impact of demand and return uncertainties on the network configuration is analyzed by scenario-based stochastic programming. Computational results show that the model can handle demand and return uncertainties, simultaneously.Ramezani et al. [15] present a stochastic multiobjective model for forward/reverse logistic network design under an uncertain environment including three echelons in forward direction (i.e., suppliers, plants, and distribution centers) and two echelons in backward direction (i.e., collection centers and disposal centers). The authors demonstrate a method to evaluate the systematic supply chain configuration maximizing the profit, customer responsiveness, and quality as objectives of the logistic network. Mohammadi Bidhandi and Rosnah [16] propose an integrated model and a modified solution method for solving supply chain network design problems under uncertainty. The stochastic supply chain network design model is provided as a two-stage stochastic programming. The main uncertain parameters are the operational costs, the customer demand, and capacity of the facilities. In the improved solution method, the sample average approximation technique is integrated with the accelerated Benders’ decomposition approach to improvement of the mixed integer linear programming solution phase.Sazvar et al. [17] develop a stochastic mathematical model and propose a new replenishment policy in a centralized supply chain for deteriorating items. In this model, they consider inventory and transportation costs, as well as the environmental impacts under uncertain demand. The best transportation vehicles and inventory policy are determined by finding a balance between financial and environmental criteria. A linear mathematical model is developed and a numerical example from the real world is presented to demonstrate its applicability and effectiveness. Lin et al. [5] construct a stochastic dynamic programming model with an embedded linear programming to generate a capacity planning policy as the demand in each period is revealed and updated. Using the backward induction algorithm, the model considers several capacity expansion and budget constraints to determine a robust and dynamic capacity expansion policy in response to newly available demand information. Numerical results are also illustrated to prove the feasibility and robustness of the proposed SDP model compared to the traditional deterministic capacity planning model currently applied by the industry.A distributed energy system is a multi-input and multioutput energy system with substantial energy and economic and environmental benefits. The optimal design of such a complex system under energy demand and supply uncertainty poses significant challenges. Zhou et al. [18] propose a two-stage stochastic programming model for the optimal design of distributed energy systems. A two-stage decomposition based solution strategy is used to solve the optimization problem with genetic algorithm performing the search on the first-stage variables and a Monte Carlo method dealing with uncertainty in the second stage. Detailed computational results are presented and compared with those generated by a deterministic model.One of the most challenging issues for the semiconductor testing industry is how to deal with capacity planning and resource allocation simultaneously under demand and technology uncertainty. In addition, capacity planners require a tradeoff among the costs of resources with different processing technologies, while simultaneously considering resources to manufacture products. The study of K.-J. Wang and S.-M. Wang [19] focuses on the decisions pertaining to (i) the simultaneous resource portfolio/investment and allocation plan, (ii) the most profitable orders from pending ones in each time bucket under demand and technology uncertainty, and (iii) the algorithm to efficiently solve the stochastic and mixed integer programming problem. The authors develop a constraint-satisfaction based genetic algorithm to resolve the above issues simultaneously.Dynamic programming approach is a class of optimal design tools, such as reinforcement learning. Liu et al. [20] proposed an online reinforcement learning algorithm for a class of affine multiple input and multiple output (MIMO) nonlinear discrete-time systems with unknown functions and disturbances. Liu et al. [21] addressed an adaptive fuzzy optimal control design for a class of unknown nonlinear discrete-time systems. The controlled systems are in a strict-feedback frame and contain unknown functions and nonsymmetric dead-zone. Wang et al. [22] developed a finite-horizon neurooptimal tracking control strategy for a class of discrete-time nonlinear systems. Chen et al. [23] studied an adaptive tracking control for a class of nonlinear stochastic systems with unknown functions. Tong et al. [24] proposed two adaptive fuzzy output feedback control approaches for a class of uncertain stochastic nonlinear strict-feedback systems without the measurements of the states.Previous studies have surveyed about capacity planning issue, but only a few studies have focused on the capacity allocation problem considering machine/tool migration planning and demand uncertainty simultaneously. This paper aims to determine the best capacity allocation with limited resources to achieve net profit maximization in the semiconductor packaging and testing industry. Customer demand is regarded as an uncertain parameter in formulating a two-stage scenario-based stochastic programming model. This model seeks to respond to sharp demand fluctuations. Even if future demand is uncertain, migration decision for machines and tools will still obtain better robust results for various demand scenarios. Sensitivity analysis is also performed to evaluate the effect of different parameters on net profit.


## 3. Capacity Planning of the Semiconductor Packaging and Testing Industry

### 3.1. Characteristics of Capacity Planning of the Semiconductor Packaging and Testing Industry

This study aims to determine machine migration, tool migration in all production lines, resource configuration, capacity allocation, and product flow under demand uncertainty to achieve net profit maximization.


#### 3.1.1. Resource Configuration

The manufacturing process entails that a product should sequentially go through the DB, WB, and MD stations for assembly-line production. The product considers the machine type in resource configuration during the DB and WB stages. However, three resources, namely, machine type, tool type, and material category, are considered in the MD stage. Figure3 shows that product 1 is manufactured in machine k
1 or k
2 in the DB station. This product is then processed in machine k
2 or k
3 in the WB station. Thereafter, the product is manufactured in the MD station through k
1
+
n
1
+
m
4 or k
2
+
n
2
+
m
4.Figure 3
Illustration of resource configuration.


#### 3.1.2. Product Flow

This study disregards defective products and only considers production through the three sequential stages. Moreover, product flow balance must be maintained in the production line. Hence, the total product input must equal the final total output. For example, the product input for product 1 is 1,000 units. Furthermore, 400 and 600 units are produced in lines 1 and 2, respectively. After production through the three sequential stages, the final total output remains as 1,000 units.


#### 3.1.3. Capacity Allocation

The capacity planning of all received orders is executed based on the current existing resources in all production stages. A product is not limited to the same production line during the entire production process; that is, a product can be manufactured in the different lines through three production stages. For example, a company has two lines, if the input of product 1 is 1,000 units. Take line 1 for explanation. Firstly, 400 units are manufactured in the DB station using machinek
1 and 600 units using machine k
2. Thereafter, 400 units are manufactured in the WB station using machine k
2 and 200 units using machine k
3. Finally, 200 units are manufactured in the MD station using resource configuration k
1
+
n
1
+
m
4 and 300 units using k
2
+
n
2
+
m
4. Thus, 500 units of product 1 can be made after the three production stages for this product are completed sequentially in line 1. The remaining 500 units are allocated to all production stages in line 2 for manufacturing.


#### 3.1.4. Machine and Tool Migration

The presence of several production lines and machines with different technological capability in a company will result in variations in the production capacities of all lines. Machines can be moved to all lines in each production stage, and tools can be moved to all lines in the MD stage based on the total number of available machines and tools.


### 3.2. Mathematical Programming of Capacity Planning Problem for the Semiconductor Packaging and Testing Industry under Demand Uncertainty

A mathematical model of two-stage scenario-based stochastic programming is formulated by considering customer demand as an uncertain parameter. This study aims to respond to sharp demand fluctuation. Even if future demand is uncertain, machine and tool migration decisions are robust results for all demand scenarios.


#### 3.2.1. Definition and Description of Capacity Planning Problem under Demand Uncertainty

This study uses a scenario tree to illustrate the uncertain factor (Figure4). Machine and tool migration decisions are deemed to be the decisions made in the first stage. The results of these decisions remain constant with the varying customer demands. Moreover, the second-stage capacity allocation decisions must be made based on the first-stage decision results. The results in the second-stage change with the varying customer demands. In this study, two-stage decisions should be optimally determined to achieve net profit maximization.Figure 4
Diagrammatic sketch of scenario tree of the uncertain factor.(1) First-Stage Decision: Robust Capacity Migration Decision That Considers Demand Uncertainty. Given three demand scenarios, each type of machine and tool is considered to determine when and what quantity of machines and tools are migrated between lines in the production stage. Hence, capacity migration decision must be made in advance to consider the robust decision under demand uncertainty as being unrelated to different demand scenarios.(2) Second-Stage Decision: Capacity Allocation Decision after All Demand Information Has Been Completely Revealed. The following factors are determined after a certain demand scenario occurs: (1) production quantity for each product in each line in all production stages during each period, (2) transportation quantity between the different production stages, (3) sales volume of each product in each period for each customer, and (4) customer service level. Therefore, capacity allocation decision is closely related to the demand scenario. According to the capacity migration result in the first stage, the optimal capacity allocation decision can be determined once a specific demand scenario occurs.


#### 3.2.2. Two-Stage Stochastic Programming Model of Capacity Planning Problem

To solve the capacity planning problem under demand uncertainty, this study uses two-stage stochastic programming to construct a mathematical model. This section explains the indices, parameters, decision variables, objective function, and constraints.(1) Indices
c = customer (c
=
1,2
,
…
,
C).
i = product type (i
=
1,2
,
…
,
I).
l = production line (l
=
1,2
,
…
,
L).
s = production stage (s
=
1,2
,
…
,
S).
j = resource configuration (j
=
1,2
,
…
,
J).
m = material type (m
=
1,2
,
…
,
M).
k = machine type (k
=
1,2
,
…
,
K).
n = tool type (n
=
1
,
2
,
…
,
N).
t = time period (t
=
1,2
,
…
,
T).
r = scenario number (r
=
1
,
2
,
…
,
R).(2) Parameters(I) Demand Related Parameters
d
e
i
c
t
r = the demand quantity of customer c for product i in time t under scenario r.
p
r = probability value occurring in scenario r (∑
r
p
r
=
1).
p
r
i
c
t = sales price of customer c for product i in time t.(II) Machine Related Parameters
k
l
l
s
k = initial amount of machine k in line l at stage s.
k
u
l
s = maximum number of machines in line l at stage s.
k
s
i
j
s
k = required work hours of machine k used at stage s for manufacturing a unit of product i with resource configuration j.
k
a
s
k = available work hours of machine k at stage s.
k
b
l
l
′
s = machine migration capability from lines l to l
′ at stage s.(III) Tool Related Parameters
n
l
l
s
n = initial amount of tool n in line l at stage s.
n
u
l
s = maximum number of tools in line l at stage s.
n
s
i
j
s
n = required work hours of tool n used at stage s for manufacturing a unit of product i with resource configuration j.
n
a
s
n = available work hours of tool n at stage s.
n
b
l
l
′
s = tool migration capability from lines l to l
′ at stage s.(IV) Material Related Parameters
m
q
s
m
t = total available quantity of material m at stage s in time t.
m
s
i
j
s
m = consumption ratio of material m for manufacturing a unit of product i at stage s with resource configuration j.(V) Production Capability Related Parameter
t
f
i
j
s = production capability of product i at stage s with resource configuration j.(VI) Transportation Related Parameter
t
b
l
s
l
′
(
s
+
1
) = transportation capability from line l at stage s to line l
′ at stage s
+
1.(VII) Cost Parameters
v
c
i
l
j
s = production cost for manufacturing a unit of product i in line l at stage s with resource configuration j.
k
c
s = machine migration cost at stage s.
n
c
s = tool migration cost at stage s.(3) Decision Variables(I) First-Stage Decision Variables: Capacity Migration Decision
K
Q
l
s
k
t = the number of machines k for line l at stage s in time t.
K
M
l
l
′
s
k
t = the migration number of machines k from line l to line l
′ at stage s in time t.
N
Q
l
s
n
t = the number of tools n for line l at stage s in time t.
N
M
l
l
′
s
n
t = the migration number of tools n from line l to line l
′ at stage s in time t.(II) Second-Stage Decision Variables: Capacity Allocation Decision and Service Level
X
Q
i
l
j
s
t
r = production amounts of product i with resource configuration j for line l at stage s in time t under scenario r.
R
Q
i
l
j
s
l
′
j
′
(
s
+
1
)
t
r = transportation amounts of product i from line l with resource configuration j at stage s to line l
′ with resource configuration j
′ at stage (s
+
1) in time t under scenario r.
S
Q
i
c
t
r = sales amounts of product i for customer c in time t under scenario r.
S
L
c
r = service level for customer c under scenario r.(4) Objective Function. Consider the following:(1)
M
a
x
i
m
i
z
e
∑
r
p
r
∑
i
∑
c
∑
t
p
r
i
c
t
×
S
Q
i
c
t
r
-
∑
i
∑
l
∑
j
∑
s
∑
t
v
c
i
l
j
s
×
X
Q
i
l
j
s
t
r
-
∑
l
∑
l
′
∑
s
∑
k
∑
t
k
c
s
×
K
M
l
l
′
s
k
t
-
∑
l
∑
l
′
∑
s
∑
n
∑
t
n
c
s
×
N
M
l
l
′
s
n
t
.The above is the objective function of two-stage stochastic programming. It aims to obtain the optimal capacity planning decision to seek the maximization of net profit, as (1); net profit = (sales revenue − variable production cost) − machine migration cost − tool migration cost.(5) Constraints(I) First-Stage Constraints(a) Machine Migration Balance Constraints. Consider the following:(2)
K
Q
l
s
k
0
=
k
l
l
s
k
∀
l
,
s
,
k
,
(3)
K
Q
l
s
k
t
=
K
Q
l
s
k
t
-
1
-
∑
l
′
K
M
l
l
′
s
k
t
+
∑
l
′
K
M
l
′
l
s
k
t
∀
l
,
s
,
k
,
t
,
(4)
K
Q
l
s
k
t
≤
k
u
l
s
∀
l
,
s
,
k
,
t
,
(5)
K
M
l
l
′
s
k
t
≤
M
×
k
b
l
l
′
s
∀
l
,
l
′
,
s
,
k
,
t
.Constraint (2) shows the initial amount of machines in lines at each production stage; and constraint (3) indicates the number of machines required for lines at production stages in every period. This number of machines in the current period is equal to the number of machines in the previous period minus the number of machines moving to other lines plus the number of machines that migrated from other lines to this line. The total initial number of machines within the company must be equal to the total number of machines after being migrated between lines without increasing or reducing the number of machines. Constraint (4) expresses that the allocated number of machines should not be more than the available space in the shop-floor production line. In addition, constraint (5) considers if machines have capability to be migrated between lines. k
b
l
l
′
s refers to a binary parameter. 1 means machines can be migrated between production lines, and 0 means they cannot be migrated.(b) Tool Migration Balance Constraints. Consider the following:(6)
N
Q
l
s
n
0
=
n
l
l
s
n
∀
l
,
s
,
n
,
(7)
N
Q
l
s
n
t
=
N
Q
l
s
n
t
-
1
-
∑
l
′
N
M
l
l
′
s
n
t
+
∑
l
′
N
M
l
′
l
s
n
t
∀
l
,
s
,
n
,
t
,
(8)
N
Q
l
s
n
t
≤
n
u
l
s
∀
l
,
s
,
n
,
t
,
(9)
N
M
l
l
′
s
n
t
≤
M
×
n
b
l
l
′
s
∀
l
,
l
′
,
s
,
n
,
t
.Constraint (6) shows the initial amount of tools in lines at each production stage; and constraint (7) indicates the number of tools required for lines at production stages in every period. This number of tools in the current period is equal to the number of tools in the previous period minus the number of tools moving to other lines plus the number of tools that migrated from other lines to this line. The total initial number of tools within the company must be equal to the total number of tools after being migrated between lines without increasing or reducing the number of tools. Constraint (8) expresses that the allocated number of tools should not be more than the available space in the shop-floor production line. In addition, constraint (9) considers if tools have capability to be migrated between lines. n
b
l
l
′
s refers to a binary parameter. 1 means tools can be migrated between production lines, and 0 means they cannot be migrated.(c) Domain Restriction for First-Stage Decision Variables. Consider the following:(10)
K
Q
l
s
k
t
,
K
M
l
l
′
s
k
t
,
N
Q
l
s
n
t
,
N
M
l
l
′
s
n
t
∈
i
n
t
e
g
e
r
∀
l
,
s
,
k
,
n
,
t
.Constraint (10) shows the domain of variables, which indicates the characteristics of its integer variables.(II) Second-Stage Constraints(a) Production and Transportation Balance Constraints. Consider the following:(11)
X
Q
i
l
j
s
t
r
=
∑
l
′
∑
j
′
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
∀
i
,
l
,
j
,
s
=
1
,
…
S
-
1
,
t
,
r
,
(12)
∑
l
′
∑
j
′
R
Q
i
l
′
j
′
s
-
1
l
j
s
t
r
=
X
Q
i
l
j
s
t
r
∀
i
,
l
,
j
,
s
=
2
,
…
,
S
,
t
,
r
.Overall production and transportation must satisfy line flow balance, as shown in constraints (11) and (12). The allocated production amounts in a certain line at this stage should be equal to the total amounts that are transported from this line to all lines at the next stage. On the contrary, the total amounts that are transported from all lines at the previous stage to a certain line at the current stage should be equal to the allocated production amounts in this line.(b) Capacity Constraints. Consider the following:(13)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
k
s
i
j
s
k
≤
K
Q
l
s
k
t
×
k
a
s
k
∀
l
,
s
,
k
,
t
,
r
,
(14)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
n
s
i
j
s
n
≤
N
Q
l
s
n
t
×
n
a
s
n
∀
l
,
s
,
n
,
t
,
r
.For capacity constraints, constraints (13) and (14) indicate that the production amounts multiplied by work hours of machines or tools consumed should not exceed the number of machines or tools multiplied by available work hours of a unit of machine or tool. In short, the sum of work hours required for each product in available machine or tool should not be more than the total available resource limit of the company.(c) Material Constraint. Consider the following:(15)
∑
i
∑
l
∑
j
X
Q
i
l
j
s
t
r
×
m
s
i
j
s
m
≤
m
q
s
m
t
∀
s
,
m
,
t
,
r
.For material constraint (15), generally speaking, the amounts of materials to be consumed in the production process should not be beyond the quantity restriction of available materials. With limited resources, the production amounts multiplied by the material consumption ratio per unit will be less or equal to the total available quantity of the material.(d) Production Capability Constraint. Consider the following:(16)
X
Q
i
l
j
s
t
r
≤
M
×
t
f
i
j
s
∀
i
,
l
,
j
,
s
,
t
,
r
.For production capability, constraint (16) shows whether resource configuration of a certain product is able to be used for manufacturing this product. Due to different types of machines and tools in lines at each production stage, not all resource configurations can be used for manufacturing all kinds of products. If t
f
i
j
s
=
1, the resource configuration in the line at this stage can be used for manufacturing this type of product; on the contrary, if t
f
i
j
s
=
0, they cannot be used.(e) Transportation Capability Constraint. Consider the following:(17)
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
≤
M
×
t
b
l
s
l
′
s
+
1
∀
i
,
l
,
j
,
s
,
l
′
,
j
′
,
t
,
r
.For transportation capability, constraint (17) expresses whether there is transportation capability to move products from the current stage to the next stage. The production process is an assembly flow line environment. Thus, products are bound to go through each production stage in turn and cannot revert to a previous stage. If t
b
l
s
l
′
(
s
+
1
)
=
1, there is transportation capability to move products between stages; on the contrary, if t
b
l
s
l
′
(
s
+
1
)
=
0, it indicates that there is no transportation capability.(f) Demand Fulfillment Constraints. Consider the following:(18)
∑
l
∑
j
X
Q
i
l
j
s
t
r
=
S
Q
i
c
t
r
∀
i
,
s
=
S
,
c
,
t
,
r
,
(19)
S
Q
i
c
t
r
≤
d
e
i
c
t
r
∀
i
,
c
,
t
,
r
.Demand fulfillment is indicated by constraints (18) and (19), respectively. Constraint (18) shows that sales volume in each scenario should be equal to the total production amounts with resource configurations in all lines. Constraint (19) expresses that the sales volume must be less or equal to the demands required by customers.(g) Service Level. Consider the following:(20)
S
L
c
r
=
∑
i
S
Q
i
c
t
r
∑
i
d
e
i
c
t
r
∀
c
,
t
,
r
.Constraint (20) shows that the sales volume divided by customer demands is the service level.(h) Domain Restriction for Second-Stage Decision Variables. Consider the following:(21)
X
Q
i
l
j
s
t
r
,
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
,
S
Q
i
c
t
r
,
S
L
c
r
≥
0
∀
i
,
l
,
l
′
,
j
,
j
′
,
s
,
t
,
c
,
r
.Constraint (21) indicates variable domain restriction.


#### 3.2.3. Capacity Planning Problem under Demand Certainty

Different from the uncertainty model, the deterministic model does not consider demand fluctuation and only considers an average demand scenario. Appendix A (see Supplementary Material available online athttp://dx.doi.org/10.1155/2015/741329) shows the detailed mathematical programming model that is used to compare the differences in solving results between the deterministic model and stochastic programming model.


### 3.3. Proposed Hybrid Approach

As the scenario number is increased, solving the scenario-based stochastic programming model becomes considerably difficult because of the computation complexity. Therefore, a hybrid approach is developed to efficiently address the proposed two-stage stochastic programming model. We apply the particle swarm optimization (PSO) method combined with the AIMMS optimal modeling software in a hybrid mechanism. First, an initial solution was generated to determine the migration number of machines and tools among the production lines. This result was entered into the AIMMS optimal modeling software with the ILOG CPLEX 12.6 solver to generate the optimal production amounts of products. The results are returned to the PSO algorithm to calculate the net profit and to determine whether the termination conditions have been satisfied. This study sets the termination condition as the number of generations. The search ends when the number of generations reaches the preset number of generations. If this number is reached, then the PSO algorithm is used to yield the optimal number of machines and tools of each line to the AIMMS optimal modeling software to generate the optimal production amounts of products. Fitness values are calculated during each generation. The PSO algorithm is repeated until the termination condition is satisfied. The PSO steps are stated as follows.Step 1 (generation of an initial population).
This study uses PSO to determine the migration number of machines and tools among the production lines. Given the initial number of machines and tools, an initial population is generated by randomly selecting the value limited to the available maximum number of machines and tools in each line.Step 2 (calculation of the fitness values).
The fitness value in this study is net profit.Step 3 (updating the speed and position of the particle).
Equations (22) and (23) are used to update the speed and position, using the following symbols:t: iteration index, t
=
1,2
,
…
,
T.
i: particle index, i
=
1,2
,
…
,
I.
d: dimension index, d
=
1,2
,
…
,
D.
c
1: personal best position acceleration constant.
c
2: global best position acceleration constant.
C
r
(
n
): the C
r of the n time.
w
(
t
): inertia weight in the tth iteration.
X
i
d
(
t
): position of the ith particle at the dth dimension in the tth iteration.
V
i
d
(
t
): velocity of the ith particle at the dth dimension in the tth iteration.
p
b
e
s
t
i
d
(
t
): personal best position of the ith particle at the dth dimension.
g
b
e
s
t
d
(
t
): global best position at the dth dimension.
The mathematical model is expressed as follows:(22)
V
i
d
t
+
1
=
w
t
V
i
d
t
+
c
1
C
r
n
p
b
e
s
t
i
d
t
-
X
i
d
t
+
c
2
1
-
C
r
n
g
b
e
s
t
i
d
t
-
X
i
d
t
,
(23)
X
i
d
t
+
1
=
X
i
d
t
+
V
i
d
t
+
1
.
The following steps are used to update the individual speed and position of each dimension:(1)
Seti
=
1.
(2)
Setd
=
1.
(3)
Update thed dimension speed (V
i
d
(
t
+
1
)) in particle i using (22).
(4)
Update thed dimension position in particle i using (23).
(5)
Determine whetherd is equal to D. If so, then i
=
i
+
1. If not, then d
=
d
+
1 and n
=
n
+
1, and return to Step (3).
(6)
Determine whetheri is larger than I. If it is, this indicates that the update has concluded. If not, return to Step (2).Step 4 (updating the particle best (p
b
e
s
t
)).
Updating thep
b
e
s
t involves replacing the best position for current individual particles when the current individual fitness values are superior to the p
b
e
s
t fitness values. Otherwise, the replacement is not performed and the execution is repeated until all particles have been updated.Step 5 (updating the global best (g
b
e
s
t)).
Updating theg
b
e
s
t involves replacing the optimal population particles when the current optimal individual solution fitness values are superior to the g
b
e
s
t fitness values. Otherwise, the replacement is not performed.Step 6 (determining whether the termination conditions are reached).
The termination condition for the PSO algorithm presented in this study is determined when the number of iterations exceeds the set maximum iteration times. Otherwise, the process returns to Step2.


## 3.1. Characteristics of Capacity Planning of the Semiconductor Packaging and Testing Industry

This study aims to determine machine migration, tool migration in all production lines, resource configuration, capacity allocation, and product flow under demand uncertainty to achieve net profit maximization.


### 3.1.1. Resource Configuration

The manufacturing process entails that a product should sequentially go through the DB, WB, and MD stations for assembly-line production. The product considers the machine type in resource configuration during the DB and WB stages. However, three resources, namely, machine type, tool type, and material category, are considered in the MD stage. Figure3 shows that product 1 is manufactured in machine k
1 or k
2 in the DB station. This product is then processed in machine k
2 or k
3 in the WB station. Thereafter, the product is manufactured in the MD station through k
1
+
n
1
+
m
4 or k
2
+
n
2
+
m
4.Figure 3
Illustration of resource configuration.


### 3.1.2. Product Flow

This study disregards defective products and only considers production through the three sequential stages. Moreover, product flow balance must be maintained in the production line. Hence, the total product input must equal the final total output. For example, the product input for product 1 is 1,000 units. Furthermore, 400 and 600 units are produced in lines 1 and 2, respectively. After production through the three sequential stages, the final total output remains as 1,000 units.


### 3.1.3. Capacity Allocation

The capacity planning of all received orders is executed based on the current existing resources in all production stages. A product is not limited to the same production line during the entire production process; that is, a product can be manufactured in the different lines through three production stages. For example, a company has two lines, if the input of product 1 is 1,000 units. Take line 1 for explanation. Firstly, 400 units are manufactured in the DB station using machinek
1 and 600 units using machine k
2. Thereafter, 400 units are manufactured in the WB station using machine k
2 and 200 units using machine k
3. Finally, 200 units are manufactured in the MD station using resource configuration k
1
+
n
1
+
m
4 and 300 units using k
2
+
n
2
+
m
4. Thus, 500 units of product 1 can be made after the three production stages for this product are completed sequentially in line 1. The remaining 500 units are allocated to all production stages in line 2 for manufacturing.


### 3.1.4. Machine and Tool Migration

The presence of several production lines and machines with different technological capability in a company will result in variations in the production capacities of all lines. Machines can be moved to all lines in each production stage, and tools can be moved to all lines in the MD stage based on the total number of available machines and tools.


## 3.1.1. Resource Configuration

The manufacturing process entails that a product should sequentially go through the DB, WB, and MD stations for assembly-line production. The product considers the machine type in resource configuration during the DB and WB stages. However, three resources, namely, machine type, tool type, and material category, are considered in the MD stage. Figure3 shows that product 1 is manufactured in machine k
1 or k
2 in the DB station. This product is then processed in machine k
2 or k
3 in the WB station. Thereafter, the product is manufactured in the MD station through k
1
+
n
1
+
m
4 or k
2
+
n
2
+
m
4.Figure 3
Illustration of resource configuration.


## 3.1.2. Product Flow

This study disregards defective products and only considers production through the three sequential stages. Moreover, product flow balance must be maintained in the production line. Hence, the total product input must equal the final total output. For example, the product input for product 1 is 1,000 units. Furthermore, 400 and 600 units are produced in lines 1 and 2, respectively. After production through the three sequential stages, the final total output remains as 1,000 units.


## 3.1.3. Capacity Allocation

The capacity planning of all received orders is executed based on the current existing resources in all production stages. A product is not limited to the same production line during the entire production process; that is, a product can be manufactured in the different lines through three production stages. For example, a company has two lines, if the input of product 1 is 1,000 units. Take line 1 for explanation. Firstly, 400 units are manufactured in the DB station using machinek
1 and 600 units using machine k
2. Thereafter, 400 units are manufactured in the WB station using machine k
2 and 200 units using machine k
3. Finally, 200 units are manufactured in the MD station using resource configuration k
1
+
n
1
+
m
4 and 300 units using k
2
+
n
2
+
m
4. Thus, 500 units of product 1 can be made after the three production stages for this product are completed sequentially in line 1. The remaining 500 units are allocated to all production stages in line 2 for manufacturing.


## 3.1.4. Machine and Tool Migration

The presence of several production lines and machines with different technological capability in a company will result in variations in the production capacities of all lines. Machines can be moved to all lines in each production stage, and tools can be moved to all lines in the MD stage based on the total number of available machines and tools.


## 3.2. Mathematical Programming of Capacity Planning Problem for the Semiconductor Packaging and Testing Industry under Demand Uncertainty

A mathematical model of two-stage scenario-based stochastic programming is formulated by considering customer demand as an uncertain parameter. This study aims to respond to sharp demand fluctuation. Even if future demand is uncertain, machine and tool migration decisions are robust results for all demand scenarios.


### 3.2.1. Definition and Description of Capacity Planning Problem under Demand Uncertainty

This study uses a scenario tree to illustrate the uncertain factor (Figure4). Machine and tool migration decisions are deemed to be the decisions made in the first stage. The results of these decisions remain constant with the varying customer demands. Moreover, the second-stage capacity allocation decisions must be made based on the first-stage decision results. The results in the second-stage change with the varying customer demands. In this study, two-stage decisions should be optimally determined to achieve net profit maximization.Figure 4
Diagrammatic sketch of scenario tree of the uncertain factor.(1) First-Stage Decision: Robust Capacity Migration Decision That Considers Demand Uncertainty. Given three demand scenarios, each type of machine and tool is considered to determine when and what quantity of machines and tools are migrated between lines in the production stage. Hence, capacity migration decision must be made in advance to consider the robust decision under demand uncertainty as being unrelated to different demand scenarios.(2) Second-Stage Decision: Capacity Allocation Decision after All Demand Information Has Been Completely Revealed. The following factors are determined after a certain demand scenario occurs: (1) production quantity for each product in each line in all production stages during each period, (2) transportation quantity between the different production stages, (3) sales volume of each product in each period for each customer, and (4) customer service level. Therefore, capacity allocation decision is closely related to the demand scenario. According to the capacity migration result in the first stage, the optimal capacity allocation decision can be determined once a specific demand scenario occurs.


### 3.2.2. Two-Stage Stochastic Programming Model of Capacity Planning Problem

To solve the capacity planning problem under demand uncertainty, this study uses two-stage stochastic programming to construct a mathematical model. This section explains the indices, parameters, decision variables, objective function, and constraints.(1) Indices
c = customer (c
=
1,2
,
…
,
C).
i = product type (i
=
1,2
,
…
,
I).
l = production line (l
=
1,2
,
…
,
L).
s = production stage (s
=
1,2
,
…
,
S).
j = resource configuration (j
=
1,2
,
…
,
J).
m = material type (m
=
1,2
,
…
,
M).
k = machine type (k
=
1,2
,
…
,
K).
n = tool type (n
=
1
,
2
,
…
,
N).
t = time period (t
=
1,2
,
…
,
T).
r = scenario number (r
=
1
,
2
,
…
,
R).(2) Parameters(I) Demand Related Parameters
d
e
i
c
t
r = the demand quantity of customer c for product i in time t under scenario r.
p
r = probability value occurring in scenario r (∑
r
p
r
=
1).
p
r
i
c
t = sales price of customer c for product i in time t.(II) Machine Related Parameters
k
l
l
s
k = initial amount of machine k in line l at stage s.
k
u
l
s = maximum number of machines in line l at stage s.
k
s
i
j
s
k = required work hours of machine k used at stage s for manufacturing a unit of product i with resource configuration j.
k
a
s
k = available work hours of machine k at stage s.
k
b
l
l
′
s = machine migration capability from lines l to l
′ at stage s.(III) Tool Related Parameters
n
l
l
s
n = initial amount of tool n in line l at stage s.
n
u
l
s = maximum number of tools in line l at stage s.
n
s
i
j
s
n = required work hours of tool n used at stage s for manufacturing a unit of product i with resource configuration j.
n
a
s
n = available work hours of tool n at stage s.
n
b
l
l
′
s = tool migration capability from lines l to l
′ at stage s.(IV) Material Related Parameters
m
q
s
m
t = total available quantity of material m at stage s in time t.
m
s
i
j
s
m = consumption ratio of material m for manufacturing a unit of product i at stage s with resource configuration j.(V) Production Capability Related Parameter
t
f
i
j
s = production capability of product i at stage s with resource configuration j.(VI) Transportation Related Parameter
t
b
l
s
l
′
(
s
+
1
) = transportation capability from line l at stage s to line l
′ at stage s
+
1.(VII) Cost Parameters
v
c
i
l
j
s = production cost for manufacturing a unit of product i in line l at stage s with resource configuration j.
k
c
s = machine migration cost at stage s.
n
c
s = tool migration cost at stage s.(3) Decision Variables(I) First-Stage Decision Variables: Capacity Migration Decision
K
Q
l
s
k
t = the number of machines k for line l at stage s in time t.
K
M
l
l
′
s
k
t = the migration number of machines k from line l to line l
′ at stage s in time t.
N
Q
l
s
n
t = the number of tools n for line l at stage s in time t.
N
M
l
l
′
s
n
t = the migration number of tools n from line l to line l
′ at stage s in time t.(II) Second-Stage Decision Variables: Capacity Allocation Decision and Service Level
X
Q
i
l
j
s
t
r = production amounts of product i with resource configuration j for line l at stage s in time t under scenario r.
R
Q
i
l
j
s
l
′
j
′
(
s
+
1
)
t
r = transportation amounts of product i from line l with resource configuration j at stage s to line l
′ with resource configuration j
′ at stage (s
+
1) in time t under scenario r.
S
Q
i
c
t
r = sales amounts of product i for customer c in time t under scenario r.
S
L
c
r = service level for customer c under scenario r.(4) Objective Function. Consider the following:(1)
M
a
x
i
m
i
z
e
∑
r
p
r
∑
i
∑
c
∑
t
p
r
i
c
t
×
S
Q
i
c
t
r
-
∑
i
∑
l
∑
j
∑
s
∑
t
v
c
i
l
j
s
×
X
Q
i
l
j
s
t
r
-
∑
l
∑
l
′
∑
s
∑
k
∑
t
k
c
s
×
K
M
l
l
′
s
k
t
-
∑
l
∑
l
′
∑
s
∑
n
∑
t
n
c
s
×
N
M
l
l
′
s
n
t
.The above is the objective function of two-stage stochastic programming. It aims to obtain the optimal capacity planning decision to seek the maximization of net profit, as (1); net profit = (sales revenue − variable production cost) − machine migration cost − tool migration cost.(5) Constraints(I) First-Stage Constraints(a) Machine Migration Balance Constraints. Consider the following:(2)
K
Q
l
s
k
0
=
k
l
l
s
k
∀
l
,
s
,
k
,
(3)
K
Q
l
s
k
t
=
K
Q
l
s
k
t
-
1
-
∑
l
′
K
M
l
l
′
s
k
t
+
∑
l
′
K
M
l
′
l
s
k
t
∀
l
,
s
,
k
,
t
,
(4)
K
Q
l
s
k
t
≤
k
u
l
s
∀
l
,
s
,
k
,
t
,
(5)
K
M
l
l
′
s
k
t
≤
M
×
k
b
l
l
′
s
∀
l
,
l
′
,
s
,
k
,
t
.Constraint (2) shows the initial amount of machines in lines at each production stage; and constraint (3) indicates the number of machines required for lines at production stages in every period. This number of machines in the current period is equal to the number of machines in the previous period minus the number of machines moving to other lines plus the number of machines that migrated from other lines to this line. The total initial number of machines within the company must be equal to the total number of machines after being migrated between lines without increasing or reducing the number of machines. Constraint (4) expresses that the allocated number of machines should not be more than the available space in the shop-floor production line. In addition, constraint (5) considers if machines have capability to be migrated between lines. k
b
l
l
′
s refers to a binary parameter. 1 means machines can be migrated between production lines, and 0 means they cannot be migrated.(b) Tool Migration Balance Constraints. Consider the following:(6)
N
Q
l
s
n
0
=
n
l
l
s
n
∀
l
,
s
,
n
,
(7)
N
Q
l
s
n
t
=
N
Q
l
s
n
t
-
1
-
∑
l
′
N
M
l
l
′
s
n
t
+
∑
l
′
N
M
l
′
l
s
n
t
∀
l
,
s
,
n
,
t
,
(8)
N
Q
l
s
n
t
≤
n
u
l
s
∀
l
,
s
,
n
,
t
,
(9)
N
M
l
l
′
s
n
t
≤
M
×
n
b
l
l
′
s
∀
l
,
l
′
,
s
,
n
,
t
.Constraint (6) shows the initial amount of tools in lines at each production stage; and constraint (7) indicates the number of tools required for lines at production stages in every period. This number of tools in the current period is equal to the number of tools in the previous period minus the number of tools moving to other lines plus the number of tools that migrated from other lines to this line. The total initial number of tools within the company must be equal to the total number of tools after being migrated between lines without increasing or reducing the number of tools. Constraint (8) expresses that the allocated number of tools should not be more than the available space in the shop-floor production line. In addition, constraint (9) considers if tools have capability to be migrated between lines. n
b
l
l
′
s refers to a binary parameter. 1 means tools can be migrated between production lines, and 0 means they cannot be migrated.(c) Domain Restriction for First-Stage Decision Variables. Consider the following:(10)
K
Q
l
s
k
t
,
K
M
l
l
′
s
k
t
,
N
Q
l
s
n
t
,
N
M
l
l
′
s
n
t
∈
i
n
t
e
g
e
r
∀
l
,
s
,
k
,
n
,
t
.Constraint (10) shows the domain of variables, which indicates the characteristics of its integer variables.(II) Second-Stage Constraints(a) Production and Transportation Balance Constraints. Consider the following:(11)
X
Q
i
l
j
s
t
r
=
∑
l
′
∑
j
′
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
∀
i
,
l
,
j
,
s
=
1
,
…
S
-
1
,
t
,
r
,
(12)
∑
l
′
∑
j
′
R
Q
i
l
′
j
′
s
-
1
l
j
s
t
r
=
X
Q
i
l
j
s
t
r
∀
i
,
l
,
j
,
s
=
2
,
…
,
S
,
t
,
r
.Overall production and transportation must satisfy line flow balance, as shown in constraints (11) and (12). The allocated production amounts in a certain line at this stage should be equal to the total amounts that are transported from this line to all lines at the next stage. On the contrary, the total amounts that are transported from all lines at the previous stage to a certain line at the current stage should be equal to the allocated production amounts in this line.(b) Capacity Constraints. Consider the following:(13)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
k
s
i
j
s
k
≤
K
Q
l
s
k
t
×
k
a
s
k
∀
l
,
s
,
k
,
t
,
r
,
(14)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
n
s
i
j
s
n
≤
N
Q
l
s
n
t
×
n
a
s
n
∀
l
,
s
,
n
,
t
,
r
.For capacity constraints, constraints (13) and (14) indicate that the production amounts multiplied by work hours of machines or tools consumed should not exceed the number of machines or tools multiplied by available work hours of a unit of machine or tool. In short, the sum of work hours required for each product in available machine or tool should not be more than the total available resource limit of the company.(c) Material Constraint. Consider the following:(15)
∑
i
∑
l
∑
j
X
Q
i
l
j
s
t
r
×
m
s
i
j
s
m
≤
m
q
s
m
t
∀
s
,
m
,
t
,
r
.For material constraint (15), generally speaking, the amounts of materials to be consumed in the production process should not be beyond the quantity restriction of available materials. With limited resources, the production amounts multiplied by the material consumption ratio per unit will be less or equal to the total available quantity of the material.(d) Production Capability Constraint. Consider the following:(16)
X
Q
i
l
j
s
t
r
≤
M
×
t
f
i
j
s
∀
i
,
l
,
j
,
s
,
t
,
r
.For production capability, constraint (16) shows whether resource configuration of a certain product is able to be used for manufacturing this product. Due to different types of machines and tools in lines at each production stage, not all resource configurations can be used for manufacturing all kinds of products. If t
f
i
j
s
=
1, the resource configuration in the line at this stage can be used for manufacturing this type of product; on the contrary, if t
f
i
j
s
=
0, they cannot be used.(e) Transportation Capability Constraint. Consider the following:(17)
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
≤
M
×
t
b
l
s
l
′
s
+
1
∀
i
,
l
,
j
,
s
,
l
′
,
j
′
,
t
,
r
.For transportation capability, constraint (17) expresses whether there is transportation capability to move products from the current stage to the next stage. The production process is an assembly flow line environment. Thus, products are bound to go through each production stage in turn and cannot revert to a previous stage. If t
b
l
s
l
′
(
s
+
1
)
=
1, there is transportation capability to move products between stages; on the contrary, if t
b
l
s
l
′
(
s
+
1
)
=
0, it indicates that there is no transportation capability.(f) Demand Fulfillment Constraints. Consider the following:(18)
∑
l
∑
j
X
Q
i
l
j
s
t
r
=
S
Q
i
c
t
r
∀
i
,
s
=
S
,
c
,
t
,
r
,
(19)
S
Q
i
c
t
r
≤
d
e
i
c
t
r
∀
i
,
c
,
t
,
r
.Demand fulfillment is indicated by constraints (18) and (19), respectively. Constraint (18) shows that sales volume in each scenario should be equal to the total production amounts with resource configurations in all lines. Constraint (19) expresses that the sales volume must be less or equal to the demands required by customers.(g) Service Level. Consider the following:(20)
S
L
c
r
=
∑
i
S
Q
i
c
t
r
∑
i
d
e
i
c
t
r
∀
c
,
t
,
r
.Constraint (20) shows that the sales volume divided by customer demands is the service level.(h) Domain Restriction for Second-Stage Decision Variables. Consider the following:(21)
X
Q
i
l
j
s
t
r
,
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
,
S
Q
i
c
t
r
,
S
L
c
r
≥
0
∀
i
,
l
,
l
′
,
j
,
j
′
,
s
,
t
,
c
,
r
.Constraint (21) indicates variable domain restriction.


### 3.2.3. Capacity Planning Problem under Demand Certainty

Different from the uncertainty model, the deterministic model does not consider demand fluctuation and only considers an average demand scenario. Appendix A (see Supplementary Material available online athttp://dx.doi.org/10.1155/2015/741329) shows the detailed mathematical programming model that is used to compare the differences in solving results between the deterministic model and stochastic programming model.


## 3.2.1. Definition and Description of Capacity Planning Problem under Demand Uncertainty

This study uses a scenario tree to illustrate the uncertain factor (Figure4). Machine and tool migration decisions are deemed to be the decisions made in the first stage. The results of these decisions remain constant with the varying customer demands. Moreover, the second-stage capacity allocation decisions must be made based on the first-stage decision results. The results in the second-stage change with the varying customer demands. In this study, two-stage decisions should be optimally determined to achieve net profit maximization.Figure 4
Diagrammatic sketch of scenario tree of the uncertain factor.(1) First-Stage Decision: Robust Capacity Migration Decision That Considers Demand Uncertainty. Given three demand scenarios, each type of machine and tool is considered to determine when and what quantity of machines and tools are migrated between lines in the production stage. Hence, capacity migration decision must be made in advance to consider the robust decision under demand uncertainty as being unrelated to different demand scenarios.(2) Second-Stage Decision: Capacity Allocation Decision after All Demand Information Has Been Completely Revealed. The following factors are determined after a certain demand scenario occurs: (1) production quantity for each product in each line in all production stages during each period, (2) transportation quantity between the different production stages, (3) sales volume of each product in each period for each customer, and (4) customer service level. Therefore, capacity allocation decision is closely related to the demand scenario. According to the capacity migration result in the first stage, the optimal capacity allocation decision can be determined once a specific demand scenario occurs.


## 3.2.2. Two-Stage Stochastic Programming Model of Capacity Planning Problem

To solve the capacity planning problem under demand uncertainty, this study uses two-stage stochastic programming to construct a mathematical model. This section explains the indices, parameters, decision variables, objective function, and constraints.(1) Indices
c = customer (c
=
1,2
,
…
,
C).
i = product type (i
=
1,2
,
…
,
I).
l = production line (l
=
1,2
,
…
,
L).
s = production stage (s
=
1,2
,
…
,
S).
j = resource configuration (j
=
1,2
,
…
,
J).
m = material type (m
=
1,2
,
…
,
M).
k = machine type (k
=
1,2
,
…
,
K).
n = tool type (n
=
1
,
2
,
…
,
N).
t = time period (t
=
1,2
,
…
,
T).
r = scenario number (r
=
1
,
2
,
…
,
R).(2) Parameters(I) Demand Related Parameters
d
e
i
c
t
r = the demand quantity of customer c for product i in time t under scenario r.
p
r = probability value occurring in scenario r (∑
r
p
r
=
1).
p
r
i
c
t = sales price of customer c for product i in time t.(II) Machine Related Parameters
k
l
l
s
k = initial amount of machine k in line l at stage s.
k
u
l
s = maximum number of machines in line l at stage s.
k
s
i
j
s
k = required work hours of machine k used at stage s for manufacturing a unit of product i with resource configuration j.
k
a
s
k = available work hours of machine k at stage s.
k
b
l
l
′
s = machine migration capability from lines l to l
′ at stage s.(III) Tool Related Parameters
n
l
l
s
n = initial amount of tool n in line l at stage s.
n
u
l
s = maximum number of tools in line l at stage s.
n
s
i
j
s
n = required work hours of tool n used at stage s for manufacturing a unit of product i with resource configuration j.
n
a
s
n = available work hours of tool n at stage s.
n
b
l
l
′
s = tool migration capability from lines l to l
′ at stage s.(IV) Material Related Parameters
m
q
s
m
t = total available quantity of material m at stage s in time t.
m
s
i
j
s
m = consumption ratio of material m for manufacturing a unit of product i at stage s with resource configuration j.(V) Production Capability Related Parameter
t
f
i
j
s = production capability of product i at stage s with resource configuration j.(VI) Transportation Related Parameter
t
b
l
s
l
′
(
s
+
1
) = transportation capability from line l at stage s to line l
′ at stage s
+
1.(VII) Cost Parameters
v
c
i
l
j
s = production cost for manufacturing a unit of product i in line l at stage s with resource configuration j.
k
c
s = machine migration cost at stage s.
n
c
s = tool migration cost at stage s.(3) Decision Variables(I) First-Stage Decision Variables: Capacity Migration Decision
K
Q
l
s
k
t = the number of machines k for line l at stage s in time t.
K
M
l
l
′
s
k
t = the migration number of machines k from line l to line l
′ at stage s in time t.
N
Q
l
s
n
t = the number of tools n for line l at stage s in time t.
N
M
l
l
′
s
n
t = the migration number of tools n from line l to line l
′ at stage s in time t.(II) Second-Stage Decision Variables: Capacity Allocation Decision and Service Level
X
Q
i
l
j
s
t
r = production amounts of product i with resource configuration j for line l at stage s in time t under scenario r.
R
Q
i
l
j
s
l
′
j
′
(
s
+
1
)
t
r = transportation amounts of product i from line l with resource configuration j at stage s to line l
′ with resource configuration j
′ at stage (s
+
1) in time t under scenario r.
S
Q
i
c
t
r = sales amounts of product i for customer c in time t under scenario r.
S
L
c
r = service level for customer c under scenario r.(4) Objective Function. Consider the following:(1)
M
a
x
i
m
i
z
e
∑
r
p
r
∑
i
∑
c
∑
t
p
r
i
c
t
×
S
Q
i
c
t
r
-
∑
i
∑
l
∑
j
∑
s
∑
t
v
c
i
l
j
s
×
X
Q
i
l
j
s
t
r
-
∑
l
∑
l
′
∑
s
∑
k
∑
t
k
c
s
×
K
M
l
l
′
s
k
t
-
∑
l
∑
l
′
∑
s
∑
n
∑
t
n
c
s
×
N
M
l
l
′
s
n
t
.The above is the objective function of two-stage stochastic programming. It aims to obtain the optimal capacity planning decision to seek the maximization of net profit, as (1); net profit = (sales revenue − variable production cost) − machine migration cost − tool migration cost.(5) Constraints(I) First-Stage Constraints(a) Machine Migration Balance Constraints. Consider the following:(2)
K
Q
l
s
k
0
=
k
l
l
s
k
∀
l
,
s
,
k
,
(3)
K
Q
l
s
k
t
=
K
Q
l
s
k
t
-
1
-
∑
l
′
K
M
l
l
′
s
k
t
+
∑
l
′
K
M
l
′
l
s
k
t
∀
l
,
s
,
k
,
t
,
(4)
K
Q
l
s
k
t
≤
k
u
l
s
∀
l
,
s
,
k
,
t
,
(5)
K
M
l
l
′
s
k
t
≤
M
×
k
b
l
l
′
s
∀
l
,
l
′
,
s
,
k
,
t
.Constraint (2) shows the initial amount of machines in lines at each production stage; and constraint (3) indicates the number of machines required for lines at production stages in every period. This number of machines in the current period is equal to the number of machines in the previous period minus the number of machines moving to other lines plus the number of machines that migrated from other lines to this line. The total initial number of machines within the company must be equal to the total number of machines after being migrated between lines without increasing or reducing the number of machines. Constraint (4) expresses that the allocated number of machines should not be more than the available space in the shop-floor production line. In addition, constraint (5) considers if machines have capability to be migrated between lines. k
b
l
l
′
s refers to a binary parameter. 1 means machines can be migrated between production lines, and 0 means they cannot be migrated.(b) Tool Migration Balance Constraints. Consider the following:(6)
N
Q
l
s
n
0
=
n
l
l
s
n
∀
l
,
s
,
n
,
(7)
N
Q
l
s
n
t
=
N
Q
l
s
n
t
-
1
-
∑
l
′
N
M
l
l
′
s
n
t
+
∑
l
′
N
M
l
′
l
s
n
t
∀
l
,
s
,
n
,
t
,
(8)
N
Q
l
s
n
t
≤
n
u
l
s
∀
l
,
s
,
n
,
t
,
(9)
N
M
l
l
′
s
n
t
≤
M
×
n
b
l
l
′
s
∀
l
,
l
′
,
s
,
n
,
t
.Constraint (6) shows the initial amount of tools in lines at each production stage; and constraint (7) indicates the number of tools required for lines at production stages in every period. This number of tools in the current period is equal to the number of tools in the previous period minus the number of tools moving to other lines plus the number of tools that migrated from other lines to this line. The total initial number of tools within the company must be equal to the total number of tools after being migrated between lines without increasing or reducing the number of tools. Constraint (8) expresses that the allocated number of tools should not be more than the available space in the shop-floor production line. In addition, constraint (9) considers if tools have capability to be migrated between lines. n
b
l
l
′
s refers to a binary parameter. 1 means tools can be migrated between production lines, and 0 means they cannot be migrated.(c) Domain Restriction for First-Stage Decision Variables. Consider the following:(10)
K
Q
l
s
k
t
,
K
M
l
l
′
s
k
t
,
N
Q
l
s
n
t
,
N
M
l
l
′
s
n
t
∈
i
n
t
e
g
e
r
∀
l
,
s
,
k
,
n
,
t
.Constraint (10) shows the domain of variables, which indicates the characteristics of its integer variables.(II) Second-Stage Constraints(a) Production and Transportation Balance Constraints. Consider the following:(11)
X
Q
i
l
j
s
t
r
=
∑
l
′
∑
j
′
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
∀
i
,
l
,
j
,
s
=
1
,
…
S
-
1
,
t
,
r
,
(12)
∑
l
′
∑
j
′
R
Q
i
l
′
j
′
s
-
1
l
j
s
t
r
=
X
Q
i
l
j
s
t
r
∀
i
,
l
,
j
,
s
=
2
,
…
,
S
,
t
,
r
.Overall production and transportation must satisfy line flow balance, as shown in constraints (11) and (12). The allocated production amounts in a certain line at this stage should be equal to the total amounts that are transported from this line to all lines at the next stage. On the contrary, the total amounts that are transported from all lines at the previous stage to a certain line at the current stage should be equal to the allocated production amounts in this line.(b) Capacity Constraints. Consider the following:(13)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
k
s
i
j
s
k
≤
K
Q
l
s
k
t
×
k
a
s
k
∀
l
,
s
,
k
,
t
,
r
,
(14)
∑
i
∑
j
X
Q
i
l
j
s
t
r
×
n
s
i
j
s
n
≤
N
Q
l
s
n
t
×
n
a
s
n
∀
l
,
s
,
n
,
t
,
r
.For capacity constraints, constraints (13) and (14) indicate that the production amounts multiplied by work hours of machines or tools consumed should not exceed the number of machines or tools multiplied by available work hours of a unit of machine or tool. In short, the sum of work hours required for each product in available machine or tool should not be more than the total available resource limit of the company.(c) Material Constraint. Consider the following:(15)
∑
i
∑
l
∑
j
X
Q
i
l
j
s
t
r
×
m
s
i
j
s
m
≤
m
q
s
m
t
∀
s
,
m
,
t
,
r
.For material constraint (15), generally speaking, the amounts of materials to be consumed in the production process should not be beyond the quantity restriction of available materials. With limited resources, the production amounts multiplied by the material consumption ratio per unit will be less or equal to the total available quantity of the material.(d) Production Capability Constraint. Consider the following:(16)
X
Q
i
l
j
s
t
r
≤
M
×
t
f
i
j
s
∀
i
,
l
,
j
,
s
,
t
,
r
.For production capability, constraint (16) shows whether resource configuration of a certain product is able to be used for manufacturing this product. Due to different types of machines and tools in lines at each production stage, not all resource configurations can be used for manufacturing all kinds of products. If t
f
i
j
s
=
1, the resource configuration in the line at this stage can be used for manufacturing this type of product; on the contrary, if t
f
i
j
s
=
0, they cannot be used.(e) Transportation Capability Constraint. Consider the following:(17)
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
≤
M
×
t
b
l
s
l
′
s
+
1
∀
i
,
l
,
j
,
s
,
l
′
,
j
′
,
t
,
r
.For transportation capability, constraint (17) expresses whether there is transportation capability to move products from the current stage to the next stage. The production process is an assembly flow line environment. Thus, products are bound to go through each production stage in turn and cannot revert to a previous stage. If t
b
l
s
l
′
(
s
+
1
)
=
1, there is transportation capability to move products between stages; on the contrary, if t
b
l
s
l
′
(
s
+
1
)
=
0, it indicates that there is no transportation capability.(f) Demand Fulfillment Constraints. Consider the following:(18)
∑
l
∑
j
X
Q
i
l
j
s
t
r
=
S
Q
i
c
t
r
∀
i
,
s
=
S
,
c
,
t
,
r
,
(19)
S
Q
i
c
t
r
≤
d
e
i
c
t
r
∀
i
,
c
,
t
,
r
.Demand fulfillment is indicated by constraints (18) and (19), respectively. Constraint (18) shows that sales volume in each scenario should be equal to the total production amounts with resource configurations in all lines. Constraint (19) expresses that the sales volume must be less or equal to the demands required by customers.(g) Service Level. Consider the following:(20)
S
L
c
r
=
∑
i
S
Q
i
c
t
r
∑
i
d
e
i
c
t
r
∀
c
,
t
,
r
.Constraint (20) shows that the sales volume divided by customer demands is the service level.(h) Domain Restriction for Second-Stage Decision Variables. Consider the following:(21)
X
Q
i
l
j
s
t
r
,
R
Q
i
l
j
s
l
′
j
′
s
+
1
t
r
,
S
Q
i
c
t
r
,
S
L
c
r
≥
0
∀
i
,
l
,
l
′
,
j
,
j
′
,
s
,
t
,
c
,
r
.Constraint (21) indicates variable domain restriction.


## 3.2.3. Capacity Planning Problem under Demand Certainty

Different from the uncertainty model, the deterministic model does not consider demand fluctuation and only considers an average demand scenario. Appendix A (see Supplementary Material available online athttp://dx.doi.org/10.1155/2015/741329) shows the detailed mathematical programming model that is used to compare the differences in solving results between the deterministic model and stochastic programming model.


## 3.3. Proposed Hybrid Approach

As the scenario number is increased, solving the scenario-based stochastic programming model becomes considerably difficult because of the computation complexity. Therefore, a hybrid approach is developed to efficiently address the proposed two-stage stochastic programming model. We apply the particle swarm optimization (PSO) method combined with the AIMMS optimal modeling software in a hybrid mechanism. First, an initial solution was generated to determine the migration number of machines and tools among the production lines. This result was entered into the AIMMS optimal modeling software with the ILOG CPLEX 12.6 solver to generate the optimal production amounts of products. The results are returned to the PSO algorithm to calculate the net profit and to determine whether the termination conditions have been satisfied. This study sets the termination condition as the number of generations. The search ends when the number of generations reaches the preset number of generations. If this number is reached, then the PSO algorithm is used to yield the optimal number of machines and tools of each line to the AIMMS optimal modeling software to generate the optimal production amounts of products. Fitness values are calculated during each generation. The PSO algorithm is repeated until the termination condition is satisfied. The PSO steps are stated as follows.Step 1 (generation of an initial population).
This study uses PSO to determine the migration number of machines and tools among the production lines. Given the initial number of machines and tools, an initial population is generated by randomly selecting the value limited to the available maximum number of machines and tools in each line.Step 2 (calculation of the fitness values).
The fitness value in this study is net profit.Step 3 (updating the speed and position of the particle).
Equations (22) and (23) are used to update the speed and position, using the following symbols:t: iteration index, t
=
1,2
,
…
,
T.
i: particle index, i
=
1,2
,
…
,
I.
d: dimension index, d
=
1,2
,
…
,
D.
c
1: personal best position acceleration constant.
c
2: global best position acceleration constant.
C
r
(
n
): the C
r of the n time.
w
(
t
): inertia weight in the tth iteration.
X
i
d
(
t
): position of the ith particle at the dth dimension in the tth iteration.
V
i
d
(
t
): velocity of the ith particle at the dth dimension in the tth iteration.
p
b
e
s
t
i
d
(
t
): personal best position of the ith particle at the dth dimension.
g
b
e
s
t
d
(
t
): global best position at the dth dimension.
The mathematical model is expressed as follows:(22)
V
i
d
t
+
1
=
w
t
V
i
d
t
+
c
1
C
r
n
p
b
e
s
t
i
d
t
-
X
i
d
t
+
c
2
1
-
C
r
n
g
b
e
s
t
i
d
t
-
X
i
d
t
,
(23)
X
i
d
t
+
1
=
X
i
d
t
+
V
i
d
t
+
1
.
The following steps are used to update the individual speed and position of each dimension:(1)
Seti
=
1.
(2)
Setd
=
1.
(3)
Update thed dimension speed (V
i
d
(
t
+
1
)) in particle i using (22).
(4)
Update thed dimension position in particle i using (23).
(5)
Determine whetherd is equal to D. If so, then i
=
i
+
1. If not, then d
=
d
+
1 and n
=
n
+
1, and return to Step (3).
(6)
Determine whetheri is larger than I. If it is, this indicates that the update has concluded. If not, return to Step (2).Step 4 (updating the particle best (p
b
e
s
t
)).
Updating thep
b
e
s
t involves replacing the best position for current individual particles when the current individual fitness values are superior to the p
b
e
s
t fitness values. Otherwise, the replacement is not performed and the execution is repeated until all particles have been updated.Step 5 (updating the global best (g
b
e
s
t)).
Updating theg
b
e
s
t involves replacing the optimal population particles when the current optimal individual solution fitness values are superior to the g
b
e
s
t fitness values. Otherwise, the replacement is not performed.Step 6 (determining whether the termination conditions are reached).
The termination condition for the PSO algorithm presented in this study is determined when the number of iterations exceeds the set maximum iteration times. Otherwise, the process returns to Step2.


## 4. Analysis and Discussion on the Semiconductor Packaging and Testing Industry Case

### 4.1. Introduction to the Case Background

This study aims to conduct a capacity allocation and migration planning for customer demands by considering a certain large-scale semiconductor packaging and testing factory as the case study. Three customers, eight types of products, and two production lines are involved in this case. The manufacturing process is divided into three bottleneck production stages, namely, the DB, WB, and MD stations in turn. Furthermore, the factory has three types of machines, four types of tools, and four categories of materials. The planning horizon covers four periods. For resource configuration, the DB and WB stations have three configurations consisting of machines. The MD station has seven kinds of configurations consisting of machines, tools, and materials. Appendix B (see Supplementary Material) shows the related information necessary for this case study.


### 4.2. Capacity Planning Results

The case problem is handled under demand uncertainty. The maximum net profit is $77,557,489.83 for the stochastic programming model. Table1 shows the number of machines for the lines in the production stages in each time period. Table 2 presents the migration number of machines between lines in each production stage in each time period. Table 3 indicates the number of tools for the lines in the MD stage in each time period. Table 4 presents the migration number of tools between lines in the MD stage in each time period. Table 5 expresses the sales amounts of products for each customer in each time period under different scenarios.Table 1
The number of machines for lines at production stages in each time period (K
Q
l
s
k
t).
Line
Production stage
Types of machine
k
1
k
2
k
3
Time (month)
Time (month)
Time (month)
1
2
3
4
1
2
3
4
1
2
3
4
l
1
DB
10
10
10
10
15
15
15
15
0
0
0
0
WB
5
4
4
4
6
6
6
6
1
1
1
1
MD
9
9
9
9
10
10
10
10
1
1
1
1
l
2
DB
0
0
0
0
5
5
5
5
6
6
6
6
WB
0
0
0
0
10
10
10
10
8
8
8
8
MD
2
2
2
2
5
5
5
5
6
6
6
1Table 2
The migration number of machines between lines at each production stage in each time period (K
M
l
l
′
s
k
t).
Line
Move to line
Production stage
DB
WB
MD
Types of machine
Types of machine
Types of machine
k
1
k
2
k
3
k
1
k
2
k
3
k
1
k
2
k
3
Time
Time
Time
Time
Time
Time
Time
Time
Time
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l1
l2
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
l2
l1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0Table 3
The number of tools for lines at MD stage in each time period (N
Q
l
s
n
t).
Line
Production stage
Types of tool
n
1
n
2
n
3
n
4
Time (month)
Time (month)
Time (month)
Time (month)
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l
1
MD
1
1
1
1
30
29
29
29
1
1
1
1
29
29
29
29
l2
MD
29
29
29
29
0
1
1
1
19
19
19
19
1
1
1
1Table 4
The migration number of tools between lines at MD stage in each time period (N
M
l
l
′
s
n
t).
Line
Move to line
Types of tool
n
1
n
2
n
3
n
4
Time
Time
Time
Time
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l
1
l2
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
l2
l1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0Table 5
The sales amounts of products for each customer in each time period under different scenarios (S
Q
i
c
t
r).
Scenario
Product
Customer
Time period (month)
1
2
3
4
Scenario 1
i
1
c
1
45,955
80,375
11,400
37,666
Scenario 1
i
2
c
1
137,866
40,188
72,154
0
Scenario 1
i
3
c
1
99,999
21,265
0
62,030
Scenario 1
i
4
c
2
91,911
60,281
54,115
0
Scenario 1
i
5
c
2
22,978
120,563
45,096
15,066
Scenario 1
i
6
c
3
99,999
48,893
0
33,379
Scenario 1
i
7
c
3
53,614
24,113
53,175
33,899
Scenario 1
i
8
c
3
199,998
21,768
0
11,300
Scenario 2
i
1
c
1
48,000
96,000
13,500
60,000
Scenario 2
i
2
c
1
144,000
48,000
96,000
0
Scenario 2
i
3
c
1
99,999
22,857
0
96,428
Scenario 2
i
4
c
2
96,000
72,000
72,000
0
Scenario 2
i
5
c
2
24,000
144,000
60,000
24,000
Scenario 2
i
6
c
3
99,999
54,307
48,647
0
Scenario 2
i
7
c
3
56,000
28,800
68,192
54,000
Scenario 2
i
8
c
3
199,998
26,000
0
18,000
Scenario 3
i
1
c
1
50,045
108,987
0
82,334
Scenario 3
i
2
c
1
150,134
55,812
116,115
0
Scenario 3
i
3
c
1
58,416
0
0
99,999
Scenario 3
i
4
c
2
100,089
83,719
89,885
0
Scenario 3
i
5
c
2
25,022
167,437
74,904
32,934
Scenario 3
i
6
c
3
99,999
58,778
0
61,055
Scenario 3
i
7
c
3
58,386
33,487
82,200
74,101
Scenario 3
i
8
c
3
199,998
30,232
0
24,700


### 4.3. Expected Value of Perfect Information (EVPI) and Value of the Stochastic Solution (VSS)

WS stands for “wait and see”; thus the decision-maker must wait for all information to be revealed before making a decision. The objective is to maximize the net profit. The solution obtained through the deterministic model with average demand is called the expected value (EV) solution. Through the EV solution, the individual objective values of all demand scenarios can be obtained. Thereafter, these objective values are multiplied by the occurring probability of the corresponding scenario to obtain the expected value, namely, the expected result of using the EV solution (EEV). The “here and now” type indicates the maximized net profit value of stochastic programming, which is called SP. For the capacity allocation and migration planning problem in this study, the solving result through SP under uncertainty is compared with the deterministic model. Two indicators, namely, expected value of perfect information (EVPI) and value of the stochastic solution (VSS), are used for analysis.The optimal objective value of the stochastic programming model is compared with the expected value of the WS solutions. The latter is calculated by determining the optimal solution for each possible realization of the demand scenarios with certainty. Clearly, it is better to know the value of the future actual demand before making a decision than having to make the decision before knowing. The difference between these two expected objective values is called EVPI. Furthermore, EVPI measures the maximum amount a decision-maker would be willing to pay in return for complete (and accurate) information about the future to solve uncertainty. Thus, EVPI is defined in (24). If EVPI is smaller, the stochastic programming result is closer to the result obtained with complete information. By contrast, if EVPI is larger, the influence of uncertain factors is greater and the price paid for obtaining complete information is considerably high:(24)
EVPI
=
WS
-
SP
.VSS is used to measure the ability of the stochastic programming model to increase net profit, with the attempt to solve uncertain factors. It is the difference between the solution of the SP model and the expected value of the objective function when fixing parameters to average values and using the corresponding optimal solution. Thus, VSS is defined in (25). VSS conveys to us how much we can gain more if SP is used. If VSS is larger, the SP result is better than the expected result when using the EV solution obtained by replacing all possible demands with their average values:(25)
VSS
=
SP
-
EEV
.The related measurements for the case problem in this study are showed in Table6.Table 6
The related measurements for the case problem.
Net profit
WS
77,560,489.83
SP
77,557,489.83
EEV
77,439,044.28
EVPI
3000.00
VSS
118,445.55
V
S
S
E
E
V
×
100 (%)
0.15%


#### 4.3.1. Net Profit Fluctuation under Different Combinations of Probability

Different probability combinations are designed to investigate whether the occurring probability of all demand scenarios affects the net profit. The combined design individually provides significantly high probability values to low, mean, and high demand scenarios. Table7 shows that the capacity planning results under all probability combinations indicate that net profits using the SP model are higher than those using the deterministic model. Moreover, if the occurring probability of low demand scenario is 0.8, then its net profit is significantly lower than that of the mean demand or high demand scenario, which possesses an occurring probability of 0.8. Therefore, the occurring probability of the scenario is positively related to the demand of each corresponding scenario; that is, determining the occurring probability of scenario is highly important when using the SP model.Table 7
The related measurements for different probability combinations.
Probability combination∗
WS
SP
EEV
(0.8, 0.1, 0.1)
69,966,361.66
69,962,311.66
69,959,928.00
(0.1, 0.8, 0.1)
78,027,716.20
78,023,666.20
78,021,282.53
(0.1, 0.1, 0.8)
84,687,393.96
84,686,493.96
84,635,924.63
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.


#### 4.3.2. Changes in EVPI and VSS under Different Probability Combinations

The current study analyzes whether the occurring probabilities of all demand scenarios have an effect on EVPI and VSS. Accordingly, several probability combinations of demand scenarios are designed, including the probability combination with considerably high occurring probability of specific demand scenario. EVPI and VSS under different probability combinations are shown in Table8. Figure 5 shows that when the probability combination is (0.1, 0.1, 0.8), the net profit gap between the deterministic model and SP model is $50,569. Moreover, the decision-maker is willing to pay $900 in return for the complete information on future uncertainty. Hence, when the occurring probability of high demand is higher, EVPI is lower. Specifically, the solving result of net profit under complete (perfect) information is closer to the decision made by the SP model. Similarly, if VSS is higher, then the obtained benefit from the SP model is better.Table 8
EVPI and VSS under different probability combinations.
Probability combinations∗
EVPI
VSS
(0.8,0.1,0.1)
4,050
2,384
(0.3,0.5,0.2)
3,600
9,267
(0.3,0.4,0.3)
3,150
16,151
(0.333,0.333,0.333)
3,000
18,446
(0.2,0.3,0.5)
2,250
29,918
(0.1,0.1,0.8)
900
50,569
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.Figure 5
The diagram for EVPI and VSS under different probability combinations.


#### 4.3.3. Effect of Demand Variability on Net Profit, EVPI, and VSS

Three types of demand variability are designed in this study. Base Case aims to infer demands of all scenarios using the coefficient of variation. Small variation is equal to 90% of Base Case (middle variation), and large variation is 110% of Base Case. After individually solving the three different variations, the net profit in all variations under the SP model and deterministic model can be calculated (Table9). It also can be found from Figure 6 that the gap in net profit will increase with the increase of demand variation. Thus, the SP model considers demand uncertainty, and its result is better than that of the deterministic model, which only considers average demand.Table 9
Comparison of net profit under demand variability.
Demand variability
EEV
SP
Gap
Small variation
72,884,515
72,888,460
3,945
Middle variation
77,539,044
77,557,489
18,445
Large variation
82,113,557
82,134,434
20,877Figure 6
Gap in net profit under different demand variability.


### 4.4. Sensitivity Analysis

#### 4.4.1. Effect of Demand Change on Machine and Tool Migration and Net Profit

Demand change is the primary problem discussed in this study. The semiconductor packaging and testing industry cannot accurately forecast the actual demand of customers. If the demand change constantly shows positive growth or a substantial negative reduction, then the two-stage SP model will significantly respond to considerable demand change compared to the deterministic model. Hence, when the actual demand is lower, capacity waste can be reduced. By contrast, when the actual demand is higher, capacity shortage can be avoided. For the case company in this study, the increasing demand results in the continuous improvement in net profit because of the demand growth. However, the number of machine and tool migrations is unaffected by demand change; as demand decreases, net profit and the number of machine and tool migrations are reduced as demand is decreased. Doing so can avoid unnecessary migration costs, as shown in Tables10 and 11.Table 10
Changes in migration costs and net profit under positively growing demand.
Demand growth multiples
2
4
6
8
10
Machine migration cost
13,000
13,000
13,000
13,000
13,000
Tool migration cost
4,000
4,000
4,000
4,000
4,000
Net profit
110,214,963
136,961,643
141,816,636
145,421,413
146,009,670Table 11
Changes in migration costs and net profit under negatively decreasing demand.
Demand reduction multiples
0.9
0.7
0.5
0.3
0.1
Machine migration cost
9,500
6,500
6,500
6,500
6,500
Tool migration cost
3,000
3,000
1,000
1,000
1,000
Net profit
72,888,460
58,776,998
42,229,098
25,345,259
8,443,419


#### 4.4.2. Effect of Changes in Unit Migration Cost on Machine/Tool Migration and Net Profit

The unit migration cost affects moving times. When the unit migration cost is more expensive, it significantly increases the total migration cost, thereby lowering the net profit. When the unit migration cost is considerably inexpensive, frequent machine/tool migrations and production amounts of products may increase, thereby increasing the net profit. For the case company in this study, when the unit migration cost starts to increase, the net profit will decrease, and the number of machine/tool migrations will also decrease. When the unit migration cost is down, the net profit will increase. However, the number of machine/tool migrations remains constant, as shown in Tables12 and 13.Table 12
Changes in migration decisions and net profit under the increased unit migration cost.
Increased unit migration cost (multiple)
2
5
10
50
100
Machine migration amount
5
4
4
3
3
Tool migration amount
4
4
3
3
2
Net profit
77,543,489
77,505,527
77,454,535
77,073,544
76,645,716Table 13
Changes in migration decisions and net profit under the reduced unit migration cost.
Reduced unit migration cost (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
77,558,889
77,561,689
77,564,489
77,567,289
77,570,089


#### 4.4.3. Effect of Sales Price Fluctuation on Machine and Tool Migration and Net Profit

The sales price of products affects net profit. If sales price is higher, then the net profit increases. By contrast, if sale price is down, then the net profit decreases. When sales price is higher, salesmen will attempt to address the customer needs and provide higher service level; when sales price is lower, they cannot completely meet the customer promise needs, thereby resulting in the occurrence of short supply, which lowers service level. Thus, a better balanced decision must be determined between sales revenue and production/migration costs. For the case company in this study, as shown in Tables14 and 15, when sales price is raised, the net profit increases and machine/tool migration decisions are not affected; on the contrary, when the sales price is lowered, the net profit decreases and machine/tool migration amounts are also reduced because of low sales price.Table 14
Changes in migration decisions and net profit under the increased sales price.
Increased sales price (multiple)
2
4
6
10
50
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
220,928,485
339,561,046
514,230,084
863,568,161
4,356,948,922Table 15
Changes in migration decisions and net profit under the reduced sales price.
Increased sales price (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
3
Tool migration amount
4
4
4
4
2
Net profit
68,824,037
51,357,134
33,890,230
16,423,326
1,499,394


#### 4.4.4. Effect of Migration Capability on Machine and Tool Migration and Net Profit

Given that capacity allocation decisions are made, several products may not be manufactured because of the limited flexibility of machine and tool migration. Production capacity cannot be allocated flexibly between different production lines. Without migration capability limitation, all machines and tools become movable, which is advantageous to the adjustment of capacity. By contrast, if the flexibility of migration is limited, then adjusting to a considerably high capacity level is difficult, thereby decreasing net profit, as shown in Table16. Moreover, the number of machine migrations increases as migration flexibility opens.Table 16
Changes in migration decisions and net profit under different migration flexibility.
Migration capability
Limited
Opened
Machine migration amount
3
6
Tool migration amount
3
3
Machine migration cost
6,500
11,500
Tool migration cost
3,000
3,000
Net profit
78,227,955
84,600,698


## 4.1. Introduction to the Case Background

This study aims to conduct a capacity allocation and migration planning for customer demands by considering a certain large-scale semiconductor packaging and testing factory as the case study. Three customers, eight types of products, and two production lines are involved in this case. The manufacturing process is divided into three bottleneck production stages, namely, the DB, WB, and MD stations in turn. Furthermore, the factory has three types of machines, four types of tools, and four categories of materials. The planning horizon covers four periods. For resource configuration, the DB and WB stations have three configurations consisting of machines. The MD station has seven kinds of configurations consisting of machines, tools, and materials. Appendix B (see Supplementary Material) shows the related information necessary for this case study.


## 4.2. Capacity Planning Results

The case problem is handled under demand uncertainty. The maximum net profit is $77,557,489.83 for the stochastic programming model. Table1 shows the number of machines for the lines in the production stages in each time period. Table 2 presents the migration number of machines between lines in each production stage in each time period. Table 3 indicates the number of tools for the lines in the MD stage in each time period. Table 4 presents the migration number of tools between lines in the MD stage in each time period. Table 5 expresses the sales amounts of products for each customer in each time period under different scenarios.Table 1
The number of machines for lines at production stages in each time period (K
Q
l
s
k
t).
Line
Production stage
Types of machine
k
1
k
2
k
3
Time (month)
Time (month)
Time (month)
1
2
3
4
1
2
3
4
1
2
3
4
l
1
DB
10
10
10
10
15
15
15
15
0
0
0
0
WB
5
4
4
4
6
6
6
6
1
1
1
1
MD
9
9
9
9
10
10
10
10
1
1
1
1
l
2
DB
0
0
0
0
5
5
5
5
6
6
6
6
WB
0
0
0
0
10
10
10
10
8
8
8
8
MD
2
2
2
2
5
5
5
5
6
6
6
1Table 2
The migration number of machines between lines at each production stage in each time period (K
M
l
l
′
s
k
t).
Line
Move to line
Production stage
DB
WB
MD
Types of machine
Types of machine
Types of machine
k
1
k
2
k
3
k
1
k
2
k
3
k
1
k
2
k
3
Time
Time
Time
Time
Time
Time
Time
Time
Time
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l1
l2
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
l2
l1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
2
0
0
0Table 3
The number of tools for lines at MD stage in each time period (N
Q
l
s
n
t).
Line
Production stage
Types of tool
n
1
n
2
n
3
n
4
Time (month)
Time (month)
Time (month)
Time (month)
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l
1
MD
1
1
1
1
30
29
29
29
1
1
1
1
29
29
29
29
l2
MD
29
29
29
29
0
1
1
1
19
19
19
19
1
1
1
1Table 4
The migration number of tools between lines at MD stage in each time period (N
M
l
l
′
s
n
t).
Line
Move to line
Types of tool
n
1
n
2
n
3
n
4
Time
Time
Time
Time
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
l
1
l2
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
l2
l1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0Table 5
The sales amounts of products for each customer in each time period under different scenarios (S
Q
i
c
t
r).
Scenario
Product
Customer
Time period (month)
1
2
3
4
Scenario 1
i
1
c
1
45,955
80,375
11,400
37,666
Scenario 1
i
2
c
1
137,866
40,188
72,154
0
Scenario 1
i
3
c
1
99,999
21,265
0
62,030
Scenario 1
i
4
c
2
91,911
60,281
54,115
0
Scenario 1
i
5
c
2
22,978
120,563
45,096
15,066
Scenario 1
i
6
c
3
99,999
48,893
0
33,379
Scenario 1
i
7
c
3
53,614
24,113
53,175
33,899
Scenario 1
i
8
c
3
199,998
21,768
0
11,300
Scenario 2
i
1
c
1
48,000
96,000
13,500
60,000
Scenario 2
i
2
c
1
144,000
48,000
96,000
0
Scenario 2
i
3
c
1
99,999
22,857
0
96,428
Scenario 2
i
4
c
2
96,000
72,000
72,000
0
Scenario 2
i
5
c
2
24,000
144,000
60,000
24,000
Scenario 2
i
6
c
3
99,999
54,307
48,647
0
Scenario 2
i
7
c
3
56,000
28,800
68,192
54,000
Scenario 2
i
8
c
3
199,998
26,000
0
18,000
Scenario 3
i
1
c
1
50,045
108,987
0
82,334
Scenario 3
i
2
c
1
150,134
55,812
116,115
0
Scenario 3
i
3
c
1
58,416
0
0
99,999
Scenario 3
i
4
c
2
100,089
83,719
89,885
0
Scenario 3
i
5
c
2
25,022
167,437
74,904
32,934
Scenario 3
i
6
c
3
99,999
58,778
0
61,055
Scenario 3
i
7
c
3
58,386
33,487
82,200
74,101
Scenario 3
i
8
c
3
199,998
30,232
0
24,700


## 4.3. Expected Value of Perfect Information (EVPI) and Value of the Stochastic Solution (VSS)

WS stands for “wait and see”; thus the decision-maker must wait for all information to be revealed before making a decision. The objective is to maximize the net profit. The solution obtained through the deterministic model with average demand is called the expected value (EV) solution. Through the EV solution, the individual objective values of all demand scenarios can be obtained. Thereafter, these objective values are multiplied by the occurring probability of the corresponding scenario to obtain the expected value, namely, the expected result of using the EV solution (EEV). The “here and now” type indicates the maximized net profit value of stochastic programming, which is called SP. For the capacity allocation and migration planning problem in this study, the solving result through SP under uncertainty is compared with the deterministic model. Two indicators, namely, expected value of perfect information (EVPI) and value of the stochastic solution (VSS), are used for analysis.The optimal objective value of the stochastic programming model is compared with the expected value of the WS solutions. The latter is calculated by determining the optimal solution for each possible realization of the demand scenarios with certainty. Clearly, it is better to know the value of the future actual demand before making a decision than having to make the decision before knowing. The difference between these two expected objective values is called EVPI. Furthermore, EVPI measures the maximum amount a decision-maker would be willing to pay in return for complete (and accurate) information about the future to solve uncertainty. Thus, EVPI is defined in (24). If EVPI is smaller, the stochastic programming result is closer to the result obtained with complete information. By contrast, if EVPI is larger, the influence of uncertain factors is greater and the price paid for obtaining complete information is considerably high:(24)
EVPI
=
WS
-
SP
.VSS is used to measure the ability of the stochastic programming model to increase net profit, with the attempt to solve uncertain factors. It is the difference between the solution of the SP model and the expected value of the objective function when fixing parameters to average values and using the corresponding optimal solution. Thus, VSS is defined in (25). VSS conveys to us how much we can gain more if SP is used. If VSS is larger, the SP result is better than the expected result when using the EV solution obtained by replacing all possible demands with their average values:(25)
VSS
=
SP
-
EEV
.The related measurements for the case problem in this study are showed in Table6.Table 6
The related measurements for the case problem.
Net profit
WS
77,560,489.83
SP
77,557,489.83
EEV
77,439,044.28
EVPI
3000.00
VSS
118,445.55
V
S
S
E
E
V
×
100 (%)
0.15%


### 4.3.1. Net Profit Fluctuation under Different Combinations of Probability

Different probability combinations are designed to investigate whether the occurring probability of all demand scenarios affects the net profit. The combined design individually provides significantly high probability values to low, mean, and high demand scenarios. Table7 shows that the capacity planning results under all probability combinations indicate that net profits using the SP model are higher than those using the deterministic model. Moreover, if the occurring probability of low demand scenario is 0.8, then its net profit is significantly lower than that of the mean demand or high demand scenario, which possesses an occurring probability of 0.8. Therefore, the occurring probability of the scenario is positively related to the demand of each corresponding scenario; that is, determining the occurring probability of scenario is highly important when using the SP model.Table 7
The related measurements for different probability combinations.
Probability combination∗
WS
SP
EEV
(0.8, 0.1, 0.1)
69,966,361.66
69,962,311.66
69,959,928.00
(0.1, 0.8, 0.1)
78,027,716.20
78,023,666.20
78,021,282.53
(0.1, 0.1, 0.8)
84,687,393.96
84,686,493.96
84,635,924.63
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.


### 4.3.2. Changes in EVPI and VSS under Different Probability Combinations

The current study analyzes whether the occurring probabilities of all demand scenarios have an effect on EVPI and VSS. Accordingly, several probability combinations of demand scenarios are designed, including the probability combination with considerably high occurring probability of specific demand scenario. EVPI and VSS under different probability combinations are shown in Table8. Figure 5 shows that when the probability combination is (0.1, 0.1, 0.8), the net profit gap between the deterministic model and SP model is $50,569. Moreover, the decision-maker is willing to pay $900 in return for the complete information on future uncertainty. Hence, when the occurring probability of high demand is higher, EVPI is lower. Specifically, the solving result of net profit under complete (perfect) information is closer to the decision made by the SP model. Similarly, if VSS is higher, then the obtained benefit from the SP model is better.Table 8
EVPI and VSS under different probability combinations.
Probability combinations∗
EVPI
VSS
(0.8,0.1,0.1)
4,050
2,384
(0.3,0.5,0.2)
3,600
9,267
(0.3,0.4,0.3)
3,150
16,151
(0.333,0.333,0.333)
3,000
18,446
(0.2,0.3,0.5)
2,250
29,918
(0.1,0.1,0.8)
900
50,569
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.Figure 5
The diagram for EVPI and VSS under different probability combinations.


### 4.3.3. Effect of Demand Variability on Net Profit, EVPI, and VSS

Three types of demand variability are designed in this study. Base Case aims to infer demands of all scenarios using the coefficient of variation. Small variation is equal to 90% of Base Case (middle variation), and large variation is 110% of Base Case. After individually solving the three different variations, the net profit in all variations under the SP model and deterministic model can be calculated (Table9). It also can be found from Figure 6 that the gap in net profit will increase with the increase of demand variation. Thus, the SP model considers demand uncertainty, and its result is better than that of the deterministic model, which only considers average demand.Table 9
Comparison of net profit under demand variability.
Demand variability
EEV
SP
Gap
Small variation
72,884,515
72,888,460
3,945
Middle variation
77,539,044
77,557,489
18,445
Large variation
82,113,557
82,134,434
20,877Figure 6
Gap in net profit under different demand variability.


## 4.3.1. Net Profit Fluctuation under Different Combinations of Probability

Different probability combinations are designed to investigate whether the occurring probability of all demand scenarios affects the net profit. The combined design individually provides significantly high probability values to low, mean, and high demand scenarios. Table7 shows that the capacity planning results under all probability combinations indicate that net profits using the SP model are higher than those using the deterministic model. Moreover, if the occurring probability of low demand scenario is 0.8, then its net profit is significantly lower than that of the mean demand or high demand scenario, which possesses an occurring probability of 0.8. Therefore, the occurring probability of the scenario is positively related to the demand of each corresponding scenario; that is, determining the occurring probability of scenario is highly important when using the SP model.Table 7
The related measurements for different probability combinations.
Probability combination∗
WS
SP
EEV
(0.8, 0.1, 0.1)
69,966,361.66
69,962,311.66
69,959,928.00
(0.1, 0.8, 0.1)
78,027,716.20
78,023,666.20
78,021,282.53
(0.1, 0.1, 0.8)
84,687,393.96
84,686,493.96
84,635,924.63
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.


## 4.3.2. Changes in EVPI and VSS under Different Probability Combinations

The current study analyzes whether the occurring probabilities of all demand scenarios have an effect on EVPI and VSS. Accordingly, several probability combinations of demand scenarios are designed, including the probability combination with considerably high occurring probability of specific demand scenario. EVPI and VSS under different probability combinations are shown in Table8. Figure 5 shows that when the probability combination is (0.1, 0.1, 0.8), the net profit gap between the deterministic model and SP model is $50,569. Moreover, the decision-maker is willing to pay $900 in return for the complete information on future uncertainty. Hence, when the occurring probability of high demand is higher, EVPI is lower. Specifically, the solving result of net profit under complete (perfect) information is closer to the decision made by the SP model. Similarly, if VSS is higher, then the obtained benefit from the SP model is better.Table 8
EVPI and VSS under different probability combinations.
Probability combinations∗
EVPI
VSS
(0.8,0.1,0.1)
4,050
2,384
(0.3,0.5,0.2)
3,600
9,267
(0.3,0.4,0.3)
3,150
16,151
(0.333,0.333,0.333)
3,000
18,446
(0.2,0.3,0.5)
2,250
29,918
(0.1,0.1,0.8)
900
50,569
∗The occurring probability of low demand, mean demand, and high demand scenarios, respectively.Figure 5
The diagram for EVPI and VSS under different probability combinations.


## 4.3.3. Effect of Demand Variability on Net Profit, EVPI, and VSS

Three types of demand variability are designed in this study. Base Case aims to infer demands of all scenarios using the coefficient of variation. Small variation is equal to 90% of Base Case (middle variation), and large variation is 110% of Base Case. After individually solving the three different variations, the net profit in all variations under the SP model and deterministic model can be calculated (Table9). It also can be found from Figure 6 that the gap in net profit will increase with the increase of demand variation. Thus, the SP model considers demand uncertainty, and its result is better than that of the deterministic model, which only considers average demand.Table 9
Comparison of net profit under demand variability.
Demand variability
EEV
SP
Gap
Small variation
72,884,515
72,888,460
3,945
Middle variation
77,539,044
77,557,489
18,445
Large variation
82,113,557
82,134,434
20,877Figure 6
Gap in net profit under different demand variability.


## 4.4. Sensitivity Analysis

### 4.4.1. Effect of Demand Change on Machine and Tool Migration and Net Profit

Demand change is the primary problem discussed in this study. The semiconductor packaging and testing industry cannot accurately forecast the actual demand of customers. If the demand change constantly shows positive growth or a substantial negative reduction, then the two-stage SP model will significantly respond to considerable demand change compared to the deterministic model. Hence, when the actual demand is lower, capacity waste can be reduced. By contrast, when the actual demand is higher, capacity shortage can be avoided. For the case company in this study, the increasing demand results in the continuous improvement in net profit because of the demand growth. However, the number of machine and tool migrations is unaffected by demand change; as demand decreases, net profit and the number of machine and tool migrations are reduced as demand is decreased. Doing so can avoid unnecessary migration costs, as shown in Tables10 and 11.Table 10
Changes in migration costs and net profit under positively growing demand.
Demand growth multiples
2
4
6
8
10
Machine migration cost
13,000
13,000
13,000
13,000
13,000
Tool migration cost
4,000
4,000
4,000
4,000
4,000
Net profit
110,214,963
136,961,643
141,816,636
145,421,413
146,009,670Table 11
Changes in migration costs and net profit under negatively decreasing demand.
Demand reduction multiples
0.9
0.7
0.5
0.3
0.1
Machine migration cost
9,500
6,500
6,500
6,500
6,500
Tool migration cost
3,000
3,000
1,000
1,000
1,000
Net profit
72,888,460
58,776,998
42,229,098
25,345,259
8,443,419


### 4.4.2. Effect of Changes in Unit Migration Cost on Machine/Tool Migration and Net Profit

The unit migration cost affects moving times. When the unit migration cost is more expensive, it significantly increases the total migration cost, thereby lowering the net profit. When the unit migration cost is considerably inexpensive, frequent machine/tool migrations and production amounts of products may increase, thereby increasing the net profit. For the case company in this study, when the unit migration cost starts to increase, the net profit will decrease, and the number of machine/tool migrations will also decrease. When the unit migration cost is down, the net profit will increase. However, the number of machine/tool migrations remains constant, as shown in Tables12 and 13.Table 12
Changes in migration decisions and net profit under the increased unit migration cost.
Increased unit migration cost (multiple)
2
5
10
50
100
Machine migration amount
5
4
4
3
3
Tool migration amount
4
4
3
3
2
Net profit
77,543,489
77,505,527
77,454,535
77,073,544
76,645,716Table 13
Changes in migration decisions and net profit under the reduced unit migration cost.
Reduced unit migration cost (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
77,558,889
77,561,689
77,564,489
77,567,289
77,570,089


### 4.4.3. Effect of Sales Price Fluctuation on Machine and Tool Migration and Net Profit

The sales price of products affects net profit. If sales price is higher, then the net profit increases. By contrast, if sale price is down, then the net profit decreases. When sales price is higher, salesmen will attempt to address the customer needs and provide higher service level; when sales price is lower, they cannot completely meet the customer promise needs, thereby resulting in the occurrence of short supply, which lowers service level. Thus, a better balanced decision must be determined between sales revenue and production/migration costs. For the case company in this study, as shown in Tables14 and 15, when sales price is raised, the net profit increases and machine/tool migration decisions are not affected; on the contrary, when the sales price is lowered, the net profit decreases and machine/tool migration amounts are also reduced because of low sales price.Table 14
Changes in migration decisions and net profit under the increased sales price.
Increased sales price (multiple)
2
4
6
10
50
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
220,928,485
339,561,046
514,230,084
863,568,161
4,356,948,922Table 15
Changes in migration decisions and net profit under the reduced sales price.
Increased sales price (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
3
Tool migration amount
4
4
4
4
2
Net profit
68,824,037
51,357,134
33,890,230
16,423,326
1,499,394


### 4.4.4. Effect of Migration Capability on Machine and Tool Migration and Net Profit

Given that capacity allocation decisions are made, several products may not be manufactured because of the limited flexibility of machine and tool migration. Production capacity cannot be allocated flexibly between different production lines. Without migration capability limitation, all machines and tools become movable, which is advantageous to the adjustment of capacity. By contrast, if the flexibility of migration is limited, then adjusting to a considerably high capacity level is difficult, thereby decreasing net profit, as shown in Table16. Moreover, the number of machine migrations increases as migration flexibility opens.Table 16
Changes in migration decisions and net profit under different migration flexibility.
Migration capability
Limited
Opened
Machine migration amount
3
6
Tool migration amount
3
3
Machine migration cost
6,500
11,500
Tool migration cost
3,000
3,000
Net profit
78,227,955
84,600,698


## 4.4.1. Effect of Demand Change on Machine and Tool Migration and Net Profit

Demand change is the primary problem discussed in this study. The semiconductor packaging and testing industry cannot accurately forecast the actual demand of customers. If the demand change constantly shows positive growth or a substantial negative reduction, then the two-stage SP model will significantly respond to considerable demand change compared to the deterministic model. Hence, when the actual demand is lower, capacity waste can be reduced. By contrast, when the actual demand is higher, capacity shortage can be avoided. For the case company in this study, the increasing demand results in the continuous improvement in net profit because of the demand growth. However, the number of machine and tool migrations is unaffected by demand change; as demand decreases, net profit and the number of machine and tool migrations are reduced as demand is decreased. Doing so can avoid unnecessary migration costs, as shown in Tables10 and 11.Table 10
Changes in migration costs and net profit under positively growing demand.
Demand growth multiples
2
4
6
8
10
Machine migration cost
13,000
13,000
13,000
13,000
13,000
Tool migration cost
4,000
4,000
4,000
4,000
4,000
Net profit
110,214,963
136,961,643
141,816,636
145,421,413
146,009,670Table 11
Changes in migration costs and net profit under negatively decreasing demand.
Demand reduction multiples
0.9
0.7
0.5
0.3
0.1
Machine migration cost
9,500
6,500
6,500
6,500
6,500
Tool migration cost
3,000
3,000
1,000
1,000
1,000
Net profit
72,888,460
58,776,998
42,229,098
25,345,259
8,443,419


## 4.4.2. Effect of Changes in Unit Migration Cost on Machine/Tool Migration and Net Profit

The unit migration cost affects moving times. When the unit migration cost is more expensive, it significantly increases the total migration cost, thereby lowering the net profit. When the unit migration cost is considerably inexpensive, frequent machine/tool migrations and production amounts of products may increase, thereby increasing the net profit. For the case company in this study, when the unit migration cost starts to increase, the net profit will decrease, and the number of machine/tool migrations will also decrease. When the unit migration cost is down, the net profit will increase. However, the number of machine/tool migrations remains constant, as shown in Tables12 and 13.Table 12
Changes in migration decisions and net profit under the increased unit migration cost.
Increased unit migration cost (multiple)
2
5
10
50
100
Machine migration amount
5
4
4
3
3
Tool migration amount
4
4
3
3
2
Net profit
77,543,489
77,505,527
77,454,535
77,073,544
76,645,716Table 13
Changes in migration decisions and net profit under the reduced unit migration cost.
Reduced unit migration cost (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
77,558,889
77,561,689
77,564,489
77,567,289
77,570,089


## 4.4.3. Effect of Sales Price Fluctuation on Machine and Tool Migration and Net Profit

The sales price of products affects net profit. If sales price is higher, then the net profit increases. By contrast, if sale price is down, then the net profit decreases. When sales price is higher, salesmen will attempt to address the customer needs and provide higher service level; when sales price is lower, they cannot completely meet the customer promise needs, thereby resulting in the occurrence of short supply, which lowers service level. Thus, a better balanced decision must be determined between sales revenue and production/migration costs. For the case company in this study, as shown in Tables14 and 15, when sales price is raised, the net profit increases and machine/tool migration decisions are not affected; on the contrary, when the sales price is lowered, the net profit decreases and machine/tool migration amounts are also reduced because of low sales price.Table 14
Changes in migration decisions and net profit under the increased sales price.
Increased sales price (multiple)
2
4
6
10
50
Machine migration amount
5
5
5
5
5
Tool migration amount
4
4
4
4
4
Net profit
220,928,485
339,561,046
514,230,084
863,568,161
4,356,948,922Table 15
Changes in migration decisions and net profit under the reduced sales price.
Increased sales price (multiple)
0.9
0.7
0.5
0.3
0.1
Machine migration amount
5
5
5
5
3
Tool migration amount
4
4
4
4
2
Net profit
68,824,037
51,357,134
33,890,230
16,423,326
1,499,394


## 4.4.4. Effect of Migration Capability on Machine and Tool Migration and Net Profit

Given that capacity allocation decisions are made, several products may not be manufactured because of the limited flexibility of machine and tool migration. Production capacity cannot be allocated flexibly between different production lines. Without migration capability limitation, all machines and tools become movable, which is advantageous to the adjustment of capacity. By contrast, if the flexibility of migration is limited, then adjusting to a considerably high capacity level is difficult, thereby decreasing net profit, as shown in Table16. Moreover, the number of machine migrations increases as migration flexibility opens.Table 16
Changes in migration decisions and net profit under different migration flexibility.
Migration capability
Limited
Opened
Machine migration amount
3
6
Tool migration amount
3
3
Machine migration cost
6,500
11,500
Tool migration cost
3,000
3,000
Net profit
78,227,955
84,600,698


## 5. Conclusion

This study considers a certain large-scale semiconductor packaging and testing factory to address capacity allocation and migration planning problems under demand uncertainty. The planning scope includes three bottleneck stations, namely, the DB, WB, and MD stations. Moreover, the two-stage stochastic programming approach is applied and its mathematical model is formulated to solve this problem. Machine and tool migration decisions are deemed to be the first-stage decision. The second-stage decision is capacity allocation, which can be solved once the uncertain factors are revealed. Hence, when demand is changed, machine and tool migration decisions remain to be a better robust result. The measuring indicators, EVPI and VSS, are applied to evaluate the SP model and the deterministic EEV model. SP obtains a better net profit than EEV; the VSS values obtained are positive. Thus, the two-stage SP model proposed in this study can indeed improve the deficiencies of the traditional deterministic model. Furthermore, decision-makers can make good use of sensitivity analysis results as reference.This paper can assist the semiconductor packaging and testing factory in simultaneously conducting capacity allocation and resource configuration planning with the use of existing resources. Moreover, the two-stage SP method determines a robust machine and tool migration decision in advance as a response to future fluctuating demand. This model can also obtain the optimal capacity allocation and migration planning decision. It is closer to actual industry application and reaches the economic target of semiconductor packaging and testing industry, namely, meeting customer needs and maximizing net profit.



---

*Source: 741329-2015-12-14.xml*