#### Abstract

Ship block construction space is an important bottleneck resource in the process of shipbuilding, so the production scheduling optimization is a key technology to improve the efficiency of shipbuilding. With respect to ship block construction space scheduling problem, a hybrid heuristic algorithm is proposed in this paper. Firstly, Bottom-Left-Fill (BLF) process is introduced. Next, an initial solution is obtained by guiding the sorting process with corners. Then on the basis of the initial solution, the simulated annealing arithmetic (SA) is used to improve the solution by offering a possibility to accept worse neighbor solutions in order to escape from local optimum. Finally, the simulation experiments are conducted to verify the effectiveness of the algorithm.

#### 1. Introduction

Space is the key resource in ship block construction process. How to minimize the makespan of the project under space resource and precedence constraints is a complicated scheduling problem. As for this problem, two related problems are involved: resource constrained project scheduling problem (RCPSP) and bin packing problem.

RCPSP can be described as a problem which should be scheduled under the limits of technology and other constraints to meet the objective of a project [1]. Generally, the goal is to get the shortest project makespan under the available resources and precedence constraints. The methods can be classified into two categories: exact methods and heuristic methods. Hartmann [2] puts forward that RCPSP belongs to NP-hard problem because it is always used to extend machine scheduling problem [3, 4]. So with the augment of problem scale, the computational complexity will increase rapidly. Many researchers have used exact algorithm to solve RCPSP [5, 6]; however, most of them proposed that exact algorithm is not feasible in reality. Priority rules proposed by Kelley [7] indicated that RCPSP can be solved by heuristic algorithms. Liu and Wang [8] tried to reduce the project makespan by heuristic algorithms and achieved good results. Bhaskar et al. [9] utilized parallel methods and priority rules to solve RCPSP with fuzzy activity times. Lee et al. [10] proposed a ship block construction space scheduling problem and described this problem theoretically. Koh et al. [11] solved the scheduling problem in shipbuilding company by heuristic algorithm.

The bin packing problem is putting more boxes into a limited bin in order to minimum the height. This problem can be classified into two categories, two-dimensional and three-dimensional problems. For the former one, researchers tend to solve bin packing problems by heuristic methods. They are Bottom-Left (BL) algorithm [12], Bottom-Left-Fill (BLF) algorithm [13]. In addition, Belov et al. [14] considered adapting one-dimensional problem for solving two-dimensional problems. Chan et al. [15] tried to solve two-dimensional problems by heuristics with stochastic neighborhood structures. For three-dimensional problems, the most popular 3BF [16], proposed by Silvano Martello in 2000, figure out the problem of how to choose the most suitable cubes. Alvarez-Valdes et al. [17] used a GRASP/Path relinking algorithm to solve multiple bin-size bin packing problems. Liao and Hsu [18] found new lower bounds to improve the efficiency of three-dimensional problems.

This paper is organized as follows. After introduction, Section 2 presents a mathematical model. Section 3 gives the hybrid heuristic algorithm for this problem. In Section 4, we conduct simulation experiments to verify the effectiveness of the algorithm. Section 5 proposes general conclusions.

#### 2. Ship Block Construction Space Scheduling Problem

Ship block construction space scheduling problem can be described as a project which includes activities ; place is required to process activities. activity can be defined as , where and represent the length and width of place which activity needs. The duration of activity is . and are the start and finish time of activity . During the project, there are places which can be defined as .

During the project, every activity is under precedence constraints, and we propose that is the predecessors of activity . So can not be started if any one of its predecessors in has not been finished. We assume that the start time of the whole project is 0. For the convenience of modeling, we also introduce two dummy nodes: activity 0 and . They do not need time and space. 0 is the predecessor of all the activities in the project; meanwhile, is the successor of all the activities. So is the makespan of the project. In addition, we regard an activity as a cube which is represented as . All the activities can be rotated in horizontal with 90 degree, and and 0, indicating that activity is rotated and not, respectively. The model of this problem is shown in what follows:

