• Tidak ada hasil yang ditemukan

The Evolutionary Solver

Heuristic Methods for the Single-machine Problem

4.8 The Evolutionary Solver

Most of the algorithms we discuss, both optimization algorithms and heuristic algorithms, require specialized computer code for implementation. As yet, there are very few“off-the-shelf”codes available for sequencing, although the Internet may become a source in the future. Nevertheless, one widely used platform for calculations and algorithms is the electronic spreadsheet, Excel in particular. In this section, we describe an Excel-based approach to heuristic solution of sequencing problems.

For the purposes of illustration, we work with Example 4.4, introduced earlier, which is aT-problem containing five jobs.

Jobj 1 2 3 4 5

pj 2 3 1 6 4

dj 12 7 4 10 6

In a spreadsheet implementation, we create modules for the problem data, the job sequence, the measure of performance, and the relevant calculations.

Figure 4.3 shows a typical layout for the model. Borrowing from the terminology of optimization, the key parts of the model are:

The problem data (cells C4:G6).

The objective function (cell C8).

The decision variables (the sequence in the range C12:G12).

The relevant constraints (to be specified later).

The decisions in this model appear as the highlighted cells in row 12, and any permutation of the integers 1–5 can be entered there. Based on that sequence, we find the processing times in row 13 using a lookup procedure, referencing

Figure 4.3 Spreadsheet layout for theT-problem example.

4.8 The Evolutionary Solver 91

the data cells. In our example, the formula in cell C13 isINDEX( $C$5:$G$5, C12), and this formula is copied to the right. Then the completion times in row 14 are calculated as we would by hand, by adding the current processing time to the completion time of the previous job in sequence.

The due dates in row 15 are obtained by referencing the data cells. In our exam- ple, the formula in cell C15 isINDEX($C$6:$G$6,C12), and this formula is cop- ied to the right. In row 16, we calculate the tardiness of each job. For example, the formula in cell C16 isMAX(0,C14-C15), and this formula is copied to the right.

The objective function in cell C8 calculates the sum of the tardiness values, using the formulaSUM(C16:G16). With this layout, we could enter any job sequence in row 12, and the value of the objective function would appear in cell C8.

The optimization problem corresponding to our example is to choose the sequence in row 12 to minimize the value of the performance measure in cell C8. The software is Analytic Solver Platform (ASP). Briefly, ASP contains an upgraded version of the solver that comes with Excel. ASP actually contains four different optimization-type algorithms, one of which uses its Evolutionary Engine, an advanced GA that applies to many other types of problems but is specifically well suited to sequencing problems. Here, we refer to theEvolutionary Solveras a shorthand reference to the Evolutionary Engine in ASP software. In what follows, we assume that ASP has already been installed as an Excel add-in.

When ASP opens, it superimposes its task pane on the right-hand side of the spreadsheet, as shown in Figure 4.3. If the task pane is hidden, we can click on the Model icon (on the left-hand side of the ASP ribbon) to make it visible.

In anticipation of using the Evolutionary Solver, the first step is to select the Platform tab in the task pane, and in the Transformation section, proceed to the first entry, Nonsmooth Model Transformation. The drop-down menu that accompanies it offers three choices, and we should chooseNever. (This choice prevents ASP from making an inefficient transformation of the optimization problem we’re about to specify.)

Next we select the Model tab, where we specify the optimization problem with the following steps:

1) With cell C8 selected, specify the objective using the ASP ribbon (Optimization Model > Objective > Min > Normal). Alternatively, with cell C8 selected, select the folder icon for Objective in the task pane and click on the green cross in the header of the task pane. This step assumes that the objective is to be maximized, so we double-click the icon for $C$8.

The Change Objective window appears, in which we select the radio button for Min, as shown in Figure 4.4.

2) With the range C12:G12 selected, specify the decisions (Optimization Model > Decisions > Normal). Alternatively, with the range C12:G12 selected, select the folder icon for Variables in the task pane and click on the green cross.

4 Heuristic Methods for the Single-machine Problem 92

3) With the range C12:G12 still selected, specify the constraints (Optimization Model > Constraints > Variable Type/Bound > AllDifferent). Alternatively, with the range C12:G12 still selected, select the folder icon for Constraints in the task pane and click on the green cross. The Add Constraint window then appears, in which we selectdiffrom the drop-down menu, as shown in Figure 4.5.

TheAllDifferent constraintensures that the decision variable cells will comprise a legitimate permutation (in this case, a permutation of the integers 1–5.) In other words, the decision cells must correspond to a feasible sequence. The task pane captures the problem specification, as shown in Figure 4.6.

Next we select the Engine tab, specify theStandard Evolutionary Enginefrom the drop-down menu, and uncheck the box for Automatically Select Engine, as shown in Figure 4.7. The General section of the task pane lists a number of options, most of which can be left at their default values. The Evolutionary Solver will search for the best solution it can find, and its effectiveness is influ- enced by several user-determined parameters that are specified on this list.

The most important of these parameters set the stopping conditions that control the termination of the search. A good generic set of parameters would be the following:

Figure 4.4 Specifying the objective and direction of optimization.

Figure 4.5 Specifying the alldifferent constraint.

4.8 The Evolutionary Solver 93

Max time = 15 seconds no default value is given initially Population size = 25 no default value is given initially Mutation rate = 7 5 default value

Convergence = 0 01 default value

Global search = Genetic Algorithm default value

The Convergence option tells the Evolutionary Solver to stop its search if 99% of the 25 best solutions found lie within 0.01% of each other. If that con- figuration occurs, the search terminates before reaching the specified Max Time.

In the Limits section of the task pane, the following choices are suitable:

Max subproblems = leave blank Max feasible solutions = leave blank Tolerance = 0

Maximum time without improvement = 10 s

Figure 4.6 The problem specification.

4 Heuristic Methods for the Single-machine Problem 94

As a result, ceilings on the number of subproblems or the number of feasible sequences do not impede the search. In addition, the search terminates if no improvement in the objective has been found in the last 10 seconds of searching.

To invoke the algorithm, we can use the ribbon (Solve Action > Optimize >

Solve Complete Problem), or we can click on the green triangle near the top of the Output tab. If the Max Time option takes effect, the search will stop after running for 15 seconds with an offer to continue. When we choose Stop, a mes- sage appears in the task pane reporting that Solver stopped at the user’s request.

If the Max Time without Improvement takes effect, a message appears in the

Figure 4.7 Information on the Engine tab.

4.8 The Evolutionary Solver 95

task pane reporting that Solver cannot improve the current solution. If the Con- vergence condition prevails, the message in the task pane reports that Solver has converged.

In general, the time limits can be adjusted according to the user’s patience, but we have found that runs of roughly 15–30 seconds produce good results for sequencing problems up to 20 jobs. In fact, optimal or near-optimal solutions are usually found in far less time. In our five-job example, the Evolutionary Solver converges rapidly to a total tardiness value of 7, obtained by the sequence 3-5-2-1-4. For the set of 20-job problems in Table 4.8, the Evolutionary Solver (running with a 30-second time limit) produced optimal solutions in 10 out of the 12 problems, with an average ratio of 1.00008 and a maximum ratio of 1.0006. These results do not take advantage of the fact that the user can always rerun the Evolutionary Solver starting with the best solution found in the pre- vious run. The user can also repeat the run after enlarging the population size or increasing the mutation rate if a run terminates with convergence or lack of improvement. Because the Evolutionary Solver contains random elements, it is usually desirable to make several runs under the same parametric settings to see whether improvements can be made.