-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2-dim tuple for noise #176
Comments
The answer is just to create a vector of the Cartesian product of the discrete random variables. # Support and probabilities of first random variable:
support_A = [1, 2, 3]
probability_A = [0.5, 0.2, 0.3]
# Support and probabilities of second random variable:
support_B = [5, 6]
probability_B = [0.5, 0.5]
# Vector of joint-supports:
supports = [(a, b) for a in support_A for b in support_B]
# Assuming that the random variables are independent
probabilities = [a * b for a in probability_A for b in probability_B]
# Form a discrete distribution
noise_distribution = DiscreteDistribution(supports, probability)
# Now the argument `noise` in the `dynamics` function will be a tuple `(a, b)`. |
Thanks Oscar! function modeldynamics(price,noise) Thanks for everything! I really appreaciate your help. |
The riverchain example demonstrates N-dimensional prices. In particular SDDP.jl/examples/PriceInterpolation/riverchain.jl Lines 68 to 73 in d90faae
This isn't defined in Julia. It will error. You have to do it yourself.
See first comment.
It will be passed in as a tuple, so access it like a tuple. SDDP.jl/examples/PriceInterpolation/riverchain.jl Lines 117 to 121 in d90faae
Unfortunately, this is never allowed. One key assumption that we make in our paper is that price is independent of the states and actions in the model. If you mean put a constraint in price (e.g., |
Thanks oscar. Very clear explanations. And one last question related to this issue of price interpolation scheme |
In almost all cases, you can't use the price in a constraint (that is, a JuMP If you need to use the price in the prior stage in the price dynamics (for example, an auto-regressive process with lag two), you can augment the price-state dimension so it is a tuple of |
ok! thanks again. |
Dear Oscar,
I'm trying to implement a process for 2 variables in the price interpolation scheme.
Specifically I want to have a noise with a simultaneous but different movement for each variable.
The DiscreteDistribution only allows a vector (N,1) of posibble values for the N possible realizations. But I need to specify a matrix of (N,2) size to include all posibble values. Is it somehow possible to create a noise for DynamicPriceInterpolation in this case?
Thanks!
The text was updated successfully, but these errors were encountered: