Closed marykh162 closed 4 years ago
I guess you want something like
simulations = SDDP.simulate(model, 100, [:v])
plt = SDDP.SpaghettiPlot(simulations)
SDDP.add_spaghetti(plt) do data
return data[:v][1] - data[:noise_term].EC
end
SDDP.plot(plt)
# Or
using Plots
SDDP.publication_plot(simulations) do data
return data[:v][1] - data[:noise_term].EC
end,
I guess you want something like
simulations = SDDP.simulate(model, 100, [:v]) plt = SDDP.SpaghettiPlot(simulations) SDDP.add_spaghetti(plt) do data return data[:v][1] - data[:noise_term].EC end SDDP.plot(plt) # Or using Plots SDDP.publication_plot(simulations) do data return data[:v][1] - data[:noise_term].EC end,
Thanks for your reply. I tried this and I am getting the following error: ERROR: LoadError: type Nothing has no field EC
Presumably you only use parameterize
in some stages? Then you want something like this:
SDDP.add_spaghetti(plt) do data
if data[:noise_term] === nothing
return 0.0
end
return data[:v][1] - data[:noise_term].EC
end
Presumably you only use
parameterize
in some stages? Then you want something like this:SDDP.add_spaghetti(plt) do data if data[:noise_term] === nothing return 0.0 end return data[:v][1] - data[:noise_term].EC end
Yes, I do not use parameterize in the first stage. Thank you so much! It is working now.
Hi again,
I have another question related to random variables in the objective function. I am trying to add a constraint which contains the same random variables as the objective function. Could you please help me with that?
Thanks!
See this tutorial: https://odow.github.io/SDDP.jl/latest/tutorial/03_objective_uncertainty/
Essentially, just use ω
in both places:
SDDP.parameterize(sp, Ω) do ω
set_normalized_rhs(c, ω)
@stageobjective(sp, ω * x)
end
Is this resolved?
Yes, it is. Thanks a lot!
On Tue, Jun 9, 2020 at 4:39 PM Oscar Dowson notifications@github.com wrote:
Is this resolved?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/odow/SDDP.jl/issues/318*issuecomment-641596657__;Iw!!KwNVnqRv!XqrJdCnhkFomicEaa10OK2RLVnrTJzLlLONToF0jFwGtw8HZpD1ExZ-fzajLOoKRIDqE$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AOZKHKVEXDXTWYKI44CT4VDRV2T2ZANCNFSM4M3YHVSA__;!!KwNVnqRv!XqrJdCnhkFomicEaa10OK2RLVnrTJzLlLONToF0jFwGtw8HZpD1ExZ-fzajLOhFha_wf$ .
--
Maryam Khatami
Ph.D. Candidate
Department of Industrial and Systems Engineering
4050 ETB, 3131 TAMU
Texas A&M University
College Station, TX 77843
Hi, I have a question about randomness in the objective function. The following is my model's objective function:
I was able to use SDDP.jl to solve my model. Now, I need help with visualization. I am interested to generate the ribbon plots for the following deviations: ω.EC-v[1] ω.transfer-v[2] ω.direct-v[3] But, I do not know how to deal with the random variable. I would appreciate you help with this. Thanks!