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 node attributes #110

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion uxsim/uxsim.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Node:
"""
Node in a network.
"""
def __init__(s, W, name, x, y, signal=[0], signal_offset=0, flow_capacity=None, auto_rename=False, number_of_lanes=None):
def __init__(s, W, name, x, y, signal=[0], signal_offset=0, flow_capacity=None, auto_rename=False, number_of_lanes=None, attribute=None):
"""
Create a node

Expand All @@ -47,6 +47,8 @@ def __init__(s, W, name, x, y, signal=[0], signal_offset=0, flow_capacity=None,
Whether to automatically rename the node if the name is already used. Default is False.
number_of_lanes : int, optional
The number of lanes that can be green simultaniously at the node. Default is None.
attribute : any, optional
Additional (meta) attributes defined by users.

Attributes
----------
Expand Down