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

node format #1

Open
transfluxus opened this issue Jan 7, 2018 · 5 comments
Open

node format #1

transfluxus opened this issue Jan 7, 2018 · 5 comments

Comments

@transfluxus
Copy link

transfluxus commented Jan 7, 2018

I, what is the format that I need to pass to the solver. Your examples has

c = [
[0, 0],
[0, 1],
[0, 2],
[0, 3]
]

how does this describe the node connections/ weight?

Thanks!

@ildoonet
Copy link
Owner

ildoonet commented Jan 8, 2018

@transfluxus Hello,

It is a 2d coordinates for each nodes.

So, in this example, we have four destination to visit and they are located at (0, 0), (0,1), (0,2), (0,3), respectively. This program calculates distances between them.

If you have a distances, you can add by using 'add_by_distances'.

I will add more examples on README later today.

@transfluxus
Copy link
Author

ok so it's a bit redundat to pass the list of coordinates and then also call
solver.set_num_nodes(4) because, it is the same number as the number of destinations in c.

Another question. Do the coordinates have to be 2d? or can they also be... let's say 200dimensional :) ?

@ildoonet
Copy link
Owner

@transfluxus currently, it supports only 2d points. But you can use 'add_by_distances' function, which is not related to the number of dimensions.

I guess I will update to support multi dimensions.

@ildoonet ildoonet added this to To Do in 2018.02 Release Jan 11, 2018
@lxjhk
Copy link

lxjhk commented Apr 12, 2018

any update? How to use add_by_distances ?

@ildoonet
Copy link
Owner

ildoonet commented May 2, 2018

@lxjhk you can call add_by_distances with arguments of 2d matrix which includes distances between nodes. (This means you have to calculate distances)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants