You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a very beginner in Python and want to know if it's possible to do an optimization for n-dimensions Rosenbrock's function with this package
It's sad that the part of "class TravellingSalesmanProblem" in example is too difficult for me to understand and therefore couldn't edit it as a suitable form for continuous problem
Here is an example I wrote to define 3D-Rosenbrock's function and the initial solution, initial objective value for SA:
I'm a very beginner in Python and want to know if it's possible to do an optimization for n-dimensions Rosenbrock's function with this package
It's sad that the part of "class TravellingSalesmanProblem" in example is too difficult for me to understand and therefore couldn't edit it as a suitable form for continuous problem
Here is an example I wrote to define 3D-Rosenbrock's function and the initial solution, initial objective value for SA:
`def rosen(x):
"""The Rosenbrock function"""
return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0)
Initial solution you'd like to start at
X0 = np.array([2, 1, 1.5])
Initial objective value of Rosenbrock's test function
of_int = rosen(X0)`
Hope someone could help me with an easy example!
Thanks in advance!
The text was updated successfully, but these errors were encountered: