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

Investigate distribute_clusters to be used also for single countries #1326

Open
davide-f opened this issue Jan 31, 2025 · 3 comments
Open

Investigate distribute_clusters to be used also for single countries #1326

davide-f opened this issue Jan 31, 2025 · 3 comments

Comments

@davide-f
Copy link
Member

Describe the feature you'd like to see

There is the need to check if the following function shall be triggered even when a single country is used:

if n.buses.country.nunique() > 1:
n_clusters = distribute_clusters(
inputs,
build_shape_options,
country_list,
distribution_cluster,
n,
n_clusters,
focus_weights=focus_weights,
solver_name=solver_name,
)

The reasoning is that we have subnetworks even in a single country and there is the need to distribute clusters among them as well.

@ekatef
Copy link
Member

ekatef commented Jan 31, 2025

@davide-f thanks for tracking this issue

I wonder if that can be a reason of a recently observed AssertionError for the lines belonging to different countries...

@davide-f
Copy link
Member Author

davide-f commented Feb 3, 2025

@davide-f thanks for tracking this issue

I wonder if that can be a reason of a recently observed AssertionError for the lines belonging to different countries...

I though so, but not. I haven't found the issue for it but #1330 solves that. It is soon to be merged :)
We shall drop the column "country" from lines dataframe

@ekatef
Copy link
Member

ekatef commented Feb 4, 2025

#1330

@davide-f thanks for tracking this issue
I wonder if that can be a reason of a recently observed AssertionError for the lines belonging to different countries...

I though so, but not. I haven't found the issue for it but #1330 solves that. It is soon to be merged :) We shall drop the column "country" from lines dataframe.

Ahh, I see! Thanks a lot for the update, and taking care about that :)

A great insight about the country column. It appears the key to find a workaround for #1311 can be also removing some columns...

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

2 participants