Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Aug 31, 2023
1 parent f8f91f1 commit fa482e1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions docs/src/tutorial/example_reservoir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ model = SDDP.LinearPolicyGraph(
@variable(sp, 0 <= u_spill)
@variable(sp, ω_inflow)
## <--- This bit is new
Ω, P = [- 2, 0, 5], [0.3, 0.4, 0.3]
Ω, P = [-2, 0, 5], [0.3, 0.4, 0.3]
SDDP.parameterize(sp, Ω, P) do ω
fix(ω_inflow, data[t, :inflow] + ω)
return
Expand All @@ -286,11 +286,8 @@ SDDP.train(model; iteration_limit = 100)
# Now simulate the policy. This time we do 100 replications because the policy
# is now stochastic instead of deterministic:

simulations = SDDP.simulate(
model,
100,
[:x_storage, :u_flow, :u_thermal, :ω_inflow],
);
simulations =
SDDP.simulate(model, 100, [:x_storage, :u_flow, :u_thermal, :ω_inflow]);

# And let's plot the use of thermal generation in each replication:

Expand Down

0 comments on commit fa482e1

Please sign in to comment.