Hi,
I am trying to create err1 matrix (6*1) where first 5 entries of the matrix are random sample which follows Normal distribution with mean 0 and 5.23 standard deviation. The last element of the matrix is 0.
What I tried -
param nsample := 5;
var z1 random = Normal(0,5.23);
param x1{1..nsample} = Sample(z1);
Now my question is how to create err1 matrix in ampl where 1st five elements from x1 and the last element is 0? err1 matrix will be used as parameter in another consraint.
Any help please. Thanks in advance.
Gazi
param x1{i in 1..nsample} = if i < nsample then Normal(0,5.23);
--
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 ampl+uns...@googlegroups.com.
To post to this group, send email to am...@googlegroups.com.
Visit this group at http://groups.google.com/group/ampl.
For more options, visit https://groups.google.com/d/optout.