-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update and improve TSP code #148
Conversation
Codecov Report
@@ Coverage Diff @@
## master #148 +/- ##
==========================================
+ Coverage 75.32% 75.38% +0.06%
==========================================
Files 26 26
Lines 1552 1556 +4
==========================================
+ Hits 1169 1173 +4
Misses 383 383
Continue to review full report at Codecov.
|
Lagrange parameter update and validity check resolve issue #82 by providing a better default value and returning valid routes. |
if lagrange is None: | ||
# if no lagrange parameter provided, set to 'average' tour length | ||
if G.number_of_edges()>0: | ||
lagrange = G.size(weight=weight)*G.number_of_nodes()/G.number_of_edges() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add few words in the comment about why it makes sense to set this value for the parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Resolves issue #147 and also addresses issue #103.
There may be a faster way to check route validity, but this will get the job done.