@@ -63,7 +63,10 @@ It contains the following fields:
6363- `elapsed_time`: The elapsed time computed by the solver (default: `Inf`);
6464- `solver_specific::Dict{Symbol,Any}`: A solver specific dictionary.
6565
66- The constructor tries to preallocate storage for the fields above.
66+ The constructor preallocates storage for the fields above.
67+ Special storage may be used for `multipliers_L` and `multipliers_U` by passing them to the constructor.
68+ For instance, if a problem has few bound constraints, those multipliers could be held in sparse vectors.
69+
6770The following fields indicate whether the information above has been updated and is reliable:
6871
6972- `solution_reliable`
@@ -84,7 +87,7 @@ All other variables can be input as keyword arguments.
8487
8588Notice that `GenericExecutionStats` does not compute anything, it simply stores.
8689"""
87- mutable struct GenericExecutionStats{T, S, V} <: AbstractExecutionStats
90+ mutable struct GenericExecutionStats{T, S, V, Tsp } <: AbstractExecutionStats
8891 status:: Symbol
8992 solution_reliable:: Bool
9093 solution:: S # x
@@ -102,7 +105,7 @@ mutable struct GenericExecutionStats{T, S, V} <: AbstractExecutionStats
102105 time_reliable:: Bool
103106 elapsed_time:: Float64
104107 solver_specific_reliable:: Bool
105- solver_specific:: Dict{Symbol, Any }
108+ solver_specific:: Dict{Symbol, Tsp }
106109end
107110
108111function GenericExecutionStats (
@@ -111,10 +114,10 @@ function GenericExecutionStats(
111114 solution:: S = similar (nlp. meta. x0),
112115 objective:: T = T (Inf ),
113116 dual_feas:: T = T (Inf ),
114- primal_feas:: T = unconstrained (nlp) || bound_constrained (nlp) ? zero (T) : T (Inf ),
117+ primal_feas:: T = unconstrained (nlp) ? zero (T) : T (Inf ),
115118 multipliers:: S = similar (nlp. meta. y0),
116- multipliers_L:: V = similar (nlp. meta. y0, bound_constrained (nlp) ? nlp. meta. nvar : 0 ),
117- multipliers_U:: V = similar (nlp. meta. y0, bound_constrained (nlp) ? nlp. meta. nvar : 0 ),
119+ multipliers_L:: V = similar (nlp. meta. y0, has_bounds (nlp) ? nlp. meta. nvar : 0 ),
120+ multipliers_U:: V = similar (nlp. meta. y0, has_bounds (nlp) ? nlp. meta. nvar : 0 ),
118121 iter:: Int = - 1 ,
119122 elapsed_time:: Real = Inf ,
120123 solver_specific:: Dict{Symbol, Tsp} = Dict {Symbol, Any} (),
@@ -126,7 +129,7 @@ function GenericExecutionStats(
126129 )
127130 throw (KeyError (status))
128131 end
129- return GenericExecutionStats {T, S, V} (
132+ return GenericExecutionStats {T, S, V, Tsp } (
130133 status,
131134 false ,
132135 solution,
0 commit comments