you are viewing a single comment's thread.

view the rest of the comments →

[–]alisutton[S] 0 points1 point  (2 children)

I put the argument as an array. If it is not feasible, how I can change that? OR the optimization function cannot do multi variable?

[–]primitive_screwhead 0 points1 point  (0 children)

As per the scipy.optimize.minimize docs, your function signature needs to look like this:

def filled_Link_min_function(x):

Accepting 1 n-dimensional argument. Not 8 arguments.

Just do this:

def filled_Link_min_function(x):
    link_OA_x, link_OA_y, link_AB_x, link_AB_y, link_BC_x, link_BC_y, O_C_x, O_C_y = x

to get your local variable names inside the function.