I am trying to solve an optimization problem in Python, using gekko, where one of the variables takes on a random value at each time step, but I haven't been able to use the gekko function that returns random numbers.
Following the documentation page (http://t-t.dk/gekko/docs/user-manual/functions.htm), the function rnorm returns "a random number from a normal distribution with mean and variance provided". I used it as shown here:
x = m.Var(value=0)
m.Equation(x == 5.*m.rnorm(0, 1))
provided that
m = GEKKO()
but I get the following error message:
AttributeError: 'GEKKO' object has no attribute 'rnorm'
I would like to know if there is something that I am missing or if there is another way to get random numbers.