OptimizationResult

class OptimizationResult(*args)

Optimization result.

Returned by optimization solvers, see OptimizationAlgorithm.

Available constructors:

OptimizationResult(optimalPoint, optimalValue, evaluationNumber, absoluteError, relativeError, residualError, constraintError)

Parameters
optimalPointsequence of float

Optimal point.

optimalValuesequence of float

Value at optimal point.

evaluationNumberint

Number of evaluations.

absoluteErrorfloat

Parameters for this solver.

relativeErrorfloat

Relative error.

residualErrorfloat

Residual error.

constraintErrorfloat

Constraint error.

problemOptimizationProblem

Associated problem.

Methods

drawErrorHistory(self)

Draw the convergence criteria history.

drawOptimalValueHistory(self)

Draw the optimal value history.

getAbsoluteError(self)

Accessor to the absolute error.

getAbsoluteErrorHistory(self)

Accessor to the evolution of the absolute error.

getClassName(self)

Accessor to the object’s name.

getConstraintError(self)

Accessor to the constraint error.

getConstraintErrorHistory(self)

Accessor to the evolution of the constraint error.

getEvaluationNumber(self)

Accessor to the number of evaluations.

getId(self)

Accessor to the object’s id.

getInputSample(self)

Accessor to the input sample.

getIterationNumber(self)

Accessor to the number of iterations.

getLagrangeMultipliers(self)

Accessor to the Lagrange multipliers.

getName(self)

Accessor to the object’s name.

getOptimalPoint(self)

Accessor to the optimal point.

getOptimalValue(self)

Accessor to the optimal value.

getOutputSample(self)

Accessor to the output sample.

getProblem(self)

Accessor to the underlying optimization problem.

getRelativeError(self)

Accessor to the relative error.

getRelativeErrorHistory(self)

Accessor to the evolution of the relative error.

getResidualError(self)

Accessor to the residual error.

getResidualErrorHistory(self)

Accessor to the evolution of the residual error.

getShadowedId(self)

Accessor to the object’s shadowed id.

getVisibility(self)

Accessor to the object’s visibility state.

hasName(self)

Test if the object is named.

hasVisibleName(self)

Test if the object has a distinguishable name.

setEvaluationNumber(self, evaluationNumber)

Accessor to the number of evaluation.

setIterationNumber(self, iterationNumber)

Accessor to the number of iterations.

setLagrangeMultipliers(self, lagrangeMultipliers)

Accessor to the Lagrange multipliers.

setName(self, name)

Accessor to the object’s name.

setOptimalPoint(self, optimalPoint)

Accessor to the optimal point.

setOptimalValue(self, optimalValue)

Accessor to the optimal value.

setProblem(self, problem)

Accessor to the underlying optimization problem.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

setVisibility(self, visible)

Accessor to the object’s visibility state.

store

__init__(self, \*args)

Initialize self. See help(type(self)) for accurate signature.

drawErrorHistory(self)

Draw the convergence criteria history.

Returns
graphGraph

Convergence criteria history graph

drawOptimalValueHistory(self)

Draw the optimal value history.

Returns
graphGraph

Optimal value history graph

getAbsoluteError(self)

Accessor to the absolute error.

Returns
absoluteErrorfloat

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(self)

Accessor to the evolution of the absolute error.

Returns
absoluteErrorHistorySample

Value of the absolute error at each function evaluation.

getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

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

getConstraintError(self)

Accessor to the constraint error.

Returns
constraintErrorfloat

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 gathers all the equality and inequality constraints (violated values only).

getConstraintErrorHistory(self)

Accessor to the evolution of the constraint error.

Returns
constraintErrorHistorySample

Value of the constraint error at each function evaluation.

getEvaluationNumber(self)

Accessor to the number of evaluations.

Returns
evaluationNumberint

Number of evaluations.

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getInputSample(self)

Accessor to the input sample.

Returns
inputSampleSample

Input points used by the solver

getIterationNumber(self)

Accessor to the number of iterations.

Returns
iterationNumberint

Number of iterations.

getLagrangeMultipliers(self)

Accessor to the Lagrange multipliers.

Returns
multipliersPoint

Lagrange multipliers.

Notes

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

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getOptimalPoint(self)

Accessor to the optimal point.

Returns
optimalPointPoint

Optimal point

getOptimalValue(self)

Accessor to the optimal value.

Returns
optimalValuePoint

Value at the optimal point

getOutputSample(self)

Accessor to the output sample.

Returns
outputSampleSample

Output points used by the solver

getProblem(self)

Accessor to the underlying optimization problem.

Returns
problemOptimizationProblem

Problem corresponding to the result

getRelativeError(self)

Accessor to the relative error.

Returns
relativeErrorfloat

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(self)

Accessor to the evolution of the relative error.

Returns
relativeErrorHistorySample

Value of the relative error at each function evaluation.

getResidualError(self)

Accessor to the residual error.

Returns
residualErrorfloat

Relative error, defined by \epsilon^r_n=\frac{\|f(\vect{x}_{n+1})-f(\vect{x}_{n})\|}{\|f(\vect{x}_{n+1})\|} if \|f(\vect{x}_{n+1})\|\neq 0, else \epsilon^r_n=-1.

getResidualErrorHistory(self)

Accessor to the evolution of the residual error.

Returns
residualErrorHistorySample

Value of the residual error at each function evaluation.

getShadowedId(self)

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getVisibility(self)

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName(self)

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName(self)

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

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

setEvaluationNumber(self, evaluationNumber)

Accessor to the number of evaluation.

Parameters
evaluationNumberint

Number of evaluations.

setIterationNumber(self, iterationNumber)

Accessor to the number of iterations.

Parameters
iterationNumberint

Number of iterations.

setLagrangeMultipliers(self, lagrangeMultipliers)

Accessor to the Lagrange multipliers.

Parameters
multipliersPoint

Lagrange multipliers.

Notes

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

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setOptimalPoint(self, optimalPoint)

Accessor to the optimal point.

Parameters
optimalPointPoint

Optimal point

setOptimalValue(self, optimalValue)

Accessor to the optimal value.

Parameters
optimalValuePoint

Value at the optimal point

setProblem(self, problem)

Accessor to the underlying optimization problem.

Parameters
problemOptimizationProblem

Problem corresponding to the result

setShadowedId(self, id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setVisibility(self, visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.