FDI_OPT is a MATLAB program which demonstrates how the FMINCON function, which is used to find the constrained minimizer of a function, can be used efficiently with MATLAB's Parallel Computing Toolbox.
The program transcribes a (class of) optimal control problem(s) to finite-dimensional nonlinear programming problems and then invokes the Matlab solver fmincon. The problem has a fixed initial state, a fixed terminal time, a Mayer cost functional and a scalar-valued control function. Data for a specific problem are supplied by the user; zermelo.m is an example based on efficient navigation of a boat in a spatially varying current.
run_opt ( 'function_file', intervals )where
The user must supply certain routines:
The user may also supply optional routines:
No error checking is done to ensure that the specified problem data are consistent. Strange error messages may result from such inconsistency (e.g. the dimension of the state - the 'size' of the returned output from PAR.rhs - must be same as the 'size' of PAR.x0, and the same as the 'size' of the input arguments to PAR.cost, PAR.eq, and PAR.ineq).
To run the code with the sample problem, the command might be
run_opt ( 'zermelo.m', 16 )
To run the code with the sample problem and the Parallel Computing Toolbox, the command might be
matlabpool open local 4where, in this case, we have only asked for 4 MATLAB workers. Assuming successful convergence, plots showing the path of the boat in the plane and a time history of the piecewise constant controlm will be displayed.
run_opt ( 'zermelo.m', 16 )
matlabpool close
Gene Cliff, Aerospace and Ocean Engineering / Interdisciplinary Center for Applied Mathematics, Virginia Tech.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
COLLATZ_PARALLEL is a MATLAB program which seeks the maximum Collatz sequence between 1 and N; it runs in parallel using MATLAB's "parfor" facility.
JTB_CODIST, a MATLAB program which demonstrates how the linear system associated with a finite element problem can be treated as a codistributed array whose entries are assigned to different MATLAB workers, so that the matrix is assembled in parallel.
LINEAR_SOLVE_DISTRIBUTED is a MATLAB program which solves a linear system A*x=b using MATLAB's spmd facility, so that the matrix A is "distributed" across multiple MATLAB workers.
MATLAB_PARALLEL, examples which illustrate "local" parallel programming on a single computer with MATLAB's Parallel Computing Toolbox.
MD_PARALLEL is a MATLAB program which carries out a molecular dynamics simulation in parallel, using MATLAB's "PARFOR" feature.
PRIME_NUMBER_PARALLEL is a MATLAB program which counts the number of primes between 1 and N; it runs in parallel using MATLAB's "parfor" facility.
PRIME_NUMBER_SPMD is a MATLAB program which counts the number of primes between 1 and N; running in parallel using MATLAB's "SPMD" feature.
QUAD_SPMD is a MATLAB program which estimates an integral using quadrature; running in parallel using MATLAB's "SPMD" feature.
SATISFIABILITY_PARALLEL is a MATLAB program which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem, running in parallel using MATLAB's "PARFOR" feature.
TIMING_PARALLEL is a directory of MATLAB programs which illustrates how to time a parallel MATLAB program.
MathWorks documentation for the Parallel Computing Toolbox is available at http://www.mathworks.com/products/parallel-computing/.
ZERMELO is an example problem describing the efficient navigation of a boat in a spatially varying current. The name "zermelo" is to be used for the F_NAME parameter of RUN_OPT.
You can go up one level to the MATLAB source codes.