9696
9797Structure containing Jacobian and Hessian structures of nonlinear constraints:
9898- nnln: number of nonlinear constraints
99+ - nl_lcon: lower bounds of nonlinear constraints
100+ - nl_ucon: upper bounds of nonlinear constraints
99101- jac_rows: row indices of the Jacobian in Coordinate format (COO) format
100102- jac_cols: column indices of the Jacobian in COO format
101103- nnzj: number of non-zero entries in the Jacobian
@@ -105,6 +107,8 @@ Structure containing Jacobian and Hessian structures of nonlinear constraints:
105107"""
106108mutable struct NonLinearStructure
107109 nnln:: Int
110+ nl_lcon:: Vector{Float64}
111+ nl_ucon:: Vector{Float64}
108112 jac_rows:: Vector{Int}
109113 jac_cols:: Vector{Int}
110114 nnzj:: Int
@@ -589,8 +593,6 @@ Parse nonlinear constraints of an `nlp_data`.
589593
590594Returns:
591595- nlcon: NonLinearStructure containing Jacobian and Hessian structures
592- - nl_lcon: lower bounds of nonlinear constraints
593- - nl_ucon: upper bounds of nonlinear constraints
594596"""
595597function parser_NL (nlp_data; hessian:: Bool = true )
596598 nnln = length (nlp_data. constraint_bounds)
@@ -608,9 +610,9 @@ function parser_NL(nlp_data; hessian::Bool = true)
608610 hess_rows = hessian ? getindex .(hess, 1 ) : Int[]
609611 hess_cols = hessian ? getindex .(hess, 2 ) : Int[]
610612 nnzh = length (hess)
611- nlcon = NonLinearStructure (nnln, jac_rows, jac_cols, nnzj, hess_rows, hess_cols, nnzh)
613+ nlcon = NonLinearStructure (nnln, nl_lcon, nl_ucon, jac_rows, jac_cols, nnzj, hess_rows, hess_cols, nnzh)
612614
613- return nlcon, nl_lcon, nl_ucon
615+ return nlcon
614616end
615617
616618"""
@@ -886,7 +888,7 @@ function parser_nonlinear_expression(cmodel, nvar, F; hessian::Bool = true)
886888 Fhess_cols = hessian && Feval ≠ nothing ? getindex .(Fhess, 2 ) : Int[]
887889 nl_Fnnzh = length (Fhess)
888890
889- nlequ = NonLinearStructure (nnlnequ, Fjac_rows, Fjac_cols, nl_Fnnzj, Fhess_rows, Fhess_cols, nl_Fnnzh)
891+ nlequ = NonLinearStructure (nnlnequ, Float64[], Float64[], Fjac_rows, Fjac_cols, nl_Fnnzj, Fhess_rows, Fhess_cols, nl_Fnnzh)
890892
891893 return Feval, nlequ, nnlnequ
892894end
0 commit comments