Hi Dr. Bob,
Initially I had created random numbers for 5 outcomes where they all follow normal distribution with following parameters:
#dat file
set outcome := 1 2 3 4 5;
set err1_mean := 0.011099 0.017007 0.076378 -0.00608 -0.00609;
set err1_std := 0.829445 0.699492 0.687686 0.679408 1.090222;
#mod file
set outcome ordered;
param nsample := 25;
set err1_mean ordered;
set err1_std ordered;
param err1{i in outcome, j in 1..nsample} = Normal (member(ord(i),err1_mean), member(ord(i),err1_std));
Now, they all follow different distribution with following expressions:
Outcome1 :: Weibull Distribution: -2.6 + WEIB(2.88, 4.21)
Outcome2 :: Lognormal Distribution: -1.81 + LOGN(1.89, 0.707)
Outcome3 :: Erlang Distribution: -2 + ERLA(0.253, 8)
Outcome4 :: Gamma Distribution: -2.89 + GAMM(0.197, 15.2)
Outcome5 :: Triangular Distribution: TRIA(-2.91, 0.635, 2.83)
My question is- how to generate random numbers for Weibull, Lognormal, Erlang, Gamma, and Triangular distribution in AMPL?
Thanks