Sensitivity analysis in simulation phase of SDDP.jl

Hello,

I trained a hydropower model using SDDP.jl with a given set of parameters. To check the robustness of the trained policy, I would now like to run simulations where one of the parameters is changed — for example, increasing the load parameter that must be satisfied in each node by 10%.

My goal is to perform a simple sensitivity analysis and observe how the trained policy reacts to this change in demand.

I tried to just modify the demand parameter in my code and rerun the simulation, but it seems that this approach does not work directly.

What is the correct way to change parameters (like demand) only in the simulation phase after training the model?

Thank you!

There are a few options.

You should write the cuts from the first model, create a new model, and then read in the cuts:

SDDP.write_cuts_to_file(model, "model.cuts.json")
changed_model = ...
SDDP.read_cuts_from_file(changed_model, "model.cuts.json")

You could loop through the trained subproblems and modify them:

for (index, node) in model.nodes
    # do something with node.subproblem
end

You could add the demand parameter as a random variable that is constant during training, but allows you to simulate a different value.

Do you have a small example of what you tried?