Inner PANTR Solver#

class alpaqa.PANTRSolver

C++ documentation: alpaqa::PANTRSolver

Params

alias of PANTRParams

__call__(self: alpaqa._alpaqa.float64.PANTRSolver, problem: alpaqa._alpaqa.float64.Problem, opts: alpaqa._alpaqa.float64.InnerSolveOptions = {}, x: numpy.ndarray[numpy.float64[m, 1]] | None = None, y: numpy.ndarray[numpy.float64[m, 1]] | None = None, Σ: numpy.ndarray[numpy.float64[m, 1]] | None = None, *, asynchronous: bool = True, suppress_interrupt: bool = False) tuple

Solve the given problem.

Parameters:
  • problem – Problem to solve

  • opts – Options (such as desired tolerance)

  • x – Optional initial guess for the decision variables

  • y – Lagrange multipliers (when used as ALM inner solver)

  • Σ – Penalty factors (when used as ALM inner solver)

  • asynchronous – Release the GIL and run the solver on a separate thread

  • suppress_interrupt – If the solver is interrupted by a KeyboardInterrupt, don’t propagate this exception back to the Python interpreter, but stop the solver early, and return a solution with the status set to alpaqa.SolverStatus.Interrupted.

Returns:

  • Solution \(x\)

  • Updated Lagrange multipliers (only if parameter y was not None)

  • Constraint violation (only if parameter y was not None)

  • Statistics

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: alpaqa._alpaqa.float64.PANTRSolver, other: alpaqa._alpaqa.float64.PANTRSolver) -> None

Create a copy

  1. __init__(self: alpaqa._alpaqa.float64.PANTRSolver, pantr_params: Union[alpaqa._alpaqa.float64.PANTRParams, dict] = {}, steihaug_params: Union[alpaqa._alpaqa.float64.SteihaugCGParams, dict] = {}, direction_params: Union[alpaqa._alpaqa.float64.NewtonTRDirectionParams, dict] = {}) -> None

Create a PANTR solver using a structured Newton CG subproblem solver.

  1. __init__(self: alpaqa._alpaqa.float64.PANTRSolver, pantr_params: Union[alpaqa._alpaqa.float64.PANTRParams, dict], direction: alpaqa._alpaqa.float64.PANTRDirection) -> None

Create a PANTR solver using a custom direction.

property direction
property name
property params
set_progress_callback(self: alpaqa._alpaqa.float64.PANTRSolver, callback: Callable[[alpaqa._alpaqa.float64.PANTRProgressInfo], None]) alpaqa._alpaqa.float64.PANTRSolver

Specify a callable that is invoked with some intermediate results on each iteration of the algorithm.

stop(self: alpaqa._alpaqa.float64.PANTRSolver) None
class alpaqa.PANTRParams

C++ documentation: alpaqa::PANTRParams

property L_max
property L_min
property Lipschitz
property TR_tolerance_factor
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: alpaqa._alpaqa.float64.PANTRParams, params: dict) -> None

  2. __init__(self: alpaqa._alpaqa.float64.PANTRParams, **kwargs) -> None

property compute_ratio_using_new_stepsize
property disable_acceleration
property initial_radius
property max_iter
property max_no_progress
property max_time
property min_radius
property print_interval
property print_precision
property quadratic_upperbound_tolerance_factor
property radius_factor_acceptable
property radius_factor_good
property radius_factor_rejected
property ratio_approx_fbe_quadratic_model
property ratio_threshold_acceptable
property ratio_threshold_good
property recompute_last_prox_step_after_direction_reset
property stop_crit
to_dict(self: alpaqa._alpaqa.float64.PANTRParams) dict
property update_direction_on_prox_step

Accelerators#

class alpaqa.NewtonTRDirection

C++ documentation: alpaqa::NewtonTRDirection

__init__(self: alpaqa._alpaqa.float64.NewtonTRDirection, accelerator_params: alpaqa._alpaqa.float64.SteihaugCGParams | dict = {}, direction_params: alpaqa._alpaqa.float64.NewtonTRDirectionParams | dict = {}) None
property params
class alpaqa.SteihaugCGParams

C++ documentation: alpaqa::SteihaugCGParams

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: alpaqa._alpaqa.float64.SteihaugCGParams, params: dict) -> None

  2. __init__(self: alpaqa._alpaqa.float64.SteihaugCGParams, **kwargs) -> None

property max_iter_factor
to_dict(self: alpaqa._alpaqa.float64.SteihaugCGParams) dict
property tol_max
property tol_scale
property tol_scale_root
class alpaqa.NewtonTRDirectionParams

C++ documentation: alpaqa::NewtonTRDirectionParams

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: alpaqa._alpaqa.float64.NewtonTRDirectionParams, params: dict) -> None

  2. __init__(self: alpaqa._alpaqa.float64.NewtonTRDirectionParams, **kwargs) -> None

property finite_diff
property finite_diff_stepsize
property hessian_vec_factor
to_dict(self: alpaqa._alpaqa.float64.NewtonTRDirectionParams) dict