diff --git a/dev/index.html b/dev/index.html index 0187542..5ee21a7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · NLPModelsModifiers.jl

NLPModelsModifiers.jl documentation

This package provides optimization models based on NLPModels. The API can be found on their documentation page.

The models in this package specialize on modifying existing methods.

Install

Install NLPModelsModifiers.jl with the following command.

pkg> add NLPModelsModifiers

License

This content is released under the MPL2.0 License.

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers, so questions about any of our packages are welcome.

Contents

+Home · NLPModelsModifiers.jl

NLPModelsModifiers.jl documentation

This package provides optimization models based on NLPModels. The API can be found on their documentation page.

The models in this package specialize on modifying existing methods.

Install

Install NLPModelsModifiers.jl with the following command.

pkg> add NLPModelsModifiers

License

This content is released under the MPL2.0 License.

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers, so questions about any of our packages are welcome.

Contents

diff --git a/dev/reference/index.html b/dev/reference/index.html index f0683a0..2b0d4eb 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,5 +1,5 @@ -Reference · NLPModelsModifiers.jl

Reference

Contents

Index

NLPModelsModifiers.FeasibilityFormNLSType

Converts a nonlinear least-squares problem with residual $F(x)$ to a nonlinear optimization problem with constraints $F(x) = r$ and objective $\tfrac{1}{2}\|r\|^2$. In other words, converts

\[\begin{aligned} +Reference · NLPModelsModifiers.jl

Reference

Contents

Index

NLPModelsModifiers.FeasibilityFormNLSType

Converts a nonlinear least-squares problem with residual $F(x)$ to a nonlinear optimization problem with constraints $F(x) = r$ and objective $\tfrac{1}{2}\|r\|^2$. In other words, converts

\[\begin{aligned} \min_x \quad & \tfrac{1}{2}\|F(x)\|^2 \\ \mathrm{s.t.} \quad & c_L ≤ c(x) ≤ c_U \\ & ℓ ≤ x ≤ u @@ -8,7 +8,7 @@ \mathrm{s.t.} \quad & F(x) - r = 0 \\ & c_L ≤ c(x) ≤ c_U \\ & ℓ ≤ x ≤ u -\end{aligned}\]

If you rather have the first problem, the nls model already works as an NLPModel of that format.

source
NLPModelsModifiers.FeasibilityFormNLSMethod
FeasibilityFormNLS(nls)

Converts a nonlinear least-squares problem with residual F(x) to a nonlinear optimization problem with constraints F(x) = r and objective ¹/₂‖r‖².

source
NLPModelsModifiers.FeasibilityResidualType

A feasibility residual model is created from a NLPModel of the form

\[\begin{aligned} +\end{aligned}\]

If you rather have the first problem, the nls model already works as an NLPModel of that format.

source
NLPModelsModifiers.FeasibilityFormNLSMethod
FeasibilityFormNLS(nls)

Converts a nonlinear least-squares problem with residual F(x) to a nonlinear optimization problem with constraints F(x) = r and objective ¹/₂‖r‖².

source
NLPModelsModifiers.FeasibilityResidualType

A feasibility residual model is created from a NLPModel of the form

\[\begin{aligned} \min_x \quad & f(x) \\ \mathrm{s.t.} \quad & c_L ≤ c(x) ≤ c_U \\ & \ell ≤ x ≤ u, @@ -16,7 +16,7 @@ \min_{x,s} \quad & \tfrac{1}{2} \|c(x) - s\|^2 \\ \mathrm{s.t.} \quad & \ell ≤ x ≤ u \\ & c_L ≤ s ≤ c_U. -\end{aligned}\]

Notice that this problem is an AbstractNLSModel, thus the residual value, Jacobian and Hessian are explicitly defined through the NLS API. The slack variables are created using SlackModel. If $\ell_i = u_i$, no slack variable is created. In particular, if there are only equality constrained of the form $c(x) = 0$, the resulting NLS is simply $\min_x \tfrac{1}{2}\|c(x)\|^2$.

source
NLPModelsModifiers.SlackModelType

A model whose only inequality constraints are bounds.

Given a model, this type represents a second model in which slack variables are introduced so as to convert linear and nonlinear inequality constraints to equality constraints and bounds. More precisely, if the original model has the form

\[\begin{aligned} +\end{aligned}\]

Notice that this problem is an AbstractNLSModel, thus the residual value, Jacobian and Hessian are explicitly defined through the NLS API. The slack variables are created using SlackModel. If $\ell_i = u_i$, no slack variable is created. In particular, if there are only equality constrained of the form $c(x) = 0$, the resulting NLS is simply $\min_x \tfrac{1}{2}\|c(x)\|^2$.

source
NLPModelsModifiers.SlackModelType

A model whose only inequality constraints are bounds.

Given a model, this type represents a second model in which slack variables are introduced so as to convert linear and nonlinear inequality constraints to equality constraints and bounds. More precisely, if the original model has the form

\[\begin{aligned} \min_x \quad & f(x)\\ \mathrm{s.t.} \quad & c_L ≤ c(x) ≤ c_U,\\ & ℓ ≤ x ≤ u, @@ -29,6 +29,6 @@ \mathrm{s.t.} \quad & c(x) - s = 0,\\ & c_L ≤ s ≤ c_U,\\ & ℓ ≤ x ≤ u. -\end{aligned}\]

although no slack variables are introduced for equality constraints.

The slack variables are implicitly ordered as linear and then nonlinear, and as [s(low), s(upp), s(rng)], where low, upp and rng represent the indices of the constraints of the form $c_L ≤ c(x) < ∞$, $-∞ < c(x) ≤ c_U$ and $c_L ≤ c(x) ≤ c_U$, respectively.

source
NLPModelsModifiers.DiagonalPSBModelMethod
DiagonalPSBModel(nlp; d0 = fill!(S(undef, nlp.meta.nvar), 1.0))

Construct a DiagonalPSBModel from another type of nlp, in which the Hessian is approximated via a diagonal PSB quasi-Newton operator. d0 is the initial approximation of the diagonal of the Hessian, and by default a vector of ones. See the DiagonalPSB operator documentation.

source
NLPModelsModifiers.relative_columns_indices!Method
relative_columns_indices!(cols, nlp, nj, n, jlow, model_jlow)

The input jlow should be relative indices within nlp.model.meta.nln. Add to cols[nj .+ (1:length(jlow))] the indices of n + jind with jind indices of jlow relative to setdiff(nlp.model.meta.nln, nlp.model.meta.jfix).

This is the 0-allocation version of:

ind = setdiff(nlp.model.meta.nln, nlp.model.meta.jfix)
+\end{aligned}\]

although no slack variables are introduced for equality constraints.

The slack variables are implicitly ordered as linear and then nonlinear, and as [s(low), s(upp), s(rng)], where low, upp and rng represent the indices of the constraints of the form $c_L ≤ c(x) < ∞$, $-∞ < c(x) ≤ c_U$ and $c_L ≤ c(x) ≤ c_U$, respectively.

source
NLPModelsModifiers.DiagonalPSBModelMethod
DiagonalPSBModel(nlp; d0 = fill!(S(undef, nlp.meta.nvar), 1.0))

Construct a DiagonalPSBModel from another type of nlp, in which the Hessian is approximated via a diagonal PSB quasi-Newton operator. d0 is the initial approximation of the diagonal of the Hessian, and by default a vector of ones. See the DiagonalPSB operator documentation.

source
NLPModelsModifiers.relative_columns_indices!Method
relative_columns_indices!(cols, nlp, nj, n, jlow, model_jlow)

The input jlow should be relative indices within nlp.model.meta.nln. Add to cols[nj .+ (1:length(jlow))] the indices of n + jind with jind indices of jlow relative to setdiff(nlp.model.meta.nln, nlp.model.meta.jfix).

This is the 0-allocation version of:

ind = setdiff(nlp.model.meta.nln, nlp.model.meta.jfix)
 jlow_nln = get_slack_ind(nlp.model.meta.jlow, ind)
-cols[(nj + 1):(nj + lj)] .= (n .+ jlow_nln)
source
+cols[(nj + 1):(nj + lj)] .= (n .+ jlow_nln)
source
diff --git a/dev/search/index.html b/dev/search/index.html index 480a67d..d12c453 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · NLPModelsModifiers.jl

Loading search...

    +Search · NLPModelsModifiers.jl

    Loading search...