Skip to content

Commit 94178a0

Browse files
committed
Add lb and ub for BVProblem
1 parent 3972f76 commit 94178a0

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/problems/bvp_problems.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,21 @@ every solve call.
113113
doesn't store array size as part of type information. If we can't reliably infer this,
114114
we set it to `Nothing`. Downstreams solvers must be setup to deal with this case.
115115
"""
116-
struct BVProblem{uType, tType, isinplace, nlls, P, F, LC, UC, PT, K} <:
116+
struct BVProblem{uType, tType, isinplace, nlls, P, F, LB, UB, LC, UC, PT, K} <:
117117
AbstractBVProblem{uType, tType, isinplace, nlls}
118118
f::F
119119
u0::uType
120120
tspan::tType
121121
p::P
122+
lb::LB
123+
ub::UB
122124
lcons::LC
123125
ucons::UC
124126
problem_type::PT
125127
kwargs::K
126128

127129
@add_kwonly function BVProblem{iip}(f::AbstractBVPFunction{iip, TP}, u0, tspan,
128-
p = NullParameters(); lcons = nothing, ucons = nothing, problem_type = nothing, nlls = nothing,
130+
p = NullParameters(); lb = nothing, ub = nothing, lcons = nothing, ucons = nothing, problem_type = nothing, nlls = nothing,
129131
kwargs...) where {iip, TP}
130132
_u0 = prepare_initial_state(u0)
131133
_tspan = promote_tspan(tspan)
@@ -175,9 +177,9 @@ struct BVProblem{uType, tType, isinplace, nlls, P, F, LC, UC, PT, K} <:
175177
end
176178

177179
return new{typeof(_u0), typeof(_tspan), iip, _nlls, typeof(p),
178-
typeof(f), typeof(lcons), typeof(ucons),
180+
typeof(f), typeof(lb), typeof(ub), typeof(lcons), typeof(ucons),
179181
typeof(problem_type), typeof(kwargs)}(
180-
f, _u0, _tspan, p, lcons, ucons, problem_type, kwargs)
182+
f, _u0, _tspan, p, lb, ub, lcons, ucons, problem_type, kwargs)
181183
end
182184

183185
function BVProblem{iip}(f, bc, u0, tspan, p = NullParameters(); kwargs...) where {iip}

0 commit comments

Comments
 (0)