• No results found

Pattern search

In document Parallel Optimization in Matlab (Page 35-40)

Pattern search showed accurate results during experiments on all tested objec-tive functions. The biggest problem with pattern search was its computational speed. All experiments on all objective functions took very long time what be-came a reason for the choice of test parameters for the main objective function.

That is why we didn’t try many options for MADS search and poll methods, searchga as a search method and searchlhs as a search method.

4.4.1 Pattern search on Windows-cluster

In this section we present the results for the main objective function. Because MEX-file was done for Windows we had no opportunity to run our optimization on machine with more than 8 cores. It became the reason for doing most of simulations on the main function. After doing several experiment for different methods on different numbers of cores the resulting data for the optimal values of the main objective function is shown in Fig. 25.

The Figure 25 shows that the best value of the objective function is 0.0026, but this value was produced during optimization with default value for bind-ing tolerance when ‘TolBind’=1e-3. To get the right result it is important to specify binding tolerance because it will show the result when the constraints are active. Otherwise the point could be found outside of the feasible region.

So by specifying the binding tolerance as ‘TolBind’=1e-6 or 1e-10 the result has changed to the value 0.0036, which we can see as a result from sequence number 18. Binding tolerance can affect the computational time. When it is specified smaller than a default value our method can converge faster because

Figure 25: The smallest values of the objective function at different sequences of runs (sequence here is several runs for the same method on different numbers of cores)

it won’t compute outside of the feasible region. Computational time is indeed a very important parameter when someone wants to choose the right method for finding the correct result. In pattern search we had methods which gave us the desirable values faster than other methods. GPSPositiveBasis2N is the fastest search method from all deterministic methods. We had some stochas-tic methods like search using genestochas-tic algorithm, MADS and search using Latin Hypercube algorithm. This means that if we use the same starting point for performing our optimization we will get different result each time we are run-ning our code. MADS showed different results when we gave the same starting point and it took almost the same time for computing the values no matter that the computation was performed on different numbers of processors. For MADSPositiveBasisNp1 the results is shown in Fig. 26.

From the Figure 26 we can see that MADSPositiveBasisNp1 is an expensive poll method which is not good to use if you want to save your time, and not so accurate. Also one can notice that there won’t be possible to see any speedup (here blue colour bars are symbolizing 2 workers, green - 6 workers, red - 8 workers).

MADSPositiveBasis2N is faster than the previous MADS-method but even if we use a big cluster we won’t win any time, as we can see on Fig. 27 for this method the time almost the same for all our computations. Depending on how the algorithm will generate vectors we will get different results every time we run our computation. The results are not accurate as well.

On this figure blue color is symbolizing run on 2 workers, green - on 6 workers, red - on 8 workers. Easy to see that increasing number of workers doesn’t give us any win in time at the second sequence and very little time between 8 and 6

Figure 26: Computational time for different sequences of runs using MADSPos-itiveBasisNp1 as a poll method.

Figure 27: Computational time for MADSPositiveBasis2N as a poll method.

workers at the first sequence.

The best method of all is GPSPositiveBasis2N: here one gets an accurate result fast; speedup is one of its characteristics when running on Windows-cluster.

When one chooses the search method the same as the poll method the algorithm performs only search what will save the time. The best speedup of all used methods we can observe for GPSPositiveBasis2N is shown in Fig. 28.

The Figure 28 was the best observation of all concerning speedup. One can say that probably speedup can be seen on MADS computation from the first

Figure 28: Speedup for GPSPositiveBasis2N as poll and search methods.

sequence, but when we try to run the method several times the observations won’t be the same. There is no stable speedup for any method from algorithms for pattern search except GPSPositiveBasis2N. The accurate optimal values can be found for the other algorithms, of course. But if one will consider all desirable parameters for finding the best method for performing an “online” optimization GPSPositiveBasis2N can be the one.

Another part of the study was the search method using Latin Hypercube algo-rithm. It is a stochastic method. Comparing to MADS method searchlhs gave always the same correct result, was faster than MADS but wasn’t possible to make any conclusions about its speedup. Fig. 29 shows that the computational time is different for the same initial conditions.

Important to mention is that for running searchlhs algorithm we have chosen the fastest and the most accurate poll method. Probably if one would choose MADS-polling the results might differ. Here the optimal value was the same after every run, probably, because of chosen poll method.

Figure 29: Computational time for different runs of searchlhs with GPSPosi-tiveBasis2N polling on a single core.

4.4.2 Pattern search on a Linux-cluster

Here the objective function was different from the previous experiments. The goal was to see if the use of Matlab’s Distributed Computing Server Software could improve the results, i.e. if one could get the accurate result faster. The objective function was different from the previous function which we had on Windows-cluster. The resource had 32 cores for usage. All the methods showed the same behaviour which was seen in previous experiments: no speedup or accuracy for MADS and searchga methods, GPSPositiveBasis2N showed the best results concerning accuracy and speedup when we chose the same search and poll methods what disabled polling. The best value of objective function was approximately -400.

The speedup for GPSPositiveBasis2N can be seen on the next figure.

As we see in the beginning of the figure when we specify 0 workers we get the result faster than when we specify 1 worker because of time which was spent on “unnecessary” communication, by sending the job to one worker. On 32 workers we got speedup up to 7.1631 what is a good value comparing with the optimization on 8 cores where this value was around 2.

Figure 30: Speedup for GPSPositiveBasis2N specified as search and poll meth-ods.

In document Parallel Optimization in Matlab (Page 35-40)

Related documents