odow / SDDP.jl

A JuMP extension for Stochastic Dual Dynamic Programming
https://sddp.dev
Other
304 stars 62 forks source link

Add sample_backward_noise_terms_with_state #742

Closed arthur-brigatto closed 4 months ago

arthur-brigatto commented 4 months ago

Closes #735.

andrewrosemberg commented 4 months ago

A simple test would be great to see if it works!

odow commented 4 months ago

You can add a new test as a function just after this one: https://github.com/odow/SDDP.jl/blob/8ed2e302c7212388ba3c4ec67c4737eaa44aeed5/test/plugins/backward_sampling_schemes.jl#L66-L90

arthur-brigatto commented 4 months ago

You can add a new test as a function just after this one:

https://github.com/odow/SDDP.jl/blob/8ed2e302c7212388ba3c4ec67c4737eaa44aeed5/test/plugins/backward_sampling_schemes.jl#L66-L90

Working on it!

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.44%. Comparing base (8ed2e30) to head (dff9395).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #742 +/- ## ========================================== + Coverage 93.40% 93.44% +0.03% ========================================== Files 27 27 Lines 3414 3416 +2 ========================================== + Hits 3189 3192 +3 + Misses 225 224 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

arthur-brigatto commented 4 months ago

@odow I have added a test function. The idea is: Firstly a sequence of 0.1 or 0.9 values for $\epsilon$ is sampled in the forward step. Then, the backward sampler sets $\epsilon = 0.9$ if 0.1 was sampled in the forward step or it sets $\epsilon = 0.1$ if 0.9 was sampled in the forward step.

Let me know if that works!