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

Add "change" keyword in parallel managed lanes #162

Closed
jhelsel11 opened this issue Mar 13, 2020 · 16 comments
Closed

Add "change" keyword in parallel managed lanes #162

jhelsel11 opened this issue Mar 13, 2020 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@jhelsel11
Copy link
Contributor

jhelsel11 commented Mar 13, 2020

It would be super helpful to be able to use the change keyword in setting the lane property in a managed lane project. That way the user wouldn't need to know the number of lanes/create a link id group for each lane width over the course of a project.

I am experimenting with putting both the managed lane add and roadway property change in a single project card and if that works I will try to look at adding the change switch, but wanted you to be aware/have the chance to fix if it's a quick process.

@jhelsel11 jhelsel11 added the enhancement New feature or request label Mar 13, 2020
@e-lo e-lo assigned AshishKuls and unassigned e-lo Mar 13, 2020
@e-lo
Copy link
Collaborator

e-lo commented Mar 13, 2020

Reassigning this to @kulshresthaa

(At least) three code chunks that need to be fixed:

if "group" in p.keys():
attr_value = {}
attr_value["default"] = p["set"]

elif "timeofday" in p.keys():
attr_value = {}
attr_value["default"] = p["set"]

elif "set" in p.keys():

In addition to allowing for change, please update it so that it doesn't overwrite any existing values for categories/time periods that might exist!

@AshishKuls
Copy link
Member

@jhelsel11 You have an example project card with "change" keyword for the managed lane project? How is "change" going to be different than "set"?

@jhelsel11
Copy link
Contributor Author

Change should override the current value wityan increment rather than set the value. That way if a road changes lanes from 4 to 3 to 4 and you want one of them to be an hov, you don't need to know which lanes started with which value

@AshishKuls
Copy link
Member

I see. So you want "change" as keyword in manage lane card, the same way we have it defined in other cards functionality (roadway attribute change).

@jhelsel11
Copy link
Contributor Author

Yes

@AshishKuls
Copy link
Member

@e-lo Not sure if this is straightforward.

Example project card for discussion:

  • property: lanes
    set: 3
    timeofday:
    • time: ['6:00', '9:00']
      set: 2
  • property: ML_lanes
    set: 0
    timeofday:
    • time: ['6:00', '9:00']
      set: 1
  • property: ML_access
    set: 'all'
  • property: ML_egress
    set: 'all'

If attribute doesn't exist in the network:

  • "change" is specified in the project card, throw an error

if attribute exist in the network:

  • There is no "timeofday" or "group" keyword for the attribute:
    simple. just read the "change" value and modify the attribute value as existing + change
  • There is "timeofday" keyword:
    Say for "lanes", the attribute value that gets formed is something like {'default': 3, 'timeofday': [{'time': (21600, 32400), 'value': 2}]}
    How would you do it with change?

In the current implementation, I don't see this as simple change. We only specify the default value and value by time of day (and by group) and the actual managed lane network isn't created.

Not sure how/where revised value (existing + change) would be computed for each of the specified (search) link. Need to discuss this one.

@e-lo
Copy link
Collaborator

e-lo commented Mar 19, 2020

For now this is "won't fix" for this round. Sounds like Met Council doesn't have any variation in properties across time of day, etc. other than managed lanes.

@jhelsel11
Copy link
Contributor Author

@e-lo, did we get a new name for HOV?

@e-lo
Copy link
Collaborator

e-lo commented Mar 19, 2020 via email

@e-lo e-lo added the wontfix This will not be worked on label Mar 26, 2020
@AshishKuls
Copy link
Member

AshishKuls commented Oct 8, 2020

@DavidOry @e-lo This is the issue for adding the 'change' keyword in the parallel managed lane, which we decided to not fix at the time because it is not straightforward.

In the current implementation, the way new attribute value is constructed (for the time of day), I don't see how to make the change. Perhaps we need to have a call to discuss how to approach this.

I am thinking we likely have to loop through the links and make the change one link at a time by constructing that link attribute value based on set or change.

@AshishKuls AshishKuls self-assigned this Oct 8, 2020
@e-lo
Copy link
Collaborator

e-lo commented Oct 8, 2020

@kulshresthaa I am juggling things so can't have a call today but can take a look this evening. Can you reference where in the code this would need to happen?

@AshishKuls
Copy link
Member

this is code block where the change needs to happen and this is where the value is currently set.

current code block -

  • for each property in project card:
    • construct the same attribute value using set and time-of-day keyword
    • loop selected link idx:
      • set the attribute value for the link

how I think it should be revised to account for change keyword -

  • for each property in project card:
    • loop selected link idx:
      • construct the link specific attribute value using set/change and time-of-day keyword
      • set the attribute value for the link

@AshishKuls
Copy link
Member

@e-lo thoughts?

@AshishKuls
Copy link
Member

@e-lo please review when you get a chance.

DavidOry added a commit to BayAreaMetro/network_wrangler that referenced this issue Oct 26, 2020
include change keyword in managed lanes project card (wsp-sag#162)
DavidOry added a commit that referenced this issue Oct 28, 2020
@DavidOry
Copy link
Member

@kulshresthaa

When I apply a Parallel Managed Lane Project Card, the lanes attribute becomes a dictionary, segmented by time of day. If I then apply another change project card to this facility, the change integer is added to the lanes dictionary, which throws a bug. Example is here.

cc: @i-am-sijia

@e-lo
Copy link
Collaborator

e-lo commented Aug 27, 2024

moot - as parallel managed lanes is now a roadway property change in v1 branch: #327

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

No branches or pull requests

4 participants