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

老哥不回到起点的该怎么改呀 #1

Open
Gaoxiaoshi123 opened this issue Dec 12, 2021 · 4 comments
Open

老哥不回到起点的该怎么改呀 #1

Gaoxiaoshi123 opened this issue Dec 12, 2021 · 4 comments

Comments

@Gaoxiaoshi123
Copy link

就是那种找到一条路径遍历完所有城市群(一个城市群抵达一个城市即可)且不用返回到最初地点的

@x2018
Copy link
Owner

x2018 commented Dec 12, 2021

严格意义上来讲,就是价值衡量因素变了,把

cost += distance[solution[0]][solution[goods_num - 1]]
注释掉看看。

@Gaoxiaoshi123
Copy link
Author

严格意义上来讲,就是价值衡量因素变了,把

cost += distance[solution[0]][solution[goods_num - 1]]

注释掉看看。

多谢老哥,虽然画得图还是把他们连上了,但我想应该是变了

@x2018
Copy link
Owner

x2018 commented Dec 12, 2021

修改下画图的地方就行:

result.append(city_position[best_solution[0]])

@Gaoxiaoshi123
Copy link
Author

Gaoxiaoshi123 commented Dec 12, 2021 via email

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

2 participants