Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to perform a continuous problem with this package? #27

Closed
shane328 opened this issue Jun 26, 2019 · 0 comments
Closed

Is it possible to perform a continuous problem with this package? #27

shane328 opened this issue Jun 26, 2019 · 0 comments

Comments

@shane328
Copy link

shane328 commented Jun 26, 2019

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!

@shane328 shane328 closed this as completed Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant