From 6253db48d0c1468c8c3acbdd8fac8af2bb52ea99 Mon Sep 17 00:00:00 2001 From: Toru Seo <34780089+toruseo@users.noreply.github.com> Date: Mon, 19 Aug 2024 11:17:26 +0900 Subject: [PATCH] add node attributes --- uxsim/uxsim.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uxsim/uxsim.py b/uxsim/uxsim.py index 1b685b8..cad729d 100644 --- a/uxsim/uxsim.py +++ b/uxsim/uxsim.py @@ -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 @@ -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 ----------