diff --git a/evrouting/charge/T.py b/evrouting/charge/T.py index 8316c91b281ffae99274c19e21ecd17a413ac4c5..259aa4bc989135ed9375e5a1ee91aae1aad9cbb6 100644 --- a/evrouting/charge/T.py +++ b/evrouting/charge/T.py @@ -13,11 +13,11 @@ Label = namedtuple('Label', ['t_trip', 'beta_u', 'u', 'SoCProfile_u_v']) class ChargingFunction: def __init__(self, G: nx.Graph, n: Node, U: SoC): - self.c_n = charging_cofficient(G, n) + self.c = charging_cofficient(G, n) self.U = U def __call__(self, t: Time, beta: SoC = 0) -> SoC: - beta += self.c_n * t + beta += self.c * t if beta > self.U: return self.U @@ -41,7 +41,7 @@ class SoCFunction: def get_minimum(self) -> Time: """TODO: Explain.""" cost_p = self.b_u_v.cost - return max(self.t_trip, (cost_p - self.beta_u) / self.c_u + self.t_trip) + return max(self.t_trip, (cost_p - self.beta_u) / self.cf.c + self.t_trip) class SoCProfile: