Hi everyone,
in adexl I have a global variable "IFL", is has only four values 1,2,3,4. In Monte Carlo simulation, I would like to randomly select value of "IFL" from them, so in scs file I write:
parameters
IFL_value=0 \
ifl=0
if (IFL_value < 1/4) {
ifl=1
} else if (IFL_value< 2/4) {
ifl=2
} else if (IFL_value < 3/4) {
ifl=3
} else { ifl=4 }statistics {
process{ vary IFL_value dist=unif N=1
}
}
And in global variable, "IFL" is "ifl". And I get following error, it looks like I did something wrong in if statement.
Cannot run the simulation because syntax error `Unexpected equals "="' was encountered at line 21, column 6. Correct the syntax error and rerun the simulation.
So should I change the code to something like:
ifl = {
if (IFL_value < 1/4) : 1
else if (IFL_value < 2/4) :2
............
}
Or is there any other solution? Any feedback would be appreciated