|
Interior-point-optimisation
1.0-1
Interior-pointoptimisationlibrary
|
Line search parameters. More...
#include <NewtonDescent.hpp>

Public Member Functions | |
| Parameters () | |
| Constructor: sets default values. More... | |
| void | setOutputStream (std::ostream *outputStream) |
| Set outputStream. More... | |
| std::ostream * | getOutputStream () const |
| Get the current value of outputStream. More... | |
| bool | getPhaseI () const |
| void | setPhaseI (bool const phaseI) |
| This function is designed to be used to help find an initial (phase I) feasible solution. More... | |
| void | setGradTol (double const gradTol) |
| Set the value of gradTol. More... | |
| void | setStepTol (double const stepTol) |
| Set the value of stepTol. More... | |
| void | setIterMax (size_t const iterMax) |
| Set the value of iterMax. More... | |
| void | setf_typ (double const f_typ) |
| Set the value of typical value of function. More... | |
| void | setx_typ (gsl::vector x_typ) |
| Set the value of typical value of argument. More... | |
| double | getGradTol () const |
| Get the value of gradTol. More... | |
| double | getStepTol () const |
| Get the value of stepTol. More... | |
| size_t | getIterMax () const |
| Get the value of iterMax. More... | |
| double | getf_typ () const |
| Get the value of typical value of function. More... | |
| gsl::vector | getx_typ () const |
| Get the value of typical value of argument. More... | |
| void | setVectorDigits (size_t const vectorDigits) |
| Set the number of significant digits of entries of vector to show in each Newton step. More... | |
| size_t | getVectorDigits () const |
| Get the value of vectorDigits. More... | |
Private Attributes | |
| std::ostream * | outputStream |
| A stream (default is nullptr) for sending output to. More... | |
| bool | phaseI |
| This value Is normally set to false. More... | |
| double | gradTol |
| The Newton descent needs a stopping condition. More... | |
| double | stepTol |
| The Newton descent needs a stopping condition. More... | |
| size_t | iterMax |
| The Newton descent needs a stopping condition. More... | |
| double | f_typ |
| Typical function value: default is 1. More... | |
| gsl::vector | x_typ |
| Typical argument value: default is no unspecified vector (evaluates to false), which is interpreted as a vector of ones of length matching argument supplied. More... | |
| size_t | vectorDigits |
| If this value is set to zero and outputStream is not null then vector arguments are not shown (more useful if the argument is large). More... | |
Line search parameters.
These control how line search works in detail and whether and where any output is produced.
Definition at line 56 of file NewtonDescent.hpp.
| NewtonDescent::Parameters::Parameters | ( | ) |
Constructor: sets default values.
Definition at line 40 of file NewtonDescent.cc.
References setf_typ(), setGradTol(), setIterMax(), setOutputStream(), setPhaseI(), setStepTol(), setVectorDigits(), and setx_typ().
|
inline |
Get the value of typical value of function.
Definition at line 132 of file NewtonDescent.hpp.
References f_typ.
Referenced by ipo::detail::NewtonDescent::Stopping::operator()().
|
inline |
Get the value of gradTol.
Definition at line 117 of file NewtonDescent.hpp.
References gradTol.
Referenced by ipo::detail::NewtonDescent::Stopping::operator()().
|
inline |
Get the value of iterMax.
Definition at line 127 of file NewtonDescent.hpp.
References iterMax.
| std::ostream * NewtonDescent::Parameters::getOutputStream | ( | ) | const |
Get the current value of outputStream.
Definition at line 231 of file NewtonDescent.cc.
Referenced by ipo::detail::NewtonDescent::operator()().
|
inline |
Definition at line 75 of file NewtonDescent.hpp.
References phaseI.
Referenced by ipo::detail::NewtonDescent::operator()().
|
inline |
Get the value of stepTol.
Definition at line 122 of file NewtonDescent.hpp.
References stepTol.
|
inline |
Get the value of vectorDigits.
Definition at line 151 of file NewtonDescent.hpp.
References vectorDigits.
Referenced by ipo::detail::NewtonDescent::operator()().
|
inline |
Get the value of typical value of argument.
Definition at line 137 of file NewtonDescent.hpp.
References x_typ.
Referenced by ipo::detail::NewtonDescent::Stopping::operator()().
|
inline |
Set the value of typical value of function.
| f_typ | The new value of f_typ |
Definition at line 107 of file NewtonDescent.hpp.
References f_typ.
Referenced by Parameters().
|
inline |
Set the value of gradTol.
| gradTol | The new value of gradTol |
Definition at line 92 of file NewtonDescent.hpp.
References gradTol.
Referenced by Parameters().
|
inline |
Set the value of iterMax.
| iterMax | The new value of iterMax |
Definition at line 102 of file NewtonDescent.hpp.
References iterMax.
Referenced by Parameters().
| void NewtonDescent::Parameters::setOutputStream | ( | std::ostream * | outputStream | ) |
Set outputStream.
Set this to point to an output stream to record progress.
| outputStream | The new value |
Definition at line 226 of file NewtonDescent.cc.
Referenced by Parameters().
|
inline |
This function is designed to be used to help find an initial (phase I) feasible solution.
Normally phaseI is set to false. But, in phase I of interior-point, the optimisation can stop as soon as a solution is found that is feasible in the original model. Set phaseI to true to achieve this.
In practice, this parameter is not set explicitly by the end developer, but is set internally in PhaseIModel.
| phaseI | Set true or false |
Definition at line 87 of file NewtonDescent.hpp.
References phaseI.
Referenced by ipo::detail::PhaseIModel::findFeasibleSolution(), and Parameters().
|
inline |
Set the value of stepTol.
| stepTol | The new value of stepTol |
Definition at line 97 of file NewtonDescent.hpp.
References stepTol.
Referenced by Parameters().
|
inline |
Set the number of significant digits of entries of vector to show in each Newton step.
If this is set to zero or outputStream is null then no vector output is shown.
| vectorDigits | The new value for vector significant digits |
Definition at line 144 of file NewtonDescent.hpp.
References vectorDigits.
Referenced by Parameters().
|
inline |
Set the value of typical value of argument.
| x_typ | The new value of x_typ |
Definition at line 112 of file NewtonDescent.hpp.
References x_typ.
Referenced by Parameters().
|
private |
Typical function value: default is 1.
This value is used together with gradTol so that we can compute the relative gradient plausibly even when the gradient is close to zero.
Definition at line 204 of file NewtonDescent.hpp.
Referenced by getf_typ(), and setf_typ().
|
private |
The Newton descent needs a stopping condition.
This value is used in one of three. If any are satistfied then the algorithm stops. See Dennis and Schnabel, Numerical Mehods for Unconstrained Optimization and Nonlinear Equations, SIAM, 1996, Chapter 7 for further details.
The algorithm stops if the absolute value of the maximum element of the relative gradient is at most this value (gradient tolerance).
Definition at line 176 of file NewtonDescent.hpp.
Referenced by getGradTol(), and setGradTol().
|
private |
The Newton descent needs a stopping condition.
This value is used in one of three. If any are satistfied then the algorithm stops. See Dennis and Schnabel, Numerical Mehods for Unconstrained Optimization and Nonlinear Equations, SIAM, 1996, Chapter 7 for further details.
The maximum number of search steps: default is 10000. This is the most problematic of the three stopping conditions because if it is met the Newton Search has stopped outside the specified numerical tolerance.
Definition at line 198 of file NewtonDescent.hpp.
Referenced by getIterMax(), and setIterMax().
|
private |
A stream (default is nullptr) for sending output to.
If this is set then the value of the objective function at each step of the Newton descent algorithm is shown, together with the vector at which the objective obtains this value if vectorDigits is set to a positive value.
Definition at line 159 of file NewtonDescent.hpp.
|
private |
This value Is normally set to false.
But it can be set to true so that Newton descent stops when the final component of the vector is negative. This is useful in phase 1 of an interior point optimisation because the optimum solution may be unbounded but we only require a feasible solution.
Definition at line 166 of file NewtonDescent.hpp.
Referenced by getPhaseI(), and setPhaseI().
|
private |
The Newton descent needs a stopping condition.
This value is used in one of three. If any are satistfied then the algorithm stops. See Dennis and Schnabel, Numerical Mehods for Unconstrained Optimization and Nonlinear Equations, SIAM, 1996, Chapter 7 for further details.
The algorithm stops if the relative step size gets less than this value (step tolerance). The step size is the maximum size of a change in the objective argument from one step to the next.
Definition at line 187 of file NewtonDescent.hpp.
Referenced by getStepTol(), and setStepTol().
|
private |
If this value is set to zero and outputStream is not null then vector arguments are not shown (more useful if the argument is large).
Otherwise this value determines the number of significant digits that are shown with each vector entry.
Definition at line 217 of file NewtonDescent.hpp.
Referenced by getVectorDigits(), and setVectorDigits().
|
private |
Typical argument value: default is no unspecified vector (evaluates to false), which is interpreted as a vector of ones of length matching argument supplied.
This value is used together with stepTol so that we can compute the relative step size plausibly even when the objective argument is close to zero.
Definition at line 211 of file NewtonDescent.hpp.
Referenced by getx_typ(), and setx_typ().