OptimizationResult

class OptimizationResult(*args)

Optimization result.

Returned by optimization solvers, see OptimizationAlgorithm.

Available constructors:
OptimizationResult(optimalPoint, optimalValue, iterationNumber, absoluteError, relativeError, residualError, constraintError)
Parameters:

optimalPoint : sequence of float

Optimal point.

optimalValue : sequence of float

Value at optimal point.

iterationNumber : int

Number of iterations.

absoluteError : float

Parameters for this solver.

relativeError : float

Relative error.

residualError : float

Residual error.

constraintError : float

Constraint error.

problem : OptimizationProblem

Associated problem.

Methods

drawErrorHistory() Draw the convergence criteria history.
drawOptimalValueHistory() Draw the optimal value history.
getAbsoluteError() Accessor to the absolute error.
getAbsoluteErrorHistory() Accessor to the evolution of the absolute error.
getClassName() Accessor to the object’s name.
getConstraintError() Accessor to the constraint error.
getConstraintErrorHistory() Accessor to the evolution of the constraint error.
getId() Accessor to the object’s id.
getInputSample() Accessor to the input sample.
getIterationNumber() Accessor to the number of iterations.
getLagrangeMultipliers() Accessor to the Lagrange multipliers.
getName() Accessor to the object’s name.
getOptimalPoint() Accessor to the optimal point.
getOptimalValue() Accessor to the optimal value.
getOutputSample() Accessor to the output sample.
getProblem() Accessor to the underlying optimization problem.
getRelativeError() Accessor to the relative error.
getRelativeErrorHistory() Accessor to the evolution of the relative error.
getResidualError() Accessor to the residual error.
getResidualErrorHistory() Accessor to the evolution of the residual error.
getShadowedId() Accessor to the object’s shadowed id.
getVisibility() Accessor to the object’s visibility state.
hasName() Test if the object is named.
hasVisibleName() Test if the object has a distinguishable name.
setIterationNumber(iterationNumber) Accessor to the number of iterations.
setLagrangeMultipliers(lagrangeMultipliers) Accessor to the Lagrange multipliers.
setName(name) Accessor to the object’s name.
setOptimalPoint(optimalPoint) Accessor to the optimal point.
setOptimalValue(optimalValue) Accessor to the optimal value.
setProblem(problem) Accessor to the underlying optimization problem.
setShadowedId(id) Accessor to the object’s shadowed id.
setVisibility(visible) Accessor to the object’s visibility state.
store(inP, outP, absoluteError, …)
__init__(*args)

x.__init__(…) initializes x; see help(type(x)) for signature

drawErrorHistory()

Draw the convergence criteria history.

Returns:

graph : Graph

Convergence criteria history graph

drawOptimalValueHistory()

Draw the optimal value history.

Returns:

graph : Graph

Optimal value history graph

getAbsoluteError()

Accessor to the absolute error.

Returns:

absoluteError : float

Absolute error, defined by \epsilon^a_n=\|\vect{x}_{n+1}-\vect{x}_n\|_{\infty} where \vect{x}_{n+1} and \vect{x}_n are two consecutive approximations of the optimum.

getAbsoluteErrorHistory()

Accessor to the evolution of the absolute error.

Returns:

absoluteErrorHistory : Sample

Value of the absolute error at each iteration of the solver.

getClassName()

Accessor to the object’s name.

Returns:

class_name : str

The object class name (object.__class__.__name__).

getConstraintError()

Accessor to the constraint error.

Returns:

constraintError : float

Constraint error, defined by \gamma_n=\|g(\vect{x}_n)\|_{\infty} where \vect{x}_n is the current approximation of the optimum and g is the function that gather all the equality and inequality constraints.

getConstraintErrorHistory()

Accessor to the evolution of the constraint error.

Returns:

constraintErrorHistory : Sample

Value of the constrainte error at each iteration of the solver.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getInputSample()

Accessor to the input sample.

Returns:

inputSample : Sample

Input points used by the solver

getIterationNumber()

Accessor to the number of iterations.

Returns:

iterationNumber : int

Number of evaluations.

getLagrangeMultipliers()

Accessor to the Lagrange multipliers.

Returns:

multipliers : Point

Lagrange multipliers.

Notes

See OptimizationAlgorithm for the details on how the multipliers are defined and stored in the result.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getOptimalPoint()

Accessor to the optimal point.

Returns:

optimalPoint : Point

Optimal point

getOptimalValue()

Accessor to the optimal value.

Returns:

optimalValue : Point

Value at the optimal point

getOutputSample()

Accessor to the output sample.

Returns:

outputSample : Sample

Output points used by the solver

getProblem()

Accessor to the underlying optimization problem.

Returns:

problem : OptimizationProblem

Problem corresponding to the result

getRelativeError()

Accessor to the relative error.

Returns:

relativeError : float

Relative error, defined by \epsilon^r_n=\epsilon^a_n/\|\vect{x}_{n+1}\|_{\infty} if \|\vect{x}_{n+1}\|_{\infty}\neq 0, else \epsilon^r_n=-1.

getRelativeErrorHistory()

Accessor to the evolution of the relative error.

Returns:

relativeErrorHistory : Sample

Value of the relative error at each iteration of the solver.

getResidualError()

Accessor to the residual error.

Returns:

residualError : float

Residual error, defined by \eta^r_n=\|\nabla\cL{\vect{x}_n}\|_{\infty} where \vect{x}_n is the current approximation of the optimum and \cL is the Lagrangian of the problem.

getResidualErrorHistory()

Accessor to the evolution of the residual error.

Returns:

residualErrorHistory : Sample

Value of the residual error at each iteration of the solver.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:

id : int

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:

visible : bool

Visibility flag.

hasName()

Test if the object is named.

Returns:

hasName : bool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:

hasVisibleName : bool

True if the name is not empty and not the default one.

setIterationNumber(iterationNumber)

Accessor to the number of iterations.

Parameters:

iterationNumber : int

Number of evaluations.

setLagrangeMultipliers(lagrangeMultipliers)

Accessor to the Lagrange multipliers.

Parameters:

multipliers : Point

Lagrange multipliers.

Notes

See OptimizationAlgorithm for the details on how the multipliers are defined and stored in the result.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setOptimalPoint(optimalPoint)

Accessor to the optimal point.

Parameters:

optimalPoint : Point

Optimal point

setOptimalValue(optimalValue)

Accessor to the optimal value.

Parameters:

optimalValue : Point

Value at the optimal point

setProblem(problem)

Accessor to the underlying optimization problem.

Parameters:

problem : OptimizationProblem

Problem corresponding to the result

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:

id : int

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:

visible : bool

Visibility flag.