Sparse Nonlinear Optimizer (SNOPT) Profile

The SNOPT Optimizer search profile uses the SNOPT (Sparse Nonlinear OPTimizer) programming solver to achieve a certain goal - represented by a cost function and a set of constraint functions. The profile iteratively modifies a set of decision variables or controls to find a feasible, optimum solution.

SNOPT is a software package for solving large-scale optimization problems (linear and nonlinear programs). It employs a sparse Sequential Quadratic Programming (SQP) algorithm with limited-memory quasi-Newton approximations to the Hessian of Lagrangian. SNOPT is especially effective for nonlinear problems whose functions and gradients are expensive to evaluate. The functions should be smooth but need not be convex. An augmented Lagrangian merit function ensures convergence from an arbitrary point. Infeasible problems are treated methodically via elastic bounds on the nonlinear constraints. SNOPT allows the nonlinear constraints to be violated (if necessary) and minimizes the sum of such violations.

The Sparse Nonlinear Optimizer (SNOPT) profile requires an additional license. Please contact AGI support for licensing.

UCSD/Stanford Optimization Software, https://ccom.ucsd.edu/~optimizers/solvers/snopt/

Usage of SNOPT in the Astrogator target sequence profiles and optimal finite maneuvers now requires a complimentary license. Please contact AGI support if you require such a license for use with Astrogator.

The SNOPT profile dialog box comprises five tabs:

Variables

There are two types of variables in an optimizer profile:

  • Decision Variables (controls)
  • Objectives and Constraints (results)

To run an optimizer profile, you must define at least one decision variable and one objective. Constraints are optional. Objectives and constraints share the same source and method used to define them, but the optimizer applies them to the problem in distinct ways. Objectives are quantities that the optimizer attempts to minimize or maximize. Constraints define the set of acceptable (feasible) solutions.

Decision variables (controls)

Any element of a nested MCS segment or linked component that you can use as a control is marked by a target icon, . To select an element as a control, click its target icon. A check mark appears over the target. Click the target again to clear the selection of that element.

You can select controls in two or more nested segments. In each segment, you can select as many controls as you want. Plugins publish their inputs to Astrogator, so you can also select these inputs as controls. To target an input, you may need to double-click it to open its properties dialog box. There is a target icon next to any field that you can select.

The Restore nominal values as soon as target sequence completes MCS Option isolates changes in value. If the control is an element of a linked component, this option has an important effect. Astrogator only applies the changed value of the element to subsequent segments within the same target sequence. Segments that are outside the target sequence use the value of the element at the beginning of the MCS. If you apply corrections after running the MCS, then on the next run all segments in the MCS will use the value produced by the target sequence.

Each control that you select is listed in the Decision Variables section of the Variables tab, with the following information:

Variable Description
Use Select this check box to enable the element as a decision variable.
Name This is the name of the element.
Initial Value This is the element's initial guess value.
Current Value This is the element's final value from the last run of the optimizer. If the optimizer has not run, this value is the same as the initial value.
Lower Bound This is the lowest value that the optimizer can use for the element.
Upper Bound This is the highest value that the optimizer can use for the element.
Object This is the segment or component to which the element belongs.
Custom Display Unit Select this check box to use a custom unit for the element in the status window and graphs.
Display Unit

Shows the unit to display if you selected Custom Display Unit.

Graphs cannot display DMS or HMS angle units and will use the scenario unit instead.

Hide Inactive

If you have two or more decision variables, select this check box to hide elements not selected.

    When you select an epoch as a decision variable, its default upper and lower bounds are set to 8640000 and -8640000 seconds (~100 days), respectively, from the scenario analysis start time.

The following fields, some of which can be edited, appear below the Decision Variables list:

Field Description
Initial Value Shows the nominal value of the selected element.
Current Value This is the element's final value from the last run of the optimizer. If the optimizer has not run, this value is the same as the initial value.
Scaling Value Scaling improves numerical behavior if the profile's enabled parameters have diverse magnitudes. By default, the profile uses a scaling value of one, which is the standard (i.e., nonscaled) computation. Enter a different value in this field to apply scaling. The profile will divide the current computed value by the scaling value before passing it to the optimizer algorithm. Because the scaling value has units, the value passed to the optimizer algorithm is unitless.

Objectives and constraints (results)

Objectives and constraints are defined in terms of Calculation Objects. To select objectives and constraints for a nested MCS segment, select the segment and then click Results.... In the User-Selected Results dialog box, select the Calculation Objects that you want to use.

