odow / SDDP.jl

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

Fix caching state bug in cyclic forward passes #547

Closed odow closed 1 year ago

odow commented 1 year ago

I think there was a very subtle bug in the implementation of the cyclic state-drop-off logic. We should be storing the outgoing state of the second-to-last node (which will be the incoming state of the node that forms a cycle), not the outgoing state of the node that forms a cycle.

Then JADE should use historical inflows which are 52weeks + 1week long and things should work by default.

We could potentially improve things by removing the splice!, so that we build up a distribution of starting states, not the trajectory over time.

Closes #445

odow commented 1 year ago

I think I need to check the logic of https://github.com/odow/SDDP.jl/issues/445 a bit more before merging.

odow commented 1 year ago

Okay. I think I understand the various options.

This can be resolved in a non-breaking way by adding a include_last_node::Bool = true in the constructor of DefaultForwardPass, and a terminates_on_cycle::Bool = false to the constructor of Historical.