Skip to content
Snippets Groups Projects
Commit caaddf6c authored by markn92's avatar markn92
Browse files

wip

parent b41cee15
No related branches found
No related tags found
1 merge request!1Working np Algorithm
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment