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

Error with networks consisting of multiple components #283

Closed
mvszuri opened this issue Feb 11, 2021 · 8 comments
Closed

Error with networks consisting of multiple components #283

mvszuri opened this issue Feb 11, 2021 · 8 comments
Assignees

Comments

@mvszuri
Copy link

mvszuri commented Feb 11, 2021

Hello Circuitscape team,

I am running Circuitscape 5 on a network in advanced mode. I have noticed that Circuitscape throws an error if the input network consists of multiple components. Circuitscape runs fine on the following example input files:

mgNetworkVerify3_graph_resistances.txt
mgNetworkVerify3_grounds_resistances.txt
mgNetworkVerify3_sources.txt
With the following settings:
github_test.txt

However, when an edge is added to the ....graph_resistances.txt file between two nodes that are only connected to each other and not to any other node, e.g.:
mgNetworkVerify3_graph_resistances.txt
The following error is returned: ERROR: DimensionMismatch("tried to assign 7-element array to 5×1 destination")

I'm not sure whether this is an unintended error or whether Circuitscape is not meant to work on networks of multiple components. For raster calculations, the Circuitscape documentation does mention that nodes can be completely isolated, which would suggest networks with multiple components.

Thank you very much for your help in advance!

Best regards,
Maarten

@mvszuri
Copy link
Author

mvszuri commented Feb 12, 2021

Just to clarrify; I have posted this as a new issue as I'm not sure whether it's related to the over issue that I posted: #282 (comment)

@vlandau
Copy link
Member

vlandau commented Aug 10, 2021

Hi @mvszuri sorry for the delay in getting to you here. Have you been able to resolve your issue? Is this problem still occurring in the latest version of Circuitscape? (version 5.8.3)

@mvszuri
Copy link
Author

mvszuri commented Aug 11, 2021

Hi @vlandau, thanks for coming back to this. I haven't tested it on the latest version of Circuitscape. I "solved" the problem by running Circuitscape on a network consisting of only one component. However, the results were not so useful for me, so I stopped using Circuitscape for my current analysis.

@vlandau
Copy link
Member

vlandau commented Aug 11, 2021

Sorry to hear that! From a look at the source code, it appears that network mode should indeed support multiple connected components for network mode for "advanced" and pairwise problems. @ranjanan is this correct? I'll look into reproducing this either this or next week and see if I can figure out what's going on.

@ViralBShah
Copy link
Member

Yes we generally detect the connected components and loop over them. So perhaps this is not well tested.

@vlandau vlandau self-assigned this Oct 12, 2021
@vlandau
Copy link
Member

vlandau commented Oct 13, 2021

I let this slip off of my radar accidentally. I will work on reproducing/debugging this week.

@ranjanan ranjanan self-assigned this Oct 15, 2021
@ranjanan
Copy link
Member

There is a work in progress PR for this #320

@ranjanan
Copy link
Member

Fixed by #320

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

4 participants