@@ -39,17 +39,19 @@ def get_net(sym_type: Literal["MX", "SX"], link_with_ramp: int = 2):
39
39
N1 = Node (name = "N1" )
40
40
N2 = Node (name = "N2" )
41
41
N3 = Node (name = "N3" )
42
- N4 = Node (name = "N3" )
43
- L1 = Link (1 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L1" )
44
- L2 = Link (1 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L2" )
45
- L3 = Link (1 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L3" )
46
42
O1 = MeteredOnRamp (C [0 ], name = "O1" )
47
43
O2 = SimplifiedMeteredOnRamp (C [1 ], name = "O2" )
48
44
D1 = CongestedDestination (name = "D1" )
45
+ if link_with_ramp == 1 :
46
+ L1 = Link (1 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L1" )
47
+ L2 = Link (2 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L2" )
48
+ else :
49
+ L1 = Link (2 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L1" )
50
+ L2 = Link (1 , lanes , L , rho_max , rho_crit_sym , v_free_sym , a_sym , name = "L2" )
49
51
net = (
50
52
Network (name = "A1" )
51
- .add_path (origin = O1 , path = (N1 , L1 , N2 , L2 , N3 , L3 , N4 ), destination = D1 )
52
- .add_origin (O2 , N2 if link_with_ramp == 1 else N3 )
53
+ .add_path (origin = O1 , path = (N1 , L1 , N2 , L2 , N3 ), destination = D1 )
54
+ .add_origin (O2 , N2 )
53
55
)
54
56
sym_pars = {"rho_crit" : rho_crit_sym , "a" : a_sym , "v_free" : v_free_sym }
55
57
others = {
@@ -67,7 +69,7 @@ def get_net(sym_type: Literal["MX", "SX"], link_with_ramp: int = 2):
67
69
68
70
69
71
def get_hardcoded_dynamics (
70
- L , lanes , C , tau , kappa , eta , rho_max , delta , T , link_with_ramp : int = 2 , ** kwargs
72
+ L , lanes , C , tau , kappa , eta , rho_max , delta , T , link_with_ramp : int = 2 , ** _
71
73
) -> cs .Function :
72
74
# sourcery skip: use-contextlib-suppress
73
75
assert link_with_ramp in {1 , 2 }
0 commit comments