Code covered by the BSD License

# Speeding Up Optimization Problems with Parallel Computing

### Stuart Kozola (view profile)

Files from the webinar: Speeding up optimization problems with parallel computing

### Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

electronProblemScript.m
```%% Electron Optimization Problem
% This example illustrates how to formulate and solve an optimization
% problem in MATLAB. Consider N electrons in a conducting body.
% The electrons arrange themselves to minimize their potential energy
% subject to the constraint of lying inside the conducting body. At the
% minimum total potential energy, all the electrons lie on the boundary of
% the body. Because the electrons are indistinguishable, there is no unique
% minimum for this problem (permuting the electrons in one solution gives
% another valid solution).
%
% The optimization goal is to minimize the total potential energy of the
% electrons subject to the constraint that the electrons remain within the
% conducting body. The objective function, potential energy, is the sum of
% the inverses of the distances between each electron pair (i,j = 1, 2, 3,
% N)
%
% This problem can be solved with the nonlinear constrained solver fmincon
% in Optimization Toolbox. To use the parallel computing capability in
% Optimization Toolbox, we use the check box available in the Optimtool
% GUI and open a matlabpool.

% Copyright 2010 The MathWorks, Inc.