Optimization Engines |
Top Previous Next |
FreeFlyer supports three industry-standard optimizers:
Support for Ipopt and NLopt is built-in to FreeFlyer and requires no additional configuration on the part of the user, although the user has the option to provide their own shared library file for these engines if desired (in the form of a .dll file for Windows, or .so file for Linux). To use SNOPT, a user must have access to their own SNOPT license and provide the path to their SNOPT library when loading the optimization engine.
Each engine has its own specific set of configuration options, return codes/strings, and standard output behavior. Users should refer to the documentation for each third party library for more information regarding interpretation of output and return codes/strings.
Note: NLopt does not generate any standard output, so the EngineOutput StringArray and LastGeneratedEngineOutput String properties on the Optimizer object will always be empty when the NLopt engine is selected.
Ipopt (Interior Point Optimizer) is an open source software package for large-scale nonlinear optimization that finds solutions that are locally optimal, which are often but not always globally optimal solutions. Ipopt version 3.13.2 comes included with FreeFlyer and does not require any additional setup, but can also be compiled with optimized linear algebra libraries that are hardware specific. Third party documentation for Ipopt is available online.
DependenciesNo additional dependencies are required to use the built-in version of Ipopt that is included with FreeFlyer. Refer to third party documentation for information on building customized Ipopt libraries separately from FreeFlyer.
Load Ipopt EngineAn Ipopt engine can be loaded into an Optimizer object using any of the following overloads to the Optimizer.LoadEngine() method. Ipopt is the default optimization engine in FreeFlyer and will be loaded when this method is called with no arguments.
IpoptOptionsThe IpoptOptions object provides access to Ipopt-specific configuration parameters. These options can be configured entirely separately from the Optimizer object, then applied to the problem by loading in the IpoptOptions object when calling the Optimizer.LoadEngine() method. To set a user-provided library file in this configuration, set the IpoptOptions.SharedLibraryFilename property to point to the file.
A set of Ipopt options can be loaded from a file by setting the IpoptOptions.OptionsFilename property, which corresponds to the "option_file_name" option in native Ipopt. Refer to third party Ipopt documentation for more information on the required options file format.
There are a number of properties on the IpoptOptions object in FreeFlyer that correspond to native Ipopt options (for example, the IpoptOptions.Tolerance property corresponds to the "tol" option in native Ipopt); see the IpoptOptions Object page for a full list of all properties. All options in the Ipopt engine are identified by a string keyword, and their values can be of type Integer, Number, or String. Any of these can be configured from the IpoptOptions object in FreeFlyer through the AddIntOption(), AddNumOption(), and AddStrOption() methods. Refer to third party Ipopt documentation for information about all available options.
When all the desired options have been configured, the IpoptOptions object can be loaded into the Optimizer with the Optimizer.LoadEngine() method:
NLopt (NonLinear Optimizer) is an open source library for large-scale nonlinear optimization. NLopt version 2.6.2 comes included with FreeFlyer and does not require any additional setup, but can also be downloaded and installed separately. Third party documentation for NLopt is available online.
DependenciesNo additional dependencies are required to use the built-in version of NLopt that is included with FreeFlyer. Refer to third party documentation for information on using NLopt separately from FreeFlyer.
Load NLopt EngineA NLopt engine can be loaded into an Optimizer object using any of the following overloads to the Optimizer.LoadEngine() method:
NloptOptionsThe NloptOptions object provides access to NLopt-specific configuration parameters. These options can be configured entirely separately from the Optimizer object, then applied to the problem by loading in the NLoptOptions object when calling the Optimizer.LoadEngine() method. To set a user-provided library file in this configuration, set the NloptOptions.SharedLibraryFilename property to point to the file.
The properties on the NloptOptions object provide direct access from FreeFlyer to NLopt-specific configuration parameters such as the algorithm to use for the process; see the NloptOptions Object page for a full list of all properties. Refer to third party NLopt documentation for more information about each option, including details on the different algorithm choices.
When all the desired options have been configured, the NloptOptions object can be loaded into the Optimizer with the Optimizer.LoadEngine() method:
Note: NLopt supports global optimization, meaning that it can utilize algorithms to find the globally best solution even in the presence of multiple local optima. When using a global optimization algorithm, the NloptOptions.RelativeObjectiveTolerance property should be set to 0. See third party NLopt documentation for more information about global optimization algorithms.
SNOPT (Sparse Nonlinear OPTimizer) is a general-purpose system for constrained optimization suitable for large-scale linear, quadratic, and nonlinear programs. SNOPT finds solutions that are locally optimal, which are often but not always globally optimal solutions. SNOPT is developed, licensed, and distributed by Stanford University, and is not built in to FreeFlyer or available from a.i. solutions, Inc. Third party documentation for SNOPT is available online.
DependenciesUsers must provide their own SNOPT license and shared library file in order to use a SNOPT engine with FreeFlyer's Optimizer object, which is verified compatible with SNOPT version 7.7. Stanford offers a pre-built version of the SNOPT library, as well as the option for the user to build SNOPT themselves. The following dependencies are known to be required for the Stanford-built SNOPT v7.7:
If errors occur when trying to load the SNOPT engine into the FreeFlyer Optimizer object, first confirm that all required dependencies are present. Note that dependencies beyond those listed here may be required if using a SNOPT library that was not pre-built by Stanford; if this is the case, consult third party SNOPT documentation and support for troubleshooting steps.
Load SNOPT EngineA SNOPT engine can be loaded into an Optimizer object using any of the following overloads to the Optimizer.LoadEngine() method:
SnoptOptionsThe SnoptOptions object provides access to SNOPT-specific configuration parameters. These options can be configured entirely separately from the Optimizer object, then applied to the problem by loading in the SnoptOptions object when calling the Optimizer.LoadEngine() method. To set a user-provided library file in this configuration, set the SnoptOptions.SharedLibraryFilename property to point to the file.
A set of SNOPT options can be loaded from a SPECS file by setting the SnoptOptions.SpecFilename property. Refer to third party SNOPT documentation for more information on the required SPECS file format.
There are a number of properties on the SnoptOptions object in FreeFlyer that correspond to native SNOPT parameters (for example, the SnoptOptions.FunctionPrecision property corresponds to the "Function precision" parameter in native SNOPT); see the SnoptOptions Object page for a full list of all properties. All parameters in the SNOPT engine are identified by a string keyword, and their values can be of type Integer or Real Number. Any of these can be configured from the SnoptOptions object in FreeFlyer through the SetParameter(), SetIntParameter(), and SetRealParameter() methods. Refer to third party SNOPT documentation for information about all available options.
When all the desired options have been configured, the SnoptOptions object can be loaded into the Optimizer with the Optimizer.LoadEngine() method:
See Also
|