Pergunta

I'm using the following code in AMPL

load amplgsl.dll;
function gsl_ran_binomial;

I get the error:

lp.mod, line 6 (offset 138):

Function gsl_ran_binomial is random.
context:  function  >>> gsl_ran_binomial; <<<** 

Platform: Windows

The approach above works fine with other functions e.g. gsl_ran_binomial_pdf

Foi útil?

Solução

gsl_ran_binomial should be declared with the random attribute, because it is a random number generator:

function gsl_ran_binomial random;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top