Good evening,
-- I have another question: if I have 10 double-indexed random parameters and a for loop that for each iteration take the indices by their probability to appear, defined as the number of the parameter to the sum of all parameters ratio, how can I describe the discrete probability mass function that combine the probability of appearance and the values of the indices? In other words: param X_mean {SKU,type} > 0; param X_variance {SKU,type} > 0; param X {i in SKU,j in type} integer = round(max (Normal (X_mean[i,j], X_variance[i,j]), 0)); #these are the random parameters param Z = sum {i in SKU,j in type} X[i,j]; #their sum param p {i in SKU,j in type} >= 0; let {i in SKU,j in type} p[i,j]:= (X[i,j]-g[i,j])/(Z-k); #this is the probability of appearance. g[i,j] is only a counter that update the probability every step and k is the step Now for each iteration I would like to describe the discrete probability mass function that give me random [i,j] indices given their probability. Sorry for the bad writing, I've just taken the elements of the code involved in the question because the code is too messy. You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/ampl. For more options, visit https://groups.google.com/d/optout. |
Good evening,
-- sorry for the reply, but I've got an idea: what do you think about 10 random variables with Bernoulli distribution, an objective function that minimize the sum of each one and a constraint that assume the sum of them equal to 1? Would it be right from a mathematical point of view? Il giorno domenica 8 aprile 2018 15:54:55 UTC+2, Marco Paga ha scritto:
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/ampl. For more options, visit https://groups.google.com/d/optout. |
We have looked at your question, but have concluded that we do not know enough about your application to give advice as to how you should model it.
{#HS:556992798-4730#}
If you have a mathematical expression for the discrete probability mass function, we could provide some advice about how to write it in AMPL. Also if you have written a model in AMPL and need help with syntax errors or other problems, you could post a question about them to this group. -- Robert Fourer [hidden email]
On Mon, Apr 9, 2018 at 11:10 PM UTC, Zeyad Kassem' Via Ampl Modeling Language <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. Visit this group at https://groups.google.com/group/ampl. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |