0

My question is related to this question previously asked. I am trying to follow the answer.

def simulator(X,Y,Z):
    return X+Y+Z

def f(params):
   X,Y,Z = params 
   A = simulator(params)
   return A

bound = [(10,30), (10, 30), (10, 30)]
x0 = (10,10,10)
result = minimize(f,x0,bounds=bound)

I am getting error

simulator() missing 2 required positional arguments: 'Y' and 'Z'. 

In real, simulator fx is far more complex but I am facing same issue as in this simplified code.

Martan
  • 565
  • 5
  • 17

1 Answers1

0

As posted in comments,

A = simulator(X, Y, Z)
Martan
  • 565
  • 5
  • 17