Skip to content

Commit e7e9905

Browse files
committed
Rename the new attributes
1 parent b365961 commit e7e9905

File tree

4 files changed

+133
-133
lines changed

4 files changed

+133
-133
lines changed

README.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -84,46 +84,46 @@ The complete list of methods that an interface may implement can be found in the
8484

8585
`NLPModelMeta` objects have the following attributes (with `S <: AbstractVector`):
8686

87-
Attribute | Type | Notes
88-
---------------------|---------------|------------------------------------
89-
`nvar` | `Int` | number of variables
90-
`x0 ` | `S` | initial guess
91-
`lvar` | `S` | vector of lower bounds
92-
`uvar` | `S` | vector of upper bounds
93-
`ifix` | `Vector{Int}` | indices of fixed variables
94-
`ilow` | `Vector{Int}` | indices of variables with lower bound only
95-
`iupp` | `Vector{Int}` | indices of variables with upper bound only
96-
`irng` | `Vector{Int}` | indices of variables with lower and upper bound (range)
97-
`ifree` | `Vector{Int}` | indices of free variables
98-
`iinf` | `Vector{Int}` | indices of visibly infeasible bounds
99-
`ncon` | `Int` | total number of general constraints
100-
`nlin ` | `Int` | number of linear constraints
101-
`nnln` | `Int` | number of nonlinear general constraints
102-
`y0 ` | `S` | initial Lagrange multipliers
103-
`lcon` | `S` | vector of constraint lower bounds
104-
`ucon` | `S` | vector of constraint upper bounds
105-
`lin ` | `Vector{Int}` | indices of linear constraints
106-
`nln` | `Vector{Int}` | indices of nonlinear constraints
107-
`jfix` | `Vector{Int}` | indices of equality constraints
108-
`jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl
109-
`jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu
110-
`jrng` | `Vector{Int}` | indices of constraints of the form cl ≤ c(x) ≤ cu
111-
`jfree` | `Vector{Int}` | indices of "free" constraints (there shouldn't be any)
112-
`jinf` | `Vector{Int}` | indices of the visibly infeasible constraints
113-
`nnzo` | `Int` | number of nonzeros in the gradient
114-
`nnzj` | `Int` | number of nonzeros in the sparse Jacobian
115-
`lin_nnzj` | `Int` | number of nonzeros in the sparse linear constraints Jacobian
116-
`nln_nnzj` | `Int` | number of nonzeros in the sparse nonlinear constraints Jacobian
117-
`nnzh` | `Int` | number of nonzeros in the lower triangular part of the sparse Hessian of the Lagrangian
118-
`minimize` | `Bool` | true if `optimize == minimize`
119-
`islp` | `Bool` | true if the problem is a linear program
120-
`name` | `String` | problem name
121-
`gradient_available` | `Bool` | true if the gradient of the objective is available
122-
`jacobian_available` | `Bool` | true if the sparse Jacobian of the constraints is available
123-
`hessian_available` | `Bool` | true if the sparse Hessian of the Lagrangian is available
124-
`Jv_available` | `Bool` | true if the Jacobian-vector product `J * v` is available
125-
`Jtv_available` | `Bool` | true if the transpose Jacobian-vector product `J' * v` is available
126-
`Hv_available` | `Bool` | true if the Hessian-vector product of the Lagrangian `H * v` is available
87+
Attribute | Type | Notes
88+
-------------------|---------------|------------------------------------
89+
`nvar` | `Int` | number of variables
90+
`x0 ` | `S` | initial guess
91+
`lvar` | `S` | vector of lower bounds
92+
`uvar` | `S` | vector of upper bounds
93+
`ifix` | `Vector{Int}` | indices of fixed variables
94+
`ilow` | `Vector{Int}` | indices of variables with lower bound only
95+
`iupp` | `Vector{Int}` | indices of variables with upper bound only
96+
`irng` | `Vector{Int}` | indices of variables with lower and upper bound (range)
97+
`ifree` | `Vector{Int}` | indices of free variables
98+
`iinf` | `Vector{Int}` | indices of visibly infeasible bounds
99+
`ncon` | `Int` | total number of general constraints
100+
`nlin ` | `Int` | number of linear constraints
101+
`nnln` | `Int` | number of nonlinear general constraints
102+
`y0 ` | `S` | initial Lagrange multipliers
103+
`lcon` | `S` | vector of constraint lower bounds
104+
`ucon` | `S` | vector of constraint upper bounds
105+
`lin ` | `Vector{Int}` | indices of linear constraints
106+
`nln` | `Vector{Int}` | indices of nonlinear constraints
107+
`jfix` | `Vector{Int}` | indices of equality constraints
108+
`jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl
109+
`jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu
110+
`jrng` | `Vector{Int}` | indices of constraints of the form cl ≤ c(x) ≤ cu
111+
`jfree` | `Vector{Int}` | indices of "free" constraints (there shouldn't be any)
112+
`jinf` | `Vector{Int}` | indices of the visibly infeasible constraints
113+
`nnzo` | `Int` | number of nonzeros in the gradient
114+
`nnzj` | `Int` | number of nonzeros in the sparse Jacobian
115+
`lin_nnzj` | `Int` | number of nonzeros in the sparse linear constraints Jacobian
116+
`nln_nnzj` | `Int` | number of nonzeros in the sparse nonlinear constraints Jacobian
117+
`nnzh` | `Int` | number of nonzeros in the lower triangular part of the sparse Hessian of the Lagrangian
118+
`minimize` | `Bool` | true if `optimize == minimize`
119+
`islp` | `Bool` | true if the problem is a linear program
120+
`name` | `String` | problem name
121+
`grad_available` | `Bool` | true if the gradient of the objective is available
122+
`jac_available` | `Bool` | true if the sparse Jacobian of the constraints is available
123+
`hess_available` | `Bool` | true if the sparse Hessian of the Lagrangian is available
124+
`jprod_available` | `Bool` | true if the Jacobian-vector product `J * v` is available
125+
`jtprod_available` | `Bool` | true if the transpose Jacobian-vector product `J' * v` is available
126+
`hprod_available` | `Bool` | true if the Hessian-vector product of the Lagrangian `H * v` is available
127127

128128
# Bug reports and discussions
129129

docs/src/index.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -79,46 +79,46 @@ See the [Models](@ref), the [Tools](@ref tools-section), or the [API](@ref).
7979

8080
`NLPModelMeta` objects have the following attributes (with `S <: AbstractVector`):
8181

82-
Attribute | Type | Notes
83-
---------------------|---------------|------------------------------------
84-
`nvar` | `Int` | number of variables
85-
`x0 ` | `S` | initial guess
86-
`lvar` | `S` | vector of lower bounds
87-
`uvar` | `S` | vector of upper bounds
88-
`ifix` | `Vector{Int}` | indices of fixed variables
89-
`ilow` | `Vector{Int}` | indices of variables with lower bound only
90-
`iupp` | `Vector{Int}` | indices of variables with upper bound only
91-
`irng` | `Vector{Int}` | indices of variables with lower and upper bound (range)
92-
`ifree` | `Vector{Int}` | indices of free variables
93-
`iinf` | `Vector{Int}` | indices of visibly infeasible bounds
94-
`ncon` | `Int` | total number of general constraints
95-
`nlin ` | `Int` | number of linear constraints
96-
`nnln` | `Int` | number of nonlinear general constraints
97-
`y0 ` | `S` | initial Lagrange multipliers
98-
`lcon` | `S` | vector of constraint lower bounds
99-
`ucon` | `S` | vector of constraint upper bounds
100-
`lin ` | `Vector{Int}` | indices of linear constraints
101-
`nln` | `Vector{Int}` | indices of nonlinear constraints
102-
`jfix` | `Vector{Int}` | indices of equality constraints
103-
`jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl
104-
`jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu
105-
`jrng` | `Vector{Int}` | indices of constraints of the form cl ≤ c(x) ≤ cu
106-
`jfree` | `Vector{Int}` | indices of "free" constraints (there shouldn't be any)
107-
`jinf` | `Vector{Int}` | indices of the visibly infeasible constraints
108-
`nnzo` | `Int` | number of nonzeros in the gradient
109-
`nnzj` | `Int` | number of nonzeros in the sparse Jacobian
110-
`lin_nnzj` | `Int` | number of nonzeros in the sparse linear constraints Jacobian
111-
`nln_nnzj` | `Int` | number of nonzeros in the sparse nonlinear constraints Jacobian
112-
`nnzh` | `Int` | number of nonzeros in the lower triangular part of the sparse Hessian of the Lagrangian
113-
`minimize` | `Bool` | true if `optimize == minimize`
114-
`islp` | `Bool` | true if the problem is a linear program
115-
`name` | `String` | problem name
116-
`gradient_available` | `Bool` | true if the gradient of the objective is available
117-
`jacobian_available` | `Bool` | true if the sparse Jacobian of the constraints is available
118-
`hessian_available` | `Bool` | true if the sparse Hessian of the Lagrangian is available
119-
`Jv_available` | `Bool` | true if the Jacobian-vector product `J * v` is available
120-
`Jtv_available` | `Bool` | true if the transpose Jacobian-vector product `J' * v` is available
121-
`Hv_available` | `Bool` | true if the Hessian-vector product of the Lagrangian `H * v` is available
82+
Attribute | Type | Notes
83+
-------------------|---------------|------------------------------------
84+
`nvar` | `Int` | number of variables
85+
`x0 ` | `S` | initial guess
86+
`lvar` | `S` | vector of lower bounds
87+
`uvar` | `S` | vector of upper bounds
88+
`ifix` | `Vector{Int}` | indices of fixed variables
89+
`ilow` | `Vector{Int}` | indices of variables with lower bound only
90+
`iupp` | `Vector{Int}` | indices of variables with upper bound only
91+
`irng` | `Vector{Int}` | indices of variables with lower and upper bound (range)
92+
`ifree` | `Vector{Int}` | indices of free variables
93+
`iinf` | `Vector{Int}` | indices of visibly infeasible bounds
94+
`ncon` | `Int` | total number of general constraints
95+
`nlin ` | `Int` | number of linear constraints
96+
`nnln` | `Int` | number of nonlinear general constraints
97+
`y0 ` | `S` | initial Lagrange multipliers
98+
`lcon` | `S` | vector of constraint lower bounds
99+
`ucon` | `S` | vector of constraint upper bounds
100+
`lin ` | `Vector{Int}` | indices of linear constraints
101+
`nln` | `Vector{Int}` | indices of nonlinear constraints
102+
`jfix` | `Vector{Int}` | indices of equality constraints
103+
`jlow` | `Vector{Int}` | indices of constraints of the form c(x) ≥ cl
104+
`jupp` | `Vector{Int}` | indices of constraints of the form c(x) ≤ cu
105+
`jrng` | `Vector{Int}` | indices of constraints of the form cl ≤ c(x) ≤ cu
106+
`jfree` | `Vector{Int}` | indices of "free" constraints (there shouldn't be any)
107+
`jinf` | `Vector{Int}` | indices of the visibly infeasible constraints
108+
`nnzo` | `Int` | number of nonzeros in the gradient
109+
`nnzj` | `Int` | number of nonzeros in the sparse Jacobian
110+
`lin_nnzj` | `Int` | number of nonzeros in the sparse linear constraints Jacobian
111+
`nln_nnzj` | `Int` | number of nonzeros in the sparse nonlinear constraints Jacobian
112+
`nnzh` | `Int` | number of nonzeros in the lower triangular part of the sparse Hessian of the Lagrangian
113+
`minimize` | `Bool` | true if `optimize == minimize`
114+
`islp` | `Bool` | true if the problem is a linear program
115+
`name` | `String` | problem name
116+
`grad_available` | `Bool` | true if the gradient of the objective is available
117+
`jac_available` | `Bool` | true if the sparse Jacobian of the constraints is available
118+
`hess_available` | `Bool` | true if the sparse Hessian of the Lagrangian is available
119+
`jprod_available` | `Bool` | true if the Jacobian-vector product `J * v` is available
120+
`jtprod_available` | `Bool` | true if the transpose Jacobian-vector product `J' * v` is available
121+
`hprod_available` | `Bool` | true if the Hessian-vector product of the Lagrangian `H * v` is available
122122

123123
## License
124124

src/nlp/meta.jl

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ The following keyword arguments are accepted:
5151
- `minimize`: true if optimize == minimize
5252
- `islp`: true if the problem is a linear program
5353
- `name`: problem name
54-
- `gradient_available`: indicates whether the gradient of the objective is available
55-
- `jacobian_available`: indicates whether the sparse Jacobian of the constraints is available
56-
- `hessian_available`: indicates whether the sparse Hessian of the Lagrangian is available
57-
- `Jv_available`: indicates whether the Jacobian-vector product `J * v` is available
58-
- `Jtv_available`: indicates whether the transpose Jacobian-vector product `J' * v` is available
59-
- `Hv_available`: indicates whether the Hessian-vector product of the Lagrangian `H * v` is available
54+
- `grad_available`: indicates whether the gradient of the objective is available
55+
- `jac_available`: indicates whether the sparse Jacobian of the constraints is available
56+
- `hess_available`: indicates whether the sparse Hessian of the Lagrangian is available
57+
- `jprod_available`: indicates whether the Jacobian-vector product `J * v` is available
58+
- `jtprod_available`: indicates whether the transpose Jacobian-vector product `J' * v` is available
59+
- `hprod_available`: indicates whether the Hessian-vector product of the Lagrangian `H * v` is available
6060
6161
`NLPModelMeta` also contains the following attributes, which are computed from the variables above:
6262
- `nvar`: number of variables
@@ -121,12 +121,12 @@ struct NLPModelMeta{T, S} <: AbstractNLPModelMeta{T, S}
121121
islp::Bool
122122
name::String
123123

124-
gradient_available::Bool
125-
jacobian_available::Bool
126-
hessian_available::Bool
127-
Jv_available::Bool
128-
Jtv_available::Bool
129-
Hv_available::Bool
124+
grad_available::Bool
125+
jac_available::Bool
126+
hess_available::Bool
127+
jprod_available::Bool
128+
jtprod_available::Bool
129+
hprod_available::Bool
130130
end
131131

132132
function NLPModelMeta{T, S}(
@@ -150,12 +150,12 @@ function NLPModelMeta{T, S}(
150150
minimize::Bool = true,
151151
islp::Bool = false,
152152
name = "Generic",
153-
gradient_available::Bool = true,
154-
jacobian_available::Bool = true,
155-
hessian_available::Bool = true,
156-
Jv_available::Bool = true,
157-
Jtv_available::Bool = true,
158-
Hv_available::Bool = true,
153+
grad_available::Bool = true,
154+
jac_available::Bool = true,
155+
hess_available::Bool = true,
156+
jprod_available::Bool = true,
157+
jtprod_available::Bool = true,
158+
hprod_available::Bool = true,
159159
) where {T, S}
160160
if (nvar < 1) || (ncon < 0)
161161
error("Nonsensical dimensions")
@@ -232,12 +232,12 @@ function NLPModelMeta{T, S}(
232232
minimize,
233233
islp,
234234
name,
235-
gradient_available,
236-
jacobian_available,
237-
hessian_available,
238-
Jv_available,
239-
Jtv_available,
240-
Hv_available,
235+
grad_available,
236+
jac_available,
237+
hess_available,
238+
jprod_available,
239+
jtprod_available,
240+
hprod_available,
241241
)
242242
end
243243

@@ -266,12 +266,12 @@ function NLPModelMeta(
266266
minimize::Bool = meta.minimize,
267267
islp::Bool = meta.islp,
268268
name = meta.name,
269-
gradient_available::Bool = meta.gradient_available,
270-
jacobian_available::Bool = meta.jacobian_available,
271-
hessian_available::Bool = meta.hessian_available,
272-
Jv_available::Bool = meta.Jv_available,
273-
Jtv_available::Bool = meta.Jtv_available,
274-
Hv_available::Bool = meta.Hv_available,
269+
grad_available::Bool = meta.grad_available,
270+
jac_available::Bool = meta.jac_available,
271+
hess_available::Bool = meta.hess_available,
272+
jprod_available::Bool = meta.jprod_available,
273+
jtprod_available::Bool = meta.jtprod_available,
274+
hprod_available::Bool = meta.hprod_available,
275275
) where {T, S}
276276
NLPModelMeta{T, S}(
277277
nvar,
@@ -294,12 +294,12 @@ function NLPModelMeta(
294294
minimize = minimize,
295295
islp = islp,
296296
name = name,
297-
gradient_available = gradient_available,
298-
jacobian_available = jacobian_available,
299-
hessian_available = hessian_available,
300-
Jv_available = Jv_available,
301-
Jtv_available = Jtv_available,
302-
Hv_available = Hv_available,
297+
grad_available = grad_available,
298+
jac_available = jac_available,
299+
hess_available = hess_available,
300+
jprod_available = jprod_available,
301+
jtprod_available = jtprod_available,
302+
hprod_available = hprod_available,
303303
)
304304
end
305305

0 commit comments

Comments
 (0)