Skip to content

Commit f932237

Browse files
committed
remove lower/upper bound from forecast variables before mounting
1 parent 5a66865 commit f932237

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/jump.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ function JuMP.add_variable(
6464
name * "_assess",
6565
),
6666
)
67+
68+
# forecast variables can't have bounds
69+
if JuMP.has_lower_bound(forecast.plan)
70+
@warn "Forecast variable lower bound will be removed."
71+
JuMP.delete_lower_bound(forecast.plan)
72+
JuMP.delete_lower_bound(forecast.assess)
73+
end
74+
75+
if JuMP.has_upper_bound(forecast.plan)
76+
@warn "Forecast variable upper bound will be removed."
77+
JuMP.delete_upper_bound(forecast.plan)
78+
JuMP.delete_upper_bound(forecast.assess)
79+
end
80+
6781
push!(model.forecast_vars, forecast)
6882
return forecast
6983
end

0 commit comments

Comments
 (0)