TOC Abstract (1) Intro (2) Simplex (3) Impl (4) Test (5) Results (6) Concl Scripts Biblio Author Chairman

Chapter 5

Results

The results of the MATLAB were as expected for comparisons of execution time and performance between the variations of the Bartels-Golub Method. However, the Revised Simplex Method outperformed all expectations to provide an insight into the inner workings of MATLAB and perhaps even a suggestion for direction of future research.

 

Revised Simplex Method

The number of flops that the Revised Simplex Method required in each problem was consistently better than any of the other methods, varying from a factor of two times better to more than 10 times better. This unexpected result suggested that the inverse of the basis was not nearly as dense as originally thought. Upon reviewing the inverse-basis densities, this supposition holds. Although the Revised Simplex Method provided the worst inverse-basis densities of all the methods, these densities were still sparse enough to take advantage of sparse matrix structure to reduce time-complexity.

The worst inverse-density that the Revised Simplex Method only occasionally surpassed 40%, and it never reached even 55%. These sparse inverse-bases allow MATLAB to take advantage of their structure to reduce the time required by matrix multiplication. Since the matrix-inversion routine involves a significant amount of matrix multiplication, it will also reduce in the time-complexity due to the sparse nature of the inverse-bases. This result accounts for the significant time-complexity advantage the Revised Simplex Method had over the other methods.

Despite the sparse nature of the inverse-bases, the Revised Simplex Method still produced much higher densities than its counterpart methods. Unlike the other methods, the Revised Simplex Method maintains the basis-inverse as a matrix. As a result, any multiplication requires that the entire matrix be available in memory, so any implementation will be limited in use by the physically available memory. Alternatively, secondary storage and virtual memory could be used, however, both methods increase execution time significantly indicating that other methods may be more amenable. For smaller problems the Revised Simplex Method would be the quickest method.

The significant use of native MATLAB functions resulted in the Revised Simplex Method taking by far the least amount of execution time of all the methods. Unfortunately, MATLAB has some limitations in solving very large sparse-matrix problems because of its interpretive nature. At present, compilation utilities for MATLAB still lack sparse matrix support, so this analysis could not be applied to them.

 

Bartels-Golub Method

The Bartels-Golub Method generally provided the worst flop count of all the methods. The sparse nature of the bases unfortunately did not translate into as signficant a savings during the LU-factorization as they did in the basis-inversion of the Revised Simplex Method. With the extra overhead of the repeated backsolves, the Bartels-Golub Method proved to be extremely costly in terms of floating-point operations.

The size of the upper and lower triangular factors proved to be much sparser than the inverse-bases of the Revised Simplex Method by a factor of two to five. This indicates that the Bartels-Golub Method could handle larger problems in the same amount of memory. Similar to the Revised Simplex Method, though, the backsolves performed by the Bartels-Golub Method still require large amounts of data to be present in memory, so computer memory may still be a severely limiting factor.

The actual running time of the Bartels-Golub Method was the second-fastest of all the methods; in fact, it slightly superceded the Revised Simplex Method in one particular small problem. Although the Bartels-Golub Method used native MATLAB calls like the Revised Simplex Method, the extra time involved in performing the repeated backsolves increased the running time significantly. As MATLAB continues to evolve, the Bartels-Golub Method may eventually surpass the Revised Simplex Method in execution time.

 

Sparse Bartels-Golub Method

Finding an appropriate threshhold number of eta factors before requiring refactorization of the basis proved to be difficult as no one value was good for every problem. The most effective range of threshhold values varied from to . Using this value, the Sparse Bartels-Golub Method consistently outpaced the original Bartels-Golub Method in all but a few ill-conditioned problems.

The Sparse Bartels-Golub Method performed only slightly fewer flops than the Bartels-Golub Method in most cases. In a couple situations, the Sparse Bartels-Golub Method performed slightly more flops. In the remaining instances, however, the Sparse Bartels-Golub Method managed to perform three to four times fewer floating point operations, showing the advantage of deferring refactorization. Because the sparse algorithm was more detailed and required more interpretation by MATLAB, the running time was increased often 10 to 20 times from the Bartels-Golub Method.

