Do something like:
SDDP.LinearPolicyGraph(stages = 7) do sp, t
@variable(sp, total_flow, SDDP.State, start = 0)
@constraint(sp, total_flow.out == total_flow.in + ...)
if t == 7
@stageobjective(100 * total_flow + ...)
else
@stageobjective(...)
end
end
But you’ll need to try a few different values other than 100, because it’ll depend on the values in the optimal solution.