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 problem
  • tolerance specified tolerance
  • lbfgs_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)

Sets the AKKT-specific tolerance and activates the corresponding termination criterion

Arguments
  • akkt_tolerance: Tolerance for the AKKT-specific termination condition
Panics

The method panics if akkt_tolerance is nonpositive

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 and gamma 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.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.