Skip to content

Commit

Permalink
Merge pull request #91 from SciML/optprobsensefield
Browse files Browse the repository at this point in the history
Add `sense` field to OptimizationProblem
  • Loading branch information
ChrisRackauckas authored Jul 22, 2021
2 parents a0b089e + 4b42a0b commit 87e4209
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/problems/basic_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,23 @@ end
"""
$(TYPEDEF)
"""
struct OptimizationProblem{iip,F,uType,P,B,LC,UC,K} <: AbstractOptimizationProblem{isinplace}
struct OptimizationProblem{iip,F,uType,P,B,LC,UC,S,K} <: AbstractOptimizationProblem{isinplace}
f::F
u0::uType
p::P
lb::B
ub::B
lcons::LC
ucons::UC
sense::S
kwargs::K
@add_kwonly function OptimizationProblem{iip}(f::OptimizationFunction{iip}, u0, p=NullParameters();
lb = nothing, ub = nothing,
lcons = nothing, ucons = nothing,
kwargs...) where iip
sense = nothing, kwargs...) where iip
new{iip, typeof(f), typeof(u0), typeof(p),
typeof(lb), typeof(lcons), typeof(ucons),
typeof(kwargs)}(f, u0, p, lb, ub, lcons, ucons, kwargs)
typeof(sense), typeof(kwargs)}(f, u0, p, lb, ub, lcons, ucons, sense, kwargs)
end
end

Expand Down

0 comments on commit 87e4209

Please sign in to comment.