Tips and Tricks for the Sparse Nonlinear Optimizer (SNOPT) Profile in Astrogator

« Go Back


QuestionWhat are some tips and tricks for users of the SNOPT profile in Astrogator?

Below is a collection of tips and tricks for Astrogator users of all levels that you should follow in order to efficiently optimize trajectories with SNOPT. For information specifically about how SNOPT is different than a Differential Corrector, look at this FAQ: How Does SNOPT Compare to the Differential Corrector? .

Local Optimality
The SNOPT targeting profile is built to find locally optimal solutions. This means that SNOPT works best if it is trying to optimize a trajectory that has already been calculated. One way to do this in STK is to first run a target sequence using the Differential Corrector targeting profile. This will provide a SNOPT profile with a known trajectory, and SNOPT can then begin to optimize that specific solution. If a SNOPT profile is run on its own, it will be much more difficult to converge unless the initial values are very close to a possible solution.

SNOPT performs better if there are more constraints. The more constraints that you define, the easier it is for SNOPT to converge to a solution. This is because the number of possible solutions is decreased, meaning SNOPT has less room to search for the most optimal solution. There is no limit to the number of constraints that you can include in a SNOPT targeting profile, so you should always try to include as many constraints as possible.

Another way that has been shown to decrease convergence time is to bind each constraint to target one value. This is done by setting the lower and upper bounds equal to each other. If a SNOPT profile has difficulty converging, then you should go to the options tab and increase the tolerance values instead of changing the constraint bounds. If you change the bounds, then SNOPT will have a wider range of values to test, leading to a longer run time. If you change only the tolerance values, SNOPT will only target the desired value, and will converge when the solution is within those tolerance values.

Major versus minor           
The SNOPT profile uses two different iteration variants in order to find solutions. These are the major iterations and the minor iterations. The major iterations generate a sequence of iterates that satisfy the linear constraints and converge to a point that satisfies the nonlinear constraints and optimality conditions. Each iterate generates a search direction toward what will be the next iterate through a subproblem. The minor iterations are used to solve the subproblems. You can use this information to further customize the SNOPT options, specifically the major iterations and tolerances and the minor iterations and tolerances. If you are more concerned with the accuracy of the search direction towards the next iteration, then consider changing the minor values. If you are more concerned with the accuracy to which the constraints are satisfied, then consider changing the major values. It is common to set the major and minor values equal to each other, but if you want to speed up a slow calculation, prioritizing one category over another could be beneficial.

 Another way to improve SNOPT performance is to scale variables and constraints. Use scaling if the parameters in a SNOPT profile have very different magnitudes. To do scaling internally, divide the current value of a variable by its scaling value. SNOPT passes along this unitless value through the algorithm. In the Variables tab, you can change the scaling value for every variable and constraint so that all parameters in a SNOPT profile have similar orders of magnitude. One example would be to scale an altitude constraint to match an inclination constraint. If the desired inclination is zero degrees and the desired altitude is 10,000 km, then the altitude constraint scaling value could be set to 10,000 in order to match the magnitude of the inclination constraint.

Epoch control
Epoch is commonly used as a control in STK's Astrogator capability, and there are some helpful tips to know if you want to use it in a SNOPT profile. The default bound units for epoch are UTCG. However, instead of accepting a date as a bound value, SNOPT only recognizes numerical values. If you want to bind the epoch between specific dates, then change the units from the UTCG unit to any of the following epoch units: EpSec, EpMin, EpHr, EpDay, or EpYr. For all of these units, you enter a numerical value that represents the time ahead of or behind the initial value defined by the user. An example would be to define a launch window for a spacecraft. If the launch window is March 1 to March 31, set an initial value of March 16, and then set the lower bound to -15 EpDay and the upper bound to +15 EpDay. This will restrict SNOPT to search between these dates to find a solution. If you are not bounding the epoch, you do not need to change the units because SNOPT will treat the epoch control as having infinite bounds, in which case the units do not affect the outcome.

For more information on the Sparse Nonlinear Optimizer Profile, be sure to check out the attached SNOPT Exploration White Paper and PowerPoint resource files as well as the SNOPT help page on the AGI website.

TitleTips and Tricks for the Sparse Nonlinear Optimizer (SNOPT) Profile in Astrogator
URL NameTips-and-Tricks-for-the-Sparse-Nonlinear-Optimizer-SNOPT-Profile-in-Astrogator

Related Files

SNOPT Exploration (White Paper).pdf
SNOPT Exploration (PowerPoint).pptx