Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: Fix various Threading() bugs #761

Merged
merged 11 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/src/examples/belief.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ function inventory_management_problem()
iteration_limit = 100,
cut_type = SDDP.SINGLE_CUT,
log_frequency = 10,
parallel_scheme = SDDP.Serial(),
)
results = SDDP.simulate(model, 500)
results = SDDP.simulate(model, 500; parallel_scheme = SDDP.Serial())
objectives =
[sum(s[:stage_objective] for s in simulation) for simulation in results]
sample_mean = round(Statistics.mean(objectives); digits = 2)
Expand Down
1 change: 1 addition & 0 deletions docs/src/examples/infinite_horizon_hydro_thermal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function infinite_hydro_thermal(; cut_type)
cut_type = cut_type,
log_frequency = 100,
sampling_scheme = SDDP.InSampleMonteCarlo(; terminate_on_cycle = true),
parallel_scheme = SDDP.Serial(),
cycle_discretization_delta = 0.1,
)
@test SDDP.calculate_bound(model) ≈ 119.167 atol = 0.1
Expand Down
4 changes: 2 additions & 2 deletions docs/src/examples/the_farmers_problem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ end
# ## Training a policy

# Now that we've built a model, we need to train it using [`SDDP.train`](@ref).
# The keyword `iteration_limit` stops the training after 20 iterations. See
# The keyword `iteration_limit` stops the training after 40 iterations. See
# [Choose a stopping rule](@ref) for other ways to stop the training.

SDDP.train(model; iteration_limit = 20)
SDDP.train(model; iteration_limit = 40)

# ## Checking the policy

Expand Down
Loading
Loading