Struct optimization_engine::core::panoc::PANOCCache [−][src]
pub struct PANOCCache { /* fields omitted */ }
Expand description
Cache for PANOC
This struct carries all the information needed at every step of the algorithm.
An instance of PANOCCache
needs to be allocated once and a (mutable) reference to it should
be passed to instances of PANOCOPtimizer
Subsequently, a PANOCEngine
is used to construct an instance of PANOCAlgorithm
Implementations
Construct a new instance of PANOCCache
Arguments
problem_size
dimension of the decision variables of the optimization problemtolerance
specified tolerancelbfgs_memory_size
memory of the LBFGS buffer
Panics
The method will panic if
- the specified
tolerance
is not positive - memory allocation fails (memory capacity overflow)
Memory allocation
This constructor allocated memory using vec!
.
It allocates a total of 8*problem_size + 2*lbfgs_memory_size*problem_size + 2*lbfgs_memory_size + 11
floats (f64
)
Copies the value of the current cost gradient to gradient_u_previous
,
which stores the previous gradient vector
Returns true
iff all termination conditions are satisfied
It checks whether:
- the FPR condition,
gamma*||fpr|| < epsilon
, - (if activated) the AKKT condition
||gamma*fpr + (df - df_prev)|| < eps_akkt
are satisfied.
Resets the cache to its initial virgin state.
In particular,
- Resets/empties the LBFGS buffer
- Sets tau = 1.0
- Sets the iteration count to 0
- Sets the internal variables
lhs_ls
,rhs_ls
,lipschitz_constant
,sigma
,cost_value
andgamma
to 0.0
Sets the CBFGS parameters alpha
and epsilon
Read more in: D.-H. Li and M. Fukushima, “On the global convergence of the BFGS method for nonconvex unconstrained optimization problems,” vol. 11, no. 4, pp. 1054–1064, jan 2001.
Arguments
- alpha
- epsilon
- sy_epsilon
Panics
The method panics if alpha or epsilon are nonpositive and if sy_epsilon is negative.