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

[Refactor] Separate out and be more rigorous about checking for managed lane network presence #294

Closed
e-lo opened this issue Apr 19, 2022 · 1 comment · Fixed by #310
Closed
Assignees
Labels
enhancement New feature or request refactor
Milestone

Comments

@e-lo
Copy link
Collaborator

e-lo commented Apr 19, 2022

As a user, I'd like a one-method way of checking if a network has managed lanes

  1. Add method to the roadway network to check for managed lanes presence

Idea for implementation

 @staticmethod
    def has_managed_lanes(links_df: GeoDataFrame) -> bool:
        ml_lanes_attributes = [
            i
            for i in links_df.columns.values.tolist()
            if i.lower().startswith("ml_lanes")
        ]

        if not ml_lanes_attributes:
            WranglerLogger.info("No managed lanes attributes found.")
            return False
        if links_df[ml_lanes_attributes].any() is not 0:
            WranglerLogger.info(
                "Max number of managed lanes is zero ({}).".format(
                    links_df[ml_lanes_attributes].max()
                )
            )
            return False
        return True
@e-lo e-lo added enhancement New feature or request refactor labels Apr 19, 2022
@e-lo e-lo added this to the v1.0 milestone Apr 19, 2022
@e-lo e-lo self-assigned this Apr 19, 2022
@e-lo e-lo linked a pull request Mar 2, 2023 that will close this issue
@e-lo
Copy link
Collaborator Author

e-lo commented Apr 10, 2023

Addressed in merged PR

@e-lo e-lo closed this as completed Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant