skip to main content


Title: CGPOPS: A C++ Software for Solving Multiple-Phase Optimal Control Problems Using Adaptive Gaussian Quadrature Collocation and Sparse Nonlinear Programming
A general-purpose C++ software program called CGPOPS is described for solving multiple-phase optimal control problems using adaptive direct orthogonal collocation methods. The software employs a Legendre-Gauss-Radau direct orthogonal collocation method to transcribe the continuous optimal control problem into a large sparse nonlinear programming problem (NLP). A class of hp mesh refinement methods are implemented that determine the number of mesh intervals and the degree of the approximating polynomial within each mesh interval to achieve a specified accuracy tolerance. The software is interfaced with the open source Newton NLP solver IPOPT. All derivatives required by the NLP solver are computed via central finite differencing, bicomplex-step derivative approximations, hyper-dual derivative approximations, or automatic differentiation. The key components of the software are described in detail, and the utility of the software is demonstrated on five optimal control problems of varying complexity. The software described in this article provides researchers a transitional platform to solve a wide variety of complex constrained optimal control problems.  more » « less
Award ID(s):
1819002
NSF-PAR ID:
10282084
Author(s) / Creator(s):
;
Date Published:
Journal Name:
ACM Transactions on Mathematical Software
Volume:
46
Issue:
3
ISSN:
0098-3500
Page Range / eLocation ID:
1 to 38
Format(s):
Medium: X
Sponsoring Org:
National Science Foundation
More Like this
  1. A structure detection method is developed for solving state-variable inequality path con- strained optimal control problems. The method obtains estimates of activation and deactiva- tion times of active state-variable inequality path constraints (SVICs), and subsequently al- lows for the times to be included as decision variables in the optimization process. Once the identification step is completed, the method partitions the problem into a multiple-domain formulation consisting of constrained and unconstrained domains. Within each domain, Legendre-Gauss-Radau (LGR) orthogonal direct collocation is used to transcribe the infinite- dimensional optimal control problem into a finite-dimensional nonlinear programming (NLP) problem. Within constrained domains, the corresponding time derivative of the active SVICs that are explicit in the control are enforced as equality path constraints, and at the beginning of the constrained domains, the necessary tangency conditions are enforced. The accuracy of the proposed method is demonstrated on a well-known optimal control problem where the analytical solution contains a state constrained arc. 
    more » « less
  2. A new method is developed for solving optimal control problems whose solutions contain a nonsmooth optimal control. The method developed in this paper employs a modified form of the Legendre-Gauss-Radau (LGR) orthogonal direct collocation method in which an additional variable and two additional constraints are included at the end of a mesh interval. The additional variable is the switch time where a discontinuity occurs. The two additional constraints are a collocation condition on each differential equation that is a function of control along with a control constraint at the endpoint of the mesh interval that defines the location of the nonsmoothness. These additional constraints modify the search space of the NLP in a manner such that an accurate approximation to the location of the nonsmoothness is obtained. An example with a nonsmooth solution is used throughout the paper to illustrate the improvement of the method over the standard Legendre-Gauss-Radau collocation method. 
    more » « less
  3. null (Ed.)
    A new method is developed for solving optimal control problems whose solutions are nonsmooth. The method developed in this paper employs a modified form of the Legendre–Gauss–Radau orthogonal direct collocation method. This modified Legendre–Gauss–Radau method adds two variables and two constraints at the end of a mesh interval when compared with a previously developed standard Legendre– Gauss–Radau collocation method. The two additional variables are the time at the interface between two mesh intervals and the control at the end of each mesh inter- val. The two additional constraints are a collocation condition for those differential equations that depend upon the control and an inequality constraint on the control at the endpoint of each mesh interval. The additional constraints modify the search space of the nonlinear programming problem such that an accurate approximation to the location of the nonsmoothness is obtained. The transformed adjoint system of the modified Legendre–Gauss–Radau method is then developed. Using this transformed adjoint system, a method is developed to transform the Lagrange multipliers of the nonlinear programming problem to the costate of the optimal control problem. Fur- thermore, it is shown that the costate estimate satisfies one of the Weierstrass–Erdmann optimality conditions. Finally, the method developed in this paper is demonstrated on an example whose solution is nonsmooth. 
    more » « less
  4. Computer modeling, simulation and optimization are powerful tools that have seen increased use in biomechanics research. Dynamic optimizations can be categorized as either data-tracking or predictive problems. The data-tracking approach has been used extensively to address human movement problems of clinical relevance. The predictive approach also holds great promise, but has seen limited use in clinical applications. Enhanced software tools would facilitate the application of predictive musculoskeletal simulations to clinically-relevant research. The open-source software OpenSim provides tools for generating tracking simulations but not predictive simulations. However, OpenSim includes an extensive application programming interface that permits extending its capabilities with scripting languages such as MATLAB. In the work presented here, we combine the computational tools provided by MATLAB with the musculoskeletal modeling capabilities of OpenSim to create a framework for generating predictive simulations of musculoskeletal movement based on direct collocation optimal control techniques. In many cases, the direct collocation approach can be used to solve optimal control problems considerably faster than traditional shooting methods. Cyclical and discrete movement problems were solved using a simple 1 degree of freedom musculoskeletal model and a model of the human lower limb, respectively. The problems could be solved in reasonable amounts of time (several seconds to 1–2 hours) using the open-source IPOPT solver. The problems could also be solved using the fmincon solver that is included with MATLAB, but the computation times were excessively long for all but the smallest of problems. The performance advantage for IPOPT was derived primarily by exploiting sparsity in the constraints Jacobian. The framework presented here provides a powerful and flexible approach for generating optimal control simulations of musculoskeletal movement using OpenSim and MATLAB. This should allow researchers to more readily use predictive simulation as a tool to address clinical conditions that limit human mobility.

     
    more » « less
  5. Abstract

    A mesh refinement method is described for solving optimal control problems using Legendre‐Gauss‐Radau collocation. The method detects discontinuities in the control solution by employing an edge detection scheme based on jump function approximations. When discontinuities are identified, the mesh is refined with a targetedh‐refinement approach whereby the discontinuity locations are bracketed with mesh points. The remaining smooth portions of the mesh are refined using previously developed techniques. The method is demonstrated on two examples, and results indicate that the method solves optimal control problems with discontinuous control solutions using fewer mesh refinement iterations and less computation time when compared with previously developed methods.

     
    more » « less