Uno

Uno (Unifying Nonlinear Optimization) is a C++ library for solving nonlinearly constrained optimization problems

Installation

Uno and its Python interface must be installed via the unopy package unopy.

Options

Uno decomposes nonlinear optimization algorithms into a set of “ingredients” that can be combined in various ways. To mimic the behavior of well-known algorithms, it has several presets. Further customization is available via other options.

For complete and up-to-date information about all options, please refer to the Uno options documentation.

Uno Default Options

Name

Type

Default value

Description

preset

str

filtersqp

Specifies the preset option in Uno (str).

  • filtersqp: Trust region restoration filter SQP solver.

  • filterslp: Trust region restoration filter SLP solver.

  • funnelsqp: Funnel-method SQP solver.

  • ipopt: line-search filter restoration infeasible interior-point solver

The default value is filtersqp.

logger_stream

TextIO or str or Path

None

The stream to which the logger writes the log.

The default value is None, which leaves the logger stream unchanged. If given as a string or Path, open that file for the log.

save_major_iteration_variables

list

[]

This option is unique to the Python wrapper, and takes a list of values which can be saved at each major iteration to the History file. A “major iteration” corresponds to an accepted iterate in Uno’s outer loop (i.e. an iterate that passed the globalization strategy’s acceptance test). Trial points evaluated during line search or trust-region rejections are not major iterations.

The following entries are always saved at every major iteration regardless of this option:

  • isMajor (always True for major-iteration records)

  • nMajor (zero-based count of major iterations)

  • primal_feasibility_residual

  • stationarity_residual

  • complementarity_residual

  • objective_multiplier

The possible values that can be added via this option are

  • lower_bound_multipliers (one value per design variable)

  • upper_bound_multipliers (one value per design variable)

  • constraint_multipliers (one value per general constraint)

The default value is [].

primal_tolerance

float

1e-08

Tolerance on constraint violation (double).

The default value is 1e-8.

dual_tolerance

float

1e-08

Tolerance on stationarity and complementarity (double).

The default value is 1e-8.

loose_primal_tolerance

float

1e-06

Loose tolerance on constraint violation (double).

The default value is 1e-6.

loose_dual_tolerance

float

1e-06

Loose tolerance on stationarity and complementarity (double).

The default value is 1e-6.

loose_tolerance_iteration_threshold

int

15

Number of iterations before loose tolerance applies (int).

The default value is 15.

max_iterations

int

2000

Maximum number of outer iterations (int).

The default value is 2000.

time_limit

float

inf

Time limit in seconds (double).

The default value is infinity.

unbounded_objective_threshold

float

-1e+20

Objective threshold for unboundedness detection (double).

The default value is -1e20.

logger

str

INFO

The verbosity level of the output (str). Increasing levels out output are provided in the sequence: - SILENT, DISCRETE, WARNING, INFO, DEBUG, DEBUG2, DEBUG3

The default value is INFO.

print_solution

bool

False

Output primal-dual solution (bool).

The default value is false.

print_subproblem

bool

False

Output subproblem in DEBUG mode only (bool).

The default value is false.

progress_norm

str

L1

Norm for progress measures (str). Options: L1, L2, INF.

The default value is L1.

residual_norm

str

INF

Norm for residuals (str). Options: L1, L2, INF.

The default value is INF.

residual_scaling_threshold

float

100.0

Scaling factor for residuals (double).

The default value is 100.0.

protect_actual_reduction_against_roundoff

bool

False

Protection against roundoff errors (bool).

The default value is false.

protected_actual_reduction_macheps_coefficient

float

10.0

Machine epsilon coefficient (double).

The default value is 10.

hessian_model

str

LBFGS

One of exact, LBFGS, LSR1, identity, zero.

The default in pyOptSParse is LBFGS to prevent a fallback to LSR1 in trust region methods.

quasi_newton_memory_size

int

20

Size of quasi-Newton limited memory (int).

The default value in pyOptSParse is 20.

Informs

Uno Informs

Code

Description

0

Success

1

Iteration Limit Exceeded

2

Time Limit Exceeded

3

Evaluation Error

4

Algorithmic Error

5

User Termination

API

class pyoptsparse.pyUno.pyUno.Uno(*args, **kwargs)[source]

Uno Optimizer Class - Inherited from Optimizer Abstract Class.

Uses the unopy Python bindings to the Uno unified nonlinear optimizer.

Uno Optimizer Class Initialization.

Parameters:
raiseErrorbool

If True, raises an ImportError when unopy is not available.

optionsdict

Dictionary of options to pass to the optimizer.

__call__(optProb, sens=None, sensStep=None, sensMode=None, storeHistory=None, hotStart=None, storeSens=True)[source]

This is the main routine used to solve the optimization problem.

Parameters:
optProbOptimization or Solution class instance

This is the complete description of the optimization problem to be solved by the optimizer.

sensstr or python Function.

Specify method to compute sensitivities. To explicitly use pyOptSparse gradient class to do the derivatives with finite differences use ‘FD’. ‘sens’ may also be ‘CS’ which will cause pyOptSparse to compute the derivatives using the complex step method. Finally, ‘sens’ may be a python function handle which is expected to compute the sensitivities directly. For expensive function evaluations and/or problems with large numbers of design variables this is the preferred method.

sensStepfloat

Set the step size to use for design variables. Defaults to 1e-6 when sens is ‘FD’ and 1e-40j when sens is ‘CS’.

sensModestr

Use ‘pgc’ for parallel gradient computations. Only available with mpi4py and each objective evaluation is otherwise serial.

storeHistorystr

File name of the history file into which the history of this optimization will be stored.

hotStartstr

File name of the history file to “replay” for the optimization. The optimization problem used to generate the history file specified in ‘hotStart’ must be IDENTICAL to the currently supplied ‘optProb’. By identical we mean, EVERY SINGLE PARAMETER MUST BE IDENTICAL. As soon as the requested evaluation point does not match the history, function and gradient evaluations revert back to normal evaluations.

storeSensbool

Flag specifying if sensitivities are to be stored in hist. This is necessary for hot-starting only.