0
$\begingroup$

I have complicated 6-dimensional function to optimise. Using FindMinimum works all right, but takes a few minutes. Considering that I want to check multiple starting points, I'm looking at run times of day or more. Can I improve it with parallel computing? I'd prefer to start from user defined points if possible.

I was looking if I can somehow define list of lists of initial locations, microexample:

inittable1long = {{{f1, -1}, {f2, 0}, {f3, 0}, {f4, 0}, {f5, 0}, {f6, 0}},
{{f1, 0}, {f2, 0}, {f3, 0}, {f4, 0}, {f5, 0}, {f6, 0}},
{{f1, 1}, {f2, 0}, {f3, 0}, {f4, 0}, {f5, 0}, {f6, 0}}};

and then somehow run FindMinimum with above list of lists as initial conditions

FindMinimum[{finaleq1 /. {d -> 0.6}, -1.2 <= f1 <= 1.2,
-1.2 <= f2 <= 1.2, -1.2 <= f3 <= 1.2, -1.2 <= f4 <= 1.2,
-1.2 <= f5 <= 1.2, -1.2 <= f6 <= 1.2}, inittable1long]

to then use Parallelise, ParallelEvalutate or ParallelTable to make them run in parallel.

Initially I simply had 6 nested loops changing initial values (a.k.a. standard programming approach), which of course gives me correct answer in form of list of optimisation results, but I do believe such an approach is impossible to parallelise.

But it seems I'm missing too many elements to make it work. I'd appreciate any help in making my scheme work or providing alternate solution.

$\endgroup$
0
$\begingroup$

I think I found solution on my own.

ParallelTable[FindMinimum[{finaleq1 /. {d -> 0.6}, -1.2 <= f1 <= 1.2, -1.2 <= 
f2 <= 1.2, -1.2 <= f3 <= 1.2, -1.2 <= f4 <= 1.2, -1.2 <= f5 <= 
1.2, -1.2 <= f6 <= 1.2}, {{f1, f1s}, {f2, f2s}, {f3, f3s}, {f4, 
f4s}, {f5, f5s}, {f6, f6s}}], {f1s, -1, 1, 1}, {f2s, -1, 1, 1},
{f3s, -1, 1, 1}, {f4s, -1, 1, 1}, {f5s, -1, 1, 1}, {f6s, -1, 1, 1}]

Should do what I want done.

As of now I'm only testing one dimension and comparing Table with ParallelTable. Speed gains are of factor 2, but they are present.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.