SDDP.jl icon indicating copy to clipboard operation
SDDP.jl copied to clipboard

Question: Is Backwards Sampling compatible with `MULTI_CUT`?

Open bfpc opened this issue 3 months ago • 3 comments

I am not sure that Backwards Sampling can be used with MULTI_CUT - could it result in invalid cuts?

In algorithm.jl (l. 794) there is

  for noise in sample_backward_noise_terms_with_state(
      backward_sampling_scheme,
      child_node,
      outgoing_state,
  )

When adding multi-cuts, the code calls refine_bellman_function (from algorithm.jl, l. 688) which calls _add_multi_cut (in bellman_functions.jl, l. 470) which uses the ordering of the solve_all_children results to match the epigraphical variables to the cuts (bellman_functions.jl, l. 538):

  for i in 1:length(dual_variables)
      _add_cut(
          bellman_function.local_thetas[i],
          objective_realizations[i],
          dual_variables[i],
          outgoing_state,
          node.objective_state === nothing ? nothing :
          node.objective_state.state,
          node.belief_state === nothing ? nothing : node.belief_state.belief,
      )
  end

bfpc avatar Sep 29 '25 17:09 bfpc

I'm going to guess not. I don't know that I've ever tested it

odow avatar Sep 29 '25 20:09 odow

The assumption that all children are present and ordered has long bugged me. It shows up in a few places. Would be good to fix it properly.

odow avatar Sep 29 '25 20:09 odow

Maybe one would have to "tag" each value in the items with the (node,noise index) pair, along with the MULTI_CUTs being in a dictionnary Tuple{T,Int} => VariableRef (or ConvexApproximation). The items currently do have the node and noise support, but if supports are not unique this would not work - and it seems easier to index by the noise index rather than the (usually more complex) noise realization.

bfpc avatar Sep 30 '25 15:09 bfpc