Dear GAMS friend,

I want to generate probability of scenarios using uniform distribution. I want to ensure that sum of all probabilities is equal to one i.e., sum(s,p(s))=1. How can we make this in the following code such that sum of all probabilities is one.

Sets

s set of scenarios /s1*s10/;

execseed = gmillisec(jnow);

parameter p(s);

p(s)=uniform(0,1);

Display p;

–

probability_uniform.gms (133 Bytes)

Just divide every probability by the sum of them…

Renger

Sent from my iPhone

Am 25.08.2014 um 09:58 schrieb “Syed Ali” :

Dear GAMS friend,

I want to generate probability of scenarios using uniform distribution. I want to ensure that sum of all probabilities is equal to one i.e., sum(s,p(s))=1. How can we make this in the following code such that sum of all probabilities is one.

Sets

```
s set of scenarios /s1*s10/;
```

execseed = gmillisec(jnow);

parameter p(s);

p(s)=uniform(0,1);

Display p;

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.

–

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.

To post to this group, send email to gamsworld@googlegroups.com.

Visit this group at http://groups.google.com/group/gamsworld.

For more options, visit https://groups.google.com/d/optout.