# HG changeset patch # User Nicolas Saunier # Date 1757015797 14400 # Node ID d828f3f76273423ff816d2a96f1416e7a28f1cd8 # Parent 30711484d2f6238a8e0c34743479b92d52f279d6 forgot update to triangular FD equations diff -r 30711484d2f6 -r d828f3f76273 trafficintelligence/traffic_engineering.py --- a/trafficintelligence/traffic_engineering.py Mon Jul 14 11:59:42 2025 -0400 +++ b/trafficintelligence/traffic_engineering.py Thu Sep 04 15:56:37 2025 -0400 @@ -261,18 +261,23 @@ class TriangularFD(FundamentalDiagram): def __init__(self, vf = None, kc = None, kj = None, qmax = None, w = None): FundamentalDiagram.__init__(self,'Triangular') - if vf is not None and qmax is not None and kj is not None: + if vf is not None and kj is not None: self.vf=vf - self.qmax = qmax self.kj = kj - self.kc = qmax/vf - self.w = qmax/(self.kc-kj) + if qmax is not None: + self.qmax = qmax + self.kc = qmax/vf + self.w = qmax/(self.kc-kj) + elif kc is not None: + self.kc = kc + self.qmax = vf*kc + self.w = self.qmax/(self.kc-kj) def v(self, k): if k