Each objective or constraint that you select is listed in the Objectives and Constraints (Results) section of the Variables tab, with the following information:

Variable Description
Use Select this check box to enable the element as an objective or contraint.
Object This is the object to which the element belongs.
Name This is the name of the element.
Current Value This is the element's final value from the last run of the profile. If the profile has not run, this value is the same as the initial value. You can copy the value in this field to the clipboard by right-clicking it and selecting Copy.
Goal This is the element's role in the problem that the profile is solving. Select Bound to use the element as a constraint or Minimize to use it as part of the objective. If you select two or more Minimize objectives for the same profile, then IPOPT will optimize the sum of the values. The profile multiplies each value by its weight and then divides by its scale factor.
Weight This is the relative significance of the element compared to other elements of the objective function. You can use this factor to emphasize or diminish the importance of one element relative to the others. This field only applies if the Goal of the element is Minimize. A negative weight results in maximization.
Lower Bound This is the lower limit that this element has achieved in the profile's iteration history. This field only applies if the Goal of the element is Bound. Set the Upper Bound and Lower Bound equal to define an equality constraint.
Upper Bound This is the upper limit that this element has achieved in the profile's iteration history. This field only applies if the Goal of the element is Bound. Set the Upper Bound and Lower Bound equal to define an equality constraint.
Custom Display Unit Select this check box to use a custom unit for the element in the status window and graphs.
Display Unit

Shows the unit to display if you selected Custom Display Unit.

Graphs cannot display DMS or HMS angle units and will use the scenario unit instead.

Hide Inactive If you have two or more decision variables, select this check box to hide elements not selected.

When you select an epoch as a constraint, its default upper and lower bounds are set to 8640000 and -8640000 seconds (~100 days), respectively, from the scenario analysis start time.

Options

You can use the controls on the Options tab to customize the profile's performance.

Select Reset controls before each run to reset the profile's controls each time that Astrogator runs it. The profile will discard information that was computed the last time it was run.

Option descriptions and values

You can set the most common SNOPT options in the Option descriptions and values pane. The properties that are available in this pane are described in the following table.

SNOPT options

Field Description

Maximum major iterations

“This is the maximum number of major iterations allowed. It is intended to guard against an excessive number of linearizations of the constraints. If this value is 0, both feasibility and optimality are checked.”

Major feasibility tolerance

“This specifies how accurately the nonlinear constraints should be satisfied.” You should consider the internal units (e.g., meters, seconds, etc.) of your variables when selecting this value.

Major optimality tolerance

“This specifies the final accuracy of the dual variables.” You should consider the internal units (e.g., meters, seconds, etc.) of your variables when selecting this value.

Maximum minor iterations

“If the number of minor iterations for the optimality phase of the QP subproblem exceeds k, then all nonbasic QP variables that have not yet moved are frozen at their current values and the reduced QP is solved to optimality.”

Minor feasibility tolerance

“SNOPT tries to ensure that all variables eventually satisfy their upper and lower bounds to within [the specified tolerance].” You should consider the internal units (e.g., meters, seconds, etc.) of your variables when selecting this value.

Minor optimality tolerance

Provided for completeness.

Scaling Option

Select the scaling algorithm:

  • No scaling
  • Scale all constraints and variables
  • Scale linear constraints and variables
Allow internal normalization of the primal infeasibility measure

Select this option to prohibit the profile's measure of infeasibility from circumventing internal normalization by the infinity norm of the decision vector.

This option is selected by default. You might want to clear this option for decision vectors that reflect elements of dramatically different scales (e.g., a decision vector containing an angle and a large distance) when other scaling options are not effective.

Quoted text in the SNOPT options table is taken from the User’s Guide for SNOPT Version 7.6 (PDF).

The ideal values for iterations and tolerances depend on the problem that you are trying to solve. If you need a precise solution and are willing to wait a long time, then increase the iteration values and decrease the tolerance values. If you are willing to sacrifice accuracy for computation speed, then increase the tolerance values.

SNOPT option specifications file

A SNOPT option specifications file can change all of the SNOPT algorithm’s options. All the options are described in the User’s Guide for SNOPT Version 7.6 (PDF). The manual also includes a sample file that demonstrates the options and the default values that are assigned to them in STK.

One common reason to use a specifications file is to shorten and customize the Log. You can find an example of log customization in the manual.

Format

A specifications file starts with the keyword, "Begin," and stops with the keyword, "End." The file is written in free-format, with each line specifying a single option. An asterisk at the beginning of a line marks it as a comment. The file can include any number of options.

Log

The Log tab displays the detailed SNOPT iteration log, including the algorithm options. The log is made up of Print and Summary files, which are generated by SNOPT when it runs. When SNOPT is using the default specification options, there are six key features of the log:

  • Parameters
  • Matrix Statistics
  • Major Iteration Log
  • Exit Summary
  • Constraints
  • Variables

These log features are all described in the SNOPT manual (PDF).

Log Customization through a SNOPT Option Specifications File

All six of the key log sections are displayed because the default SNOPT options are set to include them. You can create a log that displays a different set of information by creating a custom options file. A sample custom options specifications file is displayed below. You can use this file to toggle the six key sections on and off.

BEGIN TestLogCustomization 
	Major print level   0   
	Minor print level   0   
	Solution            Yes   
End TestLogCustomization

The Major print level function of an options specification file controls the display of the Major Iteration Log, Parameters, and Matrix Statistics sections of the log. If you set the value to 1, the sections will be displayed in the log. If you set the value to 0, the sections will not be displayed.

The Solution function of an options specification file controls the display of the Constraints and Variables sections of the log. If you set the value to yes, the sections will be displayed in the log. If you set the value to 0, the sections will not be displayed.

The Exit Summary is always displayed unless you specify a Print file function with a value of 0. In that case, the Exit Summary will not be displayed and the entire log will be empty. To display only the Exit Summary, the Major print level function value must be 0 and the Solution function value must be No.

Graphs

The Graphs tab comprises controls that you can use to create and view graphs of the profile's performance. The upper pane contains a table of the graphs defined for the profile. The Graph Properties pane displays the collection of properties that you can use to define each graph. Select a graph in the table in the upper pane to view and define its properties here.

Graphs Table

Using the toolbar, you can create new graphs or cut, copy, paste, or delete them.

Button Name Function
New... Insert a new graph with default properties settings.
Cut Move the selected graph from the list to the clipboard.
Copy Copy the selected graph to the clipboard.
Paste Insert a copy of the graph that is on the clipboard.
Delete Delete the selected graph.

The graphs table displays the name and a description of each graph. Select Generate on run if you want Astrogator generate the graph each time that it runs the MCS. You can right-click on a graph to select the same commands that are available in the toolbar.

Graph Properties

Each graph can display the values of any number of the active Controls and Results defined for the profile against an X axis of the number of iterations performed or any single active Control or Result defined for the profile.

The Independent variable field defines the X axis of the graph. If the X axis is an active Control or Result, select Label Iterations if you want to label the points on the graph by their iteration numbers.

The active Controls defined for the profile are listed in a table. You can customize how they are displayed in the graph by clicking directly in the property fields.

  • Name - The name of the element selected as a control.
  • Object - The segment or component that the element belongs to.
  • Graph Value - Select this option to include the value.
  • Line Color - The color of line that will be used to represent the control's value.
  • Point Style - The style of marker that will be used to represent iteration points along the control's line.
  • Y Axis - Select Y1 or Y2 to display a range of values suitable to the control on the left or right side, respectively, of the graph.

The active Results defined for the profile are also listed in a table. You can customize how they are displayed in the graph by clicking directly in the property fields.

  • Name - The name of the Calculation Object used as a result.
  • Object - The segment or component that this result has been selected for.
  • Graph Option - Select Don't graph to leave the result out of the graph, Graph difference to display the difference between the result's value and the desired value, or Graph value to use the result's value.
  • Show Desired Value - If the result has a DesiredValue property, select this option to display the result's desired value.
  • Line Color - The color of line that will be used to represent the result's value.
  • Point Style - The style of marker that will be used to represent iteration points along the result's line.
  • Y Axis - Select Y1 or Y2 to display a range of values suitable to the result on the left or right side, respectively, of the graph.
  • Show Tolerance Band - If the result has a Tolerance property, select this option to display the tolerance for the result's desired value.

Click Generate Graph to produce the selected graph. To produce a report of the graph data, click Generate Report.

Scripting

The Scripting tab contains an embedded instance of the Scripting Tool. If you enter a script here, Astrogator will execute it before running the sequence each time Astrogator runs the sequence. You can use parameters that are defined in the Scripting Tool as controls by the profile.