Closed Misoto3 closed 2 years ago
Use a custom policy graph: https://odow.github.io/SDDP.jl/latest/tutorial/basic/04_markov_uncertainty/ https://odow.github.io/SDDP.jl/latest/guides/create_a_general_policy_graph/
data = [
3 4 6 5 7 8 9 12 1 0
1 3 5 6 2 3 7 11 3 4
2 7 9 12 3 4 5 6 2 3
5 2 3 1 9 6 4 10 4 2
]
I = zeros(4, 4)
for i in 1:4
I[i, i] = 1.0
end
SDDP.MarkovianPolicyGraph(
[
fill(0.25, 1, 4), # Stage 0 -> 1
fill(0.25, 4, 4), # Stage 1 -> 2
fill(0.25, 4, 4), # Stage 2 -> 3
fill(0.25, 4, 4), # Stage 3 -> 4
I, # Stage 4 -> 5
I, # Stage 5 -> 6
fill(0.25, 4, 4), # Stage 6 -> 7
fill(0.25, 4, 4), # Stage 7 -> 8
fill(0.25, 4, 4), # Stage 8 -> 9
fill(0.25, 4, 4), # Stage 9 -> 10
]
) do sp, node
t, row = node
sample = data[t, row]
end
Closing due to lack of follow-up. If you have further questions, please re-open the issue.
Hi Oscar,
Im trying to run a model in which I have 10 samples for every stage of a stochastic variable and I want that for certain stages in the model, the uncertainty takes for example sample 4, and mantains the realizations of the stochastic variable only for the components of that sample (4) in t+1, t+2, etc. In short, I want to make so that in certain stages the variable is stochastic and in other set of stages the variable is deterministic in a sense.
For an concrete example, if I hace that for every stage the samples are: Sample stage1 stage2 stage3 stage4 stage5 stage6 stage7 stage8 stage9 stage10 1 3 4 6 5 7 8 9 12 1 0 2 1 3 5 6 2 3 7 11 3 4 3 2 7 9 12 3 4 5 6 2 3 4 5 2 3 1 9 6 4 10 4 2
And I want that stages 4, 5 and 6 behave in this way, I want the model to do the following:
If something is not clear, please feel free to ask, best regards, Matías Soto