In the model, formula (1) is the objective of the problem, (2) proposes the precedence constraints, and (3) means that two cubes cannot overlap. Formulae (4)–(7) denote that each cube should be completed within available place. The cube can be rotated horizontally and 0 and 1 represent if the cube is rotated, as formula (8) has shown.

#### 3. A Hybrid Heuristic Algorithm

##### 3.1. Initial Solution Method

In this paper, we apply BLF to get the initial solution. BLF, presented by Chazelle [13] in 1983, belongs to heuristic algorithm. In this algorithm, the method of placing cubes is determined by corners [19].

###### 3.1.1. Corner

In BLF, it is important to find corners to place the activity. Firstly, we will try the lowest and leftmost point (lowest point first); if this placement can match the activity, then place it in the position and update corners; otherwise, try next point until a corner is found. The corners can be represented as , where indicates the location of the corners and represents the available space of the point in -- dimensions. See Figure 1; and denote the length and width of the place and represents the duration of the project.

###### 3.1.2. Bottom-Left-Fill Algorithm

In this paper, we represent the activities as cubes whose length, width, and height are limited. For these cubes, the length and width denote the length and width of the place they need, and the height represents the time they need. Meanwhile, we regard the unrestricted height as timeline . When all activities have been placed, the total height equals the duration of the project. In the process, we find activities that can be placed at each time point first and then consider the sequence of these activities. We place the activity with larger bottom area first; if equal, choose the higher height; if still equal, select the one with the longer length. We describe the algorithm as follows.(1)We embed the place (the platform in ship block construction space) in a three-dimensional coordinate system, put the bottom-left-rear point on the origin (0, 0, 0), and put length, width, and height on , , and axis, respectively. and represent length and width of the place.(2)Set 5 sets: , , , , and . is a set of activities which have been scheduled but not yet completed. is a set of activities which have been scheduled and already completed. is a set of activities which can be scheduled but have not been scheduled yet. is a set of corners, while is a set of all activities in input order.(3)Move the activities which can be scheduled from to and then sort these activities: firstly, interchange the length and width of the activities so that can be met for any activity ; then sort the activities in by placement policy mentioned above, and the first activity should be scheduled in after being sorted. Detect the corners in until the first eligible corner is found by -- rule, which means that the smaller among the corners is better. Then, consider the smaller . Finally, select the smaller . Put the bottom-left-rear point of the activity on the selected corner, and the new eligible corners will be new elements of ; meanwhile delete the corner which is used this time from *.* Record the activities and their corners sequentially.(4)If an activity in has been completed, move it from to and then move its nearest successor from to . Sort activities in by rules mentioned in (3). Repeat (3) and (4) until all activities are completed.(5)Select the higher of all corners as the duration of the project.

##### 3.2. Optimization Solution Method

Proposed by Steinbrunn et al. [20], simulated annealing (SA) is a metaheuristic algorithm which offers a possibility to accept worse neighbor solutions to escape from local optimum. Until 1983, Kirkpatrick et al. [21] transformed this idea to SA arithmetic and applied it to traveling salesman problem successfully.

Chan et al. [22] develop a hybrid algorithm which gleans the ideas both from tabu search and sample sort simulated annealing to solve distributed scheduling problem. Bouleimen and Lecocq [23] implemented SA to RCPSP and MRCPSP. Yannibelli and Amandi [24] combined SA and other algorithms to solve a multiobjective project scheduling problem. In SA arithmetic, we describe the neighborhood as the modification of the order of two activities which can be scheduled at the same time. represents temperature decreasing rate, denotes the initial value of neighborhood, represents the neighbors that are generated once the temperature drops, denotes current duration, denotes the shortest duration till now. For our ship block construction space scheduling problem, the SA can be described as follows.(1)Initialization: the initial and final temperature is and , respectively. The algorithm iterates from initial solution *.* The value of initial evaluation function is , while the evaluation function value of initial optimal solution is .(2) denotes the current temperature and denotes the length of current neighborhood. Initially , *.*(3).(4)Select a new solution from the neighborhood of *.*(5)Calculate the incremental .(6)If , accept as a new solution, , ; if , then , . Else accept as a new solution with a probability .(7), if , go to step (4); else go to step (8).(8), , and compare and . If , go to step (3); else the termination condition is met and output current and ; end the program.

