Open luroy opened 3 years ago
Hi @luroy, I think part of the issue might be that you are trying to include pairs in all-to-one mode. If you want to look at pairwise connections, the appropriate Circuitscape mode would be "pairwise". In all to one or one to all, it's similar to pairwise, but each node is connected to all other nodes for each solve. There is a great explanation of this in the docs.
Let me know if pairwise mode might be what you're looking for. If so, try changing the mode to pairwise and see if things work for you.
Dear @vlandau, Thanks for responding so quickly ! I use the all-to-one mode can be as an alternative to the pairwise mode to use less memory. With this approach, I want Circuitscape to connect one focal node to ground and all other nearby focal nodes (for which the Euclidean distance to the ground-connected focal node is less than a given threshold) to 1 amp current sources. Hoping that it is possible :-) All the best, Léa
Ah you're right -- I've just used all-to-one typically for only one node so I was confused. @ranjanan do all-to-one and one-to-all support the include pairs file input?
Hi @luroy, apologies for the delay in following up on this. I have looked into the Circuitscape source code and all-to-one mode should handle specifying included pairs just fine, so I'm now going to reproduce the problem to see if I can figure out what is going on. Thanks for your patience!
I was able to reproduce this error. I'm still not sure what is causing it but I'll continue to dig in.
@ranjanan it looks like the issue is that the number of elements in nodemap
is larger than the size of G
. I'm wondering if this is happening because the input nodes are polygons as opposed to points. Nothing in the docs suggests that this shouldn't work, but maybe it hasn't been implemented? I'm going to cross reference with the pariwise mode code to see if the same correction for the polygons case is being done in all-to-one mode.
I think there may not be support for "polygon" nodes in all-to-one mode. @ranjanan please confirm.
I believe polygons are supported in one to all mode. It could be that if point files contain polygons, that isn't supported in one to all mode. That may need to be implemented.
The more I work with Circuitscape, the more I realise there are just so many corner cases and features. These will all need to be documented and listed.
I am going to rename this issue to: "Feature request: one-to-all and all-to-one mode with polygons in the point file".
Hi, I also ran Circuiscape in all-to-one mode with a file indicating focal node pairs (which are actually regions). I encountered the same problem reported here (BoundsError).
Do you know if the possibility to run all-to-one mode with pairs of polygons was implemented?
Thank you!
Dear all,
I tried using Circuitscape on Julia with to connect only some focal node pairs (for which the Euclidean distance is less than a given threshold theshold).
From a given input, I ran Circuiscape in all-to-one mode with a file indicating focal node pairs to include following the example file "listofpairstoinclude.txt" in the examples directory. I got the following error when running ini file in R using “JuliaCall” package:
Please find all input files and the .ini file associated at the following link: https://drive.google.com/drive/folders/1wdBCJvFvKUArEZjF4MaRfYS9NPawzo-q?usp=sharing
Thank you for your attention to this matter,
Léa