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

raise error for imposible routes #433

Closed
joamatab opened this issue Jul 20, 2024 · 2 comments
Closed

raise error for imposible routes #433

joamatab opened this issue Jul 20, 2024 · 2 comments

Comments

@joamatab
Copy link
Collaborator

Routing works well for routes with enough space

    c = gf.Component()
    w = gf.components.straight(length=0.1)
    top = c << w
    bot = c << w
    d = 40
    bot.dmove((d, d))

    p0 = top.ports["o2"]
    p1 = bot.ports["o1"]
    r = gf.routing.route_single(c, p0, p1, cross_section="strip", taper=None)
    c.show()

image

However when there is not enough space d=5 the router routes backwards and usually collides with other elements. i think raising an error would be better

image

@sebastian-goeldi
Copy link
Collaborator

The problem is, the router cannot know beforehand whether it will go roundtrip.

The logic is not good enough to have foresight or know the past. It can detect whether it collided with itself but not whether it failed.

Maybe I can do something but might not be successful.

@sebastian-goeldi
Copy link
Collaborator

We could raise an error, but I also think with the new routing algorithms, this can give legitimate routes if you give it the bboxes. I am not sure whether we should leave this or not.

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