-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix cut sharing in a graph with zero-probability arcs #797
base: master
Are you sure you want to change the base?
Conversation
It'd be helpful if I could spell |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #797 +/- ##
==========================================
+ Coverage 93.54% 93.58% +0.03%
==========================================
Files 26 26
Lines 3519 3521 +2
==========================================
+ Hits 3292 3295 +3
+ Misses 227 226 -1 ☔ View full report in Codecov by Sentry. |
This issue appears to be resolved. But looking at the fix: is the result that the there's no longer cut sharing when there are some 0 probabilities? I would prefer that the code just inefficiently solved children with 0 probabilities than didn't share cuts. (A user would always have the option to not include an arc with 0 probability if there's a preference for reducing the number of solves.) |
Currently we share cuts iff they have the identical set of children. We could improve that to nodes with have a subset of children. So yes, this might result in a less efficient solve; probably somewhere in between setting |
But yeah, I'll take another go at fixing this. |
Okay, I'm taking a look at this. The issue is Lines 755 to 757 in f921657
which we added in #224 The fix of just adding this is surprisingly subtle, because risk measures now need to deal with values that have zero probability mass WorstCase is the obvious one, but it already checks this: SDDP.jl/src/plugins/risk_measures.jl Lines 49 to 57 in f921657
|
Belief states broke. I assume because something weird happens if you try to update the belief from somewhere that it was impossible to come from. There's a subtle distinction between ambiguity sets and nodes with similar children... |
@@ -478,16 +478,8 @@ function MarkovianGraph(transition_matrices::Vector{Matrix{Float64}}) | |||
for markov_state in 1:size(transition, 2) | |||
for last_markov_state in 1:size(transition, 1) | |||
probability = transition[last_markov_state, markov_state] | |||
if 0.0 < probability <= 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So @adow031: should we add zero-probability arcs for Markov transition matrices or keep the graph sparse?
Bump @adow031 interested in your thoughts |
Closes #796
@adow031 want to test this branch?
TODO