Question: Is Backwards Sampling compatible with `MULTI_CUT`?
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
I'm going to guess not. I don't know that I've ever tested it
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.
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.