#### 4. Simulation Experiment

We use a set of activities to verify our algorithm. The parameters of these activities are shown in Table 1, and the network diagram of activities is presented in Figure 2. There are 2 places in the experiment, , , and represent length, width, and time, respectively. The length and width of place 1 are 3 and 3, while 3 and 2 are for place 2.

##### 4.1. Generation of Initial Solution

We get the initial solution as follows.(1)At first, . can be arranged at this time. According to the rule above, we adjust the order to . Activity 3 will be completed in place 1, so we put the bottom-left-rear point of it at the origin of place 1. So three new corners , , are produced. Update , , , , , , , , . See Figure 3.(2)Next, activity 5 will be scheduled on place 2. We put the bottom-left-rear point of activity 5 at the origin of place 2. Then new corners , , are produced. According to the rule, we delete . Update , , . , , , , , , . See Figure 4.(3)Detect the corners of and is selected for activity 2. After activity 2 is scheduled, three new corners are produced and only is eligible to be a corner. Considering that part of the space has been occupied by activity 2, we should retest the available space of previous corners when we update . should be modified into . Then , , , , , , . See Figure 5.(4)At time 0, activity 4 will be put in order. Detect and put it on . After testing, only can be a new corner. Similarly, the available space of previous corners in should also be retested and should be changed into . , , , , , , . See Figure 6.(5)At time 0, space is still available, but it is not enough for any remaining activity. So next time point is , and activity 5 is completed at this time. , , . After ordering, is changed into . In order to arrange activity 15, we detect . If there is any corner whose value of is less than 3, we should change it into 3 and modify available space of this corner. For example, should be changed into before activity 15 is put. Meanwhile, the space of this corner should be changed into after activity 15 is put. We lay activity 15 on . , , , , . See Figure 7.(6)According to this train of thought, we get an initial solution , , , , , , , , , , , , , , , , in which means activity should be started at time , and the space it needs can be represented as . According to the initial solution, the whole duration of the project is 25. The status of place 1 and place 2 is shown in Figure 8.

**(a) Place 1**

**(b) Place 2**

##### 4.2. Optimization of Initial Solution

In SA, the order of activities has great influence on the duration of the project. So by searching the neighborhood and increasing the size of neighborhood dynamically, we manage to use SA and improve the initial solution.

We show a step of improvement as follows.(1), .(2), .(3)If , go to step (4); else output current and ; finish the program.(4).(5)If , , and go to step (4); else go to next step.(6)Select from the neighborhood of . In our example, we swap the order of activity 6 and activity 7. Then, we get another solution , , , , , , , , , , , , , , , . , . . If , go to step (7); else, go to step (8). The current is 1, so go to step (7).(7)Compare and , if , , ; else and go to step (5). In this example, , so , .(8)Generate a number randomly, if , , , , and go to step (5).

After this improvement, the optimal solution reduces from 25 to 24. So it is proved that the method is effective.

#### 5. Conclusion

In this paper, we combine BLF and SA to solve ship block construction space scheduling problem. During the procedure of scheduling activities, we guide the sorting process with corners. Then, the sorting of initial solution can be changed by SA. However, how to improve the searching efficiency will be the future research, especially when the number of blocks is very large.

#### Conflict of Interests

The authors declare that they have no financial and personal relationships with other people or organizations that can inappropriately influence their work, and they also declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgments

This work was supported in part by NSFC under Grant no. 61202345, NSFS under Grant no. ZR2012FM006, and SDPW under Grant no. IMZQWH010016. The authors thank the 2 reviewers and handling editor for their meticulous reading of the paper and constructive comments which greatly improved the paper.