Reference

NLPModelsExtensions.ParametricNLPModels — Module
ParametricNLPModels

Parametric sensitivity interface for NLPModels: derivatives with respect to a parameter vector θ of length npar.

  • $∂f/∂θ$: the objective gradient with respect to the parameters, npar, see grad_par
  • $∂c/∂θ$: the constraints Jacobian with respect to the parameters, ncon × npar, see jac_par
  • $∂²L/∂x∂θ$: the Lagrangian Hessian with respect to the variables and the parameters, nvar × npar, see hess_par
  • $∂x^ℓ/∂θ$, $∂x^u/∂θ$, $∂c^ℓ/∂θ$, $∂c^u/∂θ$: the bounds with respect to the parameters, nvar × npar and ncon × npar, see lvar_jac_par

Sparse coordinate format follows NLPModels: (rows, cols, vals) with rows in the constraint or variable index and columns in the parameter index, repeated entries summed. Dimensions and availability come from ParametricNLPModelMeta through get_par_meta.

source
NLPModelsExtensions.ParametricNLPModels.ParametricNLPModelMeta — Type
ParametricNLPModelMeta(; kwargs...)

Metadata for the derivatives with respect to the parameters.

  • npar: number of parameters
  • nnzo_par: number of nonzeros in $∂f/∂θ$
  • nnzj_par: number of nonzeros in $∂c/∂θ$
  • nnzh_par: number of nonzeros in $∂²L/∂x∂θ$
  • nnzj_lvar_par, nnzj_uvar_par, nnzj_lcon_par, nnzj_ucon_par: number of nonzeros in $∂x^ℓ/∂θ$, $∂x^u/∂θ$, $∂c^ℓ/∂θ$, $∂c^u/∂θ$
  • grad_par_available, jac_par_available, hess_par_available, jprod_par_available, jtprod_par_available, hprod_par_available, htprod_par_available: whether the function is implemented
source
NLPModelsExtensions.ParametricNLPModels.hess_par — Method
Hxθ = hess_par(nlp, x, y; obj_weight=1.0)

Evaluate the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) as a sparse matrix, with objective function scaled by obj_weight, i.e.,

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hess_par — Method
Hxθ = hess_par(nlp, x; obj_weight=1.0)

Evaluate the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x as a sparse matrix, with objective function scaled by obj_weight, i.e.,

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_coord! — Function
vals = hess_par_coord!(nlp, x, y, vals; obj_weight=1.0)

Evaluate the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) in sparse coordinate format, with objective function scaled by obj_weight, i.e.,

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight, overwriting vals.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_coord! — Method
vals = hess_par_coord!(nlp, x, vals; obj_weight=1.0)

Evaluate the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x in sparse coordinate format, with objective function scaled by obj_weight, i.e.,

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight, overwriting vals.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_coord — Method
vals = hess_par_coord(nlp, x, y; obj_weight=1.0)

Evaluate the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) in sparse coordinate format, with objective function scaled by obj_weight, i.e.,

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_coord — Method
vals = hess_par_coord(nlp, x; obj_weight=1.0)

Evaluate the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x in sparse coordinate format, with objective function scaled by obj_weight, i.e.,

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_dense! — Method
Hxθ = hess_par_dense!(nlp, x, y, Hxθ; obj_weight=1.0)

Evaluate the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) in dense format, overwriting Hxθ, with objective function scaled by obj_weight, i.e.,

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hess_par_dense! — Method
Hxθ = hess_par_dense!(nlp, x, Hxθ; obj_weight=1.0)

Evaluate the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x in dense format, overwriting Hxθ, with objective function scaled by obj_weight, i.e.,

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hprod_par! — Method
Hv = hprod_par!(nlp, rows, cols, vals, v, Hv)

Evaluate the product of the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ$ given by (rows, cols, vals) in triplet format with the vector v in place.

source
NLPModelsExtensions.ParametricNLPModels.hprod_par! — Method
Hv = hprod_par!(nlp, x, y, v, Hv; obj_weight=1.0)

Evaluate the product of the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) with the vector v in place, with objective function scaled by obj_weight, where the Lagrangian Hessian $∂²L/∂x∂θ(x,y)$ is

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight. This function allocates.

source
NLPModelsExtensions.ParametricNLPModels.hprod_par! — Method
Hv = hprod_par!(nlp, x, v, Hv; obj_weight=1.0)

Evaluate the product of the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x with the vector v in place, with objective function scaled by obj_weight, where the objective Hessian $∂²f/∂x∂θ(x)$ is

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight. This function allocates.

source
NLPModelsExtensions.ParametricNLPModels.hprod_par — Method
Hv = hprod_par(nlp, x, y, v; obj_weight=1.0)

Evaluate the product of the Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)$ at (x,y) with the vector v, with objective function scaled by obj_weight, where the Lagrangian Hessian $∂²L/∂x∂θ(x,y)$ is

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.hprod_par — Method
Hv = hprod_par(nlp, x, v; obj_weight=1.0)

Evaluate the product of the objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)$ at x with the vector v, with objective function scaled by obj_weight, where the objective Hessian $∂²f/∂x∂θ(x)$ is

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.htprod_par! — Method
Htv = htprod_par!(nlp, rows, cols, vals, v, Htv)

Evaluate the product of the transposed Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ^T$ given by (rows, cols, vals) in triplet format with the vector v in place.

source
NLPModelsExtensions.ParametricNLPModels.htprod_par! — Method
Htv = htprod_par!(nlp, x, y, v, Htv; obj_weight=1.0)

Evaluate the product of the transposed Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)^T$ at (x,y) with the vector v in place, with objective function scaled by obj_weight, where the Lagrangian Hessian $∂²L/∂x∂θ(x,y)$ is

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight. This function allocates.

source
NLPModelsExtensions.ParametricNLPModels.htprod_par! — Method
Htv = htprod_par!(nlp, x, v, Htv; obj_weight=1.0)

Evaluate the product of the transposed objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)^T$ at x with the vector v in place, with objective function scaled by obj_weight, where the objective Hessian $∂²f/∂x∂θ(x)$ is

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight. This function allocates.

source
NLPModelsExtensions.ParametricNLPModels.htprod_par — Method
Htv = htprod_par(nlp, x, y, v; obj_weight=1.0)

Evaluate the product of the transposed Lagrangian Hessian with respect to the variables and the parameters $∂²L/∂x∂θ(x,y)^T$ at (x,y) with the vector v, with objective function scaled by obj_weight, where the Lagrangian Hessian $∂²L/∂x∂θ(x,y)$ is

\[∂²L/∂x∂θ(x,y) = σ ∂²f/∂x∂θ(x) + \sum_i yᵢ ∂²cᵢ/∂x∂θ(x),\]

with σ = obj_weight.

source
NLPModelsExtensions.ParametricNLPModels.htprod_par — Method
Htv = htprod_par(nlp, x, v; obj_weight=1.0)

Evaluate the product of the transposed objective Hessian with respect to the variables and the parameters $∂²f/∂x∂θ(x)^T$ at x with the vector v, with objective function scaled by obj_weight, where the objective Hessian $∂²f/∂x∂θ(x)$ is

\[σ ∂²f/∂x∂θ(x),\]

with σ = obj_weight.

source