GPOPS − II Version 1.0:
A General-Purpose MATLAB Toolbox for Solving
Optimal Control Problems Using the Radau
Pseudospectral Method
Michael A. Patterson
Anil V. Rao
University of Florida
Gainesville, FL 32611-6250
USA
January 2013
Approved for Public Release, Distribution Unlimited (DISTAR Cases #19953 and #20529)
2
Preface
GPOPS − II is a general-pupose software for solving nonlinear optimal control problems that arise in a wide
variety applications including engineering, economics, and medicine. GPOPS − II uses some of the latest
advancements in the area of pseudospectral methods for solving optimal control problems. GPOPS − II em-
ploys an hp-adaptive Radau pseudospectral Gaussian quadrature method where the collo cati on is performed
at the Legendre-Gauss-Radau quadrature points. GPOPS − II has been designed to work with the nonlinear
programming (NLP) solvers SNOPT and IPOPT, and MATLAB mex files for both SNOPT and IPO PT are
included with the software. GPOPS − II employs sparse finite-differencing to estimate all fi r s t and second
derivatives required by the NLP solver. The s oftware has been designed to be extremely flexible, allowing a
user to formulate an optimal control problem in a way that makes sense for the problem being solved. Few,
if any, restrictions have been placed on the manner in which a problem needs to be modeled. As stated, the
software is general-purpose, that is, it has not been developed for any specific type of problem. While the
developers of GPOPS − II make no guarantee as to the fitness of the s oftware for any particular purpose, it
is certainly hoped that software is useful for a variety of applications.
Complete Overhaul from Previous Versions of GPOPS
GPOPS − II represents a complete overhaul from the GPOPS software that was released between 2008
and 2012. Specifically, this new software, GPOPS − II, is organized in a completely different manner from
GPOPS and has significantly more functionality from GPOPS. Furthermore, GPOPS − II does not maintain
backward compatibility with GPOPS. While the authors of GPOPS − II realize that the lack of backward
compatibility may be inconvenient for some users, the increased power and functionality of GPOPS − II will
make it worth the short term inconvenience of the transition. In order to have as smooth a transition as
possible to the new software, the authors of GPOPS − II are happy to assist users of GPOPS in rewr it in g
their code for GPOPS − II.
Acknowledgments
The authors gratefully acknowledge support for this res e arch from the U.S. Office of Naval Research (ONR)
under Grant N00014-11-1-0068 and from the U.S. Defense Advanced Research Projects Agency (DARPA)
Under Contract HR0011-12-0011.
Disclaimer
The views expressed are those of the authors and do not reflect the official policy or position of the Depart-
ment of Defense or the U.S. Government. Furthermore, the contents of this document and the corresponding
software are provided “as is” without any merchantability or fitness for any part icu lar application. Neither
authors nor their employers (past, present, or future) assume any responsibility whatsoever from any harm
resulting from the software. The auth ors do, however, hope that users will find this software useful for
research and other purposes.
Licensing Agreement
By downloading, using, modifying, or distributing GPOPS2, you agree to the terms of this license agreement.
This license gives you extremely GENEROUS RIGHTS, so if you do not agree to the terms of this agreement,
you may not proceed further with using, using, modifying, or dis tr i bu tin g GPOPS2.
License for GPOPS − II Software
PLEASE READ THE FOLLOWING TERMS AND CONDITIONS CAREFULLY BEFORE PROCEED-
ING TO DOWNLOAD GPOPS − II!
3
This page const it ut es the official license for the General-Purpose Pseudospectral Optimal Control Soft-
ware (hereafter referred to as GPOPS − II). By downloading, using, modifying, or distribu tin g GPOPS − II
you are agreeing to all of the the terms and conditions described hence for th . Do not proceed with the
download of GPOPS − II you do not agree with any of the terms and conditions in this agreement.
If you are e ith e r a student or employee at an academic institution (that is, K-12 or degree-granting higher-
learning institution), an employee at a not-for-profit, or an employee of the U.S. Federal Government or U.S.
State Government, GPOPS − II is available free-of-charge provid ed you are using it for non-commercial
research and development. This free-of-charge non-commercial use license comes with the following rules:
• You may use the software for any non-commercial purpose
• You may make derivative works of the software (called a Derived Work), and you may copy and
distribute any such Derived Work provided that the Derived Work is also for non-commercial purposes
• If you distribute GPOPS − II or any Der i ved Work, you are required to provide any changes made to
the source code to the authors of GPOPS − II so that we may include th es e changes in a future release
if we find the changes useful
• You must leave all ex is ti ng copyright notices , warranty disclaimers, and license terms in place in any
changes that you make
• You may not add any restrictions beyond that of this license agreement in any Derived Work
• You must conspicuously announce that the changes you have made are available under the original
license for GPOPS − II
• You must provide assurance that you will not make a profit of any k in d from the distribution or
re-distribution of GPOPS − II
If you are an employee at a profit-making institution, the download and use of GPOPS − II requir e s a
licensing fee, and this fee structure applies regardless of the kind of work being performed at your profit-
making institution. The commercial licensing fee structure is as follows:
• Individual Lice ns e: $1000.00 for first-time pur chase of any version of GPOPS − II; $200.00 for the
purchase of any upgrade to a future major release.
• Site-Wide Commer cial License (Use at a Sin gle Location): $5000.00 for first t ime purchase of any
version of GPOPS − II; $1000.00 for the purchase of any upgrade to a future major release.
• Company-Wide Commercial License: $10000.00 for first time purchase of any version of GPOPS − II;
$2000.00 for the purchase of any upgrade to a future major release.
DISCLAIMER: GPOPS − II is provided as-is with no warranties, none of any kind. Furthermore, the
authors may not be held liable for any use of GPOPS − II, and you may not recover any damages for any
reason whatsoever.
Distribution of GPOPS − II
GPOPS − II is a completely free software both for use and for redis t r ib ut ion. Furthermore, while it may be
used within commercial organizations, it is not for sale or resale. The only exception to the sales restriction
above is that GPOPS − II may be in clu d ed as a part of a free open-source software (for example, a distribution
of the Linux ope r atin g system). When distributing GPOPS − II with a free operating system, no fee beyond
the price of the operating system itself may be added (that i s , you cannot profit from the redistribution of
GPOPS − II). GPOPS − II is not for commercial use with the exception that it may be used by commercial
organizations for internal research and development . Any use of GPOPS − II by commercial organizations
that involve the presentation of results for profit-making purposes is strictly prohibited. In addition, ther e
are some things that you must shoulder:
• You get no warranties of any kind;
4
• If the software damages you in any way, you may only recover direct damages up to the amount you
paid for it (that is, you get zero if you did not pay anything for the software);
• You may not recover any other damages, including those called ”consequential d amages.” (The state
or country where you live may not allow you to limit your liability in this way, so this may not appl y
to you).
The GPOPS − II Li ce ns e continues perpetually, except that your license rights end automatically if
• You do not abi de by the ”give back to the community” terms (your licensees get to keep their rights
if they abide);
• Anyone prevents you from distributing the software und er the t er ms of this lic en s e agree ment.
• You sell the software in any manner with the one exception listed above.
GPOPS − II is provided “as is” without warranty of any kind, expressed or implies, including but not
limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no
event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in
an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use
or dealings in the software.
CONTENTS 5
Contents
1 Introduction to the Gen eral -Pur pose Software GPOPS − II 6
1.1 Radau Pseudospectral Method Employed by GPOPS − II . . . . . . . . . . . . . . . . . . . . 6
1.2 Organization of GPOPS − II . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Color Highlighting Throughout Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Constructing an Opti mal Control Problem Using GPOPS − II 7
2.1 Syntax for Input Structure setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Syntax for Structure setup.functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 Syntax for bounds Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Syntax of Endpoint Fun cti on setup.functions.endpoint . . . . . . . . . . . . . . . . . . . . . 10
2.5 Syntax for Continuous Function setup.fu n cti ons .continuou s . . . . . . . . . . . . . . . . . 11
2.6 Specifying an Initial Guess of The Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 Scaling of Optimal Control Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3 Output from an Execution of GPOPS − II 12
4 Useful I nf ormati on for Debugging a GPOPS − II Problem 13
5 GPOPS − II Examples 13
5.1 Hyper-Sensitive Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.2 Multiple-Stage Launch Vehicle Ascent Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Tumor-Antiangiogenesis Optimal Control Problem . . . . . . . . . . . . . . . . . . . . . . . . 32
5.4 Reusable Launch Vehicle Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.5 Minimum Time-to-Climb of a Supersonic Aircraft . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.6 Two-Strain Tuberc ulos is Op ti mal Control Problem . . . . . . . . . . . . . . . . . . . . . . . . 55
6 Concluding Remarks 61
- 1
- 2
- 3
前往页