Optimizer Interfaces

Nonlinear Programming (NLP) Solvers

Pockit currently supports IPOPT and Scipy solvers. If available, IPOPT should always be chosen.

Use the ipopt.solve or scipy.solve functions to solve the problem.

[v2_0, ..., v2_{n_p - 1}, v2_sp], info = ipopt.solve(
    S, # system
    [v_0, ..., v_{n_p - 1}, v_sp], # initial guess for each phase, with the last being the initial guess for system parameters
    optimizer_options=optimizer_options # dict type, directly passed to the underlying optimizer
)
# Returns:
# [v2_0, ..., v2_{n_p - 1}, v2_sp]: Computed results for each phase as Variable objects
# info: The original return object from the optimizer, used to extract additional information

If the system has only one phase and no system parameters, it can be simplified to

v2, info = ipopt.solve(
    S, # system
    v, # initial guess for each phase, with the last being the initial guess for system parameters
    optimizer_options=optimizer_options # dict type, directly passed to the underlying optimizer
)
# Returns:
# [v2_0, ..., v2_{n_p - 1}, v2_sp]: Computed results for each phase as Variable objects
# info: The original return object from the optimizer, used to extract additional information

Sparse Linear Solvers

IPOPT uses an interior point method to solve nonlinear programming problems, utilizing sparse linear equation solvers to compute the descent direction. For the interior point method, the linear equations solved at each iteration step are almost always ill-conditioned. Sparse linear equation solvers are crucial for the convergence and speed of the computation.

The linear solver options can be passed to the IPOPT solver through the optimizer_options parameter. For parameter options, please refer to the IPOPT documentation.