jmarca / tsp_multiple_days

MIT License
5 stars 6 forks source link

magic numbers #2

Closed jacobjove closed 2 years ago

jacobjove commented 2 years ago

First, thanks for the example!

I see a bunch of 2s in here. Should that be args.days or num_days*2 or something?

Edit: It seems 2 represents the number of morning and night nodes included in the original matrix; i.e., since the original matrix in this example includes the start node and the end node (but not the dummy nodes), 2 is used to adjust the number of dummy nodes that need to be created/used.

jacobjove commented 2 years ago

One more thing: I'm confused by the naming of num_days. num_days is set to args.days - 1. Could you please explain why?

Edit: It appears that num_days actually represents the number of dummy morning nodes and dummy night nodes to create, and it's equal to args.days - 1 because the matrix already includes the start node (which is a morning node) and the end node (which is a night node).

jmarca commented 2 years ago

This is a scratch project as an example.

Feel free to use is as a way to learn. But I am not going to respond to issues.