Most significantly, the maximum number of nonzero entries that had to be stored by the Sparse Bartels-Golub Method was fewer than the number of nonzero entries that the Bartels-Method had to contend with in each and every problem. In addition, the Sparse Bartels-Golub Method does not require that the entire set of data be in memory at any one time. Since the eta matrices consisting the lower-triangular factor are applied in sequence, these same entries can be easily stored in secondary storage and read when needed. As a result, much larger problems are more easily handled by the Sparse Bartels-Golub Method than either the Revised Simplex Method or the Bartels-Golub Method.

 

Forrest-Tomlin Method

No refactorization threshhold value proved to be satisfactory over any wide range for the Forrest-Tomlin Method. However, setting a threshhold for nonzero entries in the list of row-eta factors proved to be most effective, with the threshhold values ranging from to . Although the Forrest-Tomlin Method showed promise, it usually proved to require more flops than the Sparse Bartels-Golub and Bartels-Golub Methods.

Despite the increase in floating-point operations, the Forrest-Tomlin Method usually succeeded in producing fewer nonzero factors than any of the other methods. It also surpassed the other sparse methods significantly in running time. The use of MATLAB’s intrinsic functions calculate and apply the row-eta factors caused this speed up, often by factors of 2 to 10 times.

 

Reid’s Method

Because of their similarity, Reid’s Method used the same threshhold values as the Sparse Bartels-Golub Method. Surprisingly, the use of rotations did not decrease the number of non-zero factors or floating point operations. In actuality, Reid’s Method proved to be slightly worse in most cases. In fact, the same ill-conditioned matrices that caused the Sparse Bartels-Golub Method to perform poorly also caused Reid’s Method to fail and find a solution at a nearby corner instead.

Reid’s Method often produced the same number of nonzero entries as the Sparse Bartels-Golub Method most likely because it followed the same set of decisions as the latter algorithm. However, on those occasions where they differed, Reid’s Method proved to be more often than not the worse of the two resulting in extra nonzero entries, longer running times, and more floating-point operations.

 

The Results

The problems solved were a variety of small- and medium-sized problems available from the Netlib ftp site. These problems included a variety of industrial problems in a variety of situations, but most importantly they were real problems instead of academic problems. Table 1 describes the problems according to their matrix dimensions, , and total number of nonzero coefficients.

Table 1

Problem m n nnz
adlittle

71

97

556

afiro

35

32

117

agg

524

163

2698

agg2

576

302

4802

agg3

576

302

4834

blend

117

83

789

sc105

150

103

402

sc205

296

203

800

sc50a

70

48

182

sc50b

70

48

170

scagr7

213

140

782

share1b

206

225

2042

share2b

109

79

778

stocfor1

100

111

720

The Tested Problems

The most scrutinized data were the number of flop counts each problem required for each algorithm. In Table 2, these flop counts are summarized in terms of millions of flops. Although the values range from problem to problem, the Revised Simplex Method consistently outperformed the other methods.

Table 2

Problem

rsm

bg

sbg

ft

reid

adlittle 1.08 4.51 3.58 3.87 3.65
afiro .0107 .0333 .0217 .0404 .0242
agg 2.89 11.4 9.69 18.3 7.95
agg2 5.79 13.7 17.2 53.9 *
agg3 8.49 22.9 24.54 59.1 *
blend 2.63 22.8 5.02 16.1 5.12
sc105 3.29 5.99 5.71 5.51 4.37
sc205 36.7 45.9 44.8 57.2 45.1
sc50a .374 .434 .412 .524 .418
sc50b .355 .554 .413 .605 .428
scagr7 14.4 48.7 19.4 29.0 26.1
share1b 147 456 295 304 295
share2b 3.36 14.7 5.90 6.51 7.19
stocfor1 .912 2.07 2.04 3.76 1.93
Millions of Flops per Execution

The agg2 and agg3 problems were unable to find the correct solution when Reid’s method was applied to them. Closer analysis showed that as these problems approached the solution, the basis became unstable and took a slightly different path. Reid’s Method obtained a result that was within the same order of magnitude as the solution but was too disparate to be considered correct.

The amount of CPU time that each algorithm takes, as shown in Table 3, tells us little about the efficiency of the algorithm under MATLAB, but it does give us some insightful information about how the algorithms work with MATLAB. The Revised Simplex Method made extremely good use of MATLAB’s internal coding to run often two to three times faster than each of the other algorithms. The Bartels-Golub Method also used MATLAB’s internal LU-factorization code to often run faster than the sparse-matrix algorithms.

Table 3

Problem

rsm

bg

sbg

ft

reid

adlittle 4.63 10.3 67.4 15.8 90.2
afiro .167 .283 1.75 .933 3.63
agg 15.6 33.1 497 124 770
agg2 29.2 52.5 1050 28.3 *
agg3 40.1 74.9 1300 294 *
blend 8.33 39.4 114 50.5 15.4
sc105 13.5 16.6 14.9 33.2 17.9
sc205 139 129 961 284 1130
sc50a 1.97 1.97 17.1 4.87 29.0
sc50b 1.95 2.23 18.3 6.00 30.8
scagr7 47.0 88.0 48.6 11.8 86.1
share1b 32.2 65.9 4670 769 5420
share2b 11.0 31.0 169 31.5 233
stocfor1 3.97 8.18 92.8 30.2 153
Seconds of CPU Time per Execution

The stability of each method is easiest to compare by looking at the number of times the basis required refactorization. In the case of the Revised Simplex Method and the Bartels-Golub Method, refactorization occurs each iteration so their numbers are far higher than the others. The full results are available in Table 4. The Forrest-Tomlin Method outperformed the other sparse algorithms, however the Sparse Bartels-Golub and Reid’s Methods still significantly improved on the dense algorithms.

Table 4

Problem

rsm

bg

sbg

ft

reid

adlittle

124

124

63

40

55

afiro

17

17

2

2

2

agg

99

98

2

3

3

agg2

138

138

3

6

*

agg3

161

161

4

5

*

blend

124

267

49

50

47

sc105

114

128

37

11

22

sc205

265

266

102

16

72

sc50a

50

50

12

8

12

sc50b

55

55

9

7

8

scagr7

290

251

72

45

84

share1b

925

925

780

226

771

share2b

156

245

61

26

72

stocfor1

89

89

4

5

3

Number of Refactorizations Required

Finally, some measure has to be taken about the amount of data storage that is required. Even with the price of computer memory dropping, the size of industrial problems are increasing and the actual amount of data that must be held in memory must remain a consideration in evaluating any algorithm. Table 5 presents the maximum number of nonzero data entries that each algorithm had to handle for each problem. The direct matrix inversion employed by the Revised Simplex Method resulted in the large numbers of nonzeros that can be seen here. The Bartels-Golub Method proved to do much better, however the Forrest-Tomlin Method proved to be the best method for keeping the amount of data to a minimum.

Table 5

Problem

rsm inv

bg factors

sbg factors

ft factors

reid factors

adlittle

1186

650

539

441

539

afiro

182

147

146

134

139

agg

7957

4508

2818

2700

2748

agg2

8779

3998

3738

3503

*

agg3

11709

4504

4070

3883

*

blend

3406

1931

1100

1133

1100

sc105

10011

1183

941

874

913

sc205

42312

2514

2052

1823

2017

sc50a

2382

438

407

375

407

sc50b

2687

463

435

368

435

scagr7

9670

3017

1349

1375

1503

share1b

14667

3678

2972

1945

3137

share2b

4489

1435

1231

898

1447

stocfor1

5068

1023

991

877

1457

Maximum Nonzero Data Items During Solution

The data collected provided many insights into the Simplex Method algorithms being tested and the nature of MATLAB. In general, the Revised Simplex Method performed fastest and with the fewest calculations, but it required a large amount of memory and basis refactorizations. The Sparse Bartels-Golub Method proved to be simple and effective, however the Forrest-Tomlin and Reid’s variations often performed slightly better.