How can I Successfully Implement the Interior Point Optimizer (IPOPT)?

« Go Back

Information

 
QuestionHow can I successfully implement the Interior Point Optimizer (IPOPT)?
Answer

The goal of this article is to provide Astrogator users with some tips that will facilitate the use of the IPOPT profile and help with troubleshooting. Here are 10 questions that you may have wondered about IPOPT:

When should I use IPOPT?

You could use an IPOPT profile in any mission with a target sequence. It is most useful when there exists a range of possible solutions within the given constraints. Some common scenarios for applying IPOPT are (1) determining the location to begin a finite burn to minimize Delta-V, (2) selecting the thrust vector to minimize Delta-V, and (3) determining the launch date (epoch) that reduces the duration of a deep-space mission to the Moon, Mars, etc.

Should I use this profile instead of the differential corrector?

Actually, the two profiles complement each other. The differential corrector is still the most efficient method for finding a viable solution, but IPOPT is capable of finding an optimal solution (though not necessarily the best global solution). It is a good practice to place a differential corrector profile before an IPOPT profile; this helps the IPOPT algorithm start searching for an optimal solution in an already feasible space.

What does a successful IPOPT profile look like?

First of all, you should choose at least one objective variable to either minimize or maximize. A common problem is having too many constraints. A good rule of thumb is to have an equal or greater number of controls than constraints; you need to have at least one free variable to be able to optimize. You also have the option to provide bounds to the constraints, and this gives IPOPT more room to find an optimal solution. With only equality constraints, IPOPT seems to perform at the level of the differential corrector. An equality constraint has equal lower and upper bounds. If you properly bound the control variables and constraints based on your insight, IPOPT will have a much easier time of locating a feasible solution space and finding the best solution.
 
Also, there are an endless number of combinations of controls, constraints, and objectives, but some functions are smoother than others and will better facilitate the derivative calculator. For example, you should not use true anomaly on a highly circular orbit; argument of latitude is much smoother. Also, rather than targeting eccentricity and inclination, especially near zero, you should target flight path angle and velocity azimuth.

Why is IPOPT not converging?

Troubleshooting IPOPT can be time-consuming. If IPOPT fails to converge, or “gets stuck” and never finishes, there are a few possible explanations:
  1. The problem is not feasible, and there is no solution.
  2. The problem is not feasible near the initial control values that you provided, and the algorithm was stuck searching in a nonfeasible space.
  3. The problem is feasible but difficult, and the algorithm itself encountered an internal error.
In any case, you might try to redefine the problem with smoother functions and refine the initial guess. Remember, a good initial guess is worth 1000 iterations! Lastly, you should reset the controls before each run after the profile fails to converge.

 How can I speed up the algorithm?

Along the same lines, IPOPT will sometimes slow down substantially or not converge at all. Another option at your disposal is the convergence tolerance, found in the Options tab of the IPOPT profile. The default is 1e-8, which often is too low. Increasing this value to 0.001 or higher promotes much faster convergence. However, it comes at a cost of reduced optimality, i.e., the algorithm will accept a solution farther from the minimum point. On a separate note, IPOPT can work with any of the propagators, but it converges fastest with the Point Mass propagator.

What other options/controls should I try to manipulate?

Besides the convergence tolerance, you have access to the constraint violation, dual infeasibility, and complementary infeasibility tolerances. Increasing these tolerances can also affect the speed and level of convergence, though this will have less effect than adjusting the convergence tolerance. You might also experiment with scaling values for each variable if parameters have very different magnitudes.

Is there a way to visualize what IPOPT is doing?

Yes. By default, IPOPT reports the variables as it iterates towards a solution. The numbers change rapidly in the output window; this is usually the algorithm calculating derivatives rather than iterating. Also, IPOPT generates a log by default, and this includes a substantial amount of information from the algorithm’s processes. You can use an IPOPT options file to reduce the quantity of information; see the attached example options file that limits the log output. Finally, the graphs feature is very robust and provides an excellent visualization to see the trends in the IPOPT problem. You can watch the graph update live as IPOPT is running, or wait until the run completes before loading graphs.

How does IPOPT compare to SNOPT?

From experience, the two profiles are functionally very similar, although their algorithms are vastly different. You can experiment with both optimization profiles and find that one converges faster for a certain problem.

What if I’m feeling adventurous?

You can use IPOPT, just like any profile in a target sequence, in an auto-sequence. These are powerful sequences that can be triggered over and over, and you could apply them to scenarios that, for example, involve station-keeping or low-thrust propulsion systems. In these cases, IPOPT is able to optimize each repeated maneuver. This feature results in interesting and novel optimized trajectories for these applications.

Where can I find more resources?

The IPOPT documentation is on the COIN-OR website: https://github.com/coin-or/Ipopt. There, you can find descriptions of common error messages, available options, and documentation of the mathematical processes within IPOPT.  Also, see the attached white paper on the implementation of IPOPT, which includes walkthroughs of some example use cases.

TitleHow can I Successfully Implement the Interior Point Optimizer (IPOPT)?
URL NameHow-can-I-successfully-implement-the-Interior-Point-Optimizer-IPOPT

Related Files

ipopt.opt
IPOPT_WhitePaper.docx