Skip to content

Commit

Permalink
Solving "summarize" issues
Browse files Browse the repository at this point in the history
- self.external_cost have to be calculated from self.emissions to able the application of pv function.

- self.total_production is a float, not a serie -> then round is a function, not a method
  • Loading branch information
alice-dub committed Dec 11, 2017
1 parent b8186dd commit 98479b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Run.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def pv(variable):
self.capture["Total"] = self.capture.sum(axis=1) * kt / Mt
self.total_capture = self.capture["Total"].sum() * Mt / Gt

self.external_cost = (self.emissions["Total"] * kt
self.external_cost = (self.emissions * kt
* parameter.carbon_price * USD / t
/ MUSD)
self.total_external_cost = pv(self.external_cost)
Expand Down Expand Up @@ -142,7 +142,7 @@ def total(self):
def f(cost):
return [round(cost * MUSD / GUSD), "bn USD"]
d = pd.DataFrame()
d["Power produced"] = [(self.total_production * GWh / TWh).round(), "Twh"]
d["Power produced"] = [round(self.total_production * GWh / TWh, 1), "Twh"]
d["System LCOE"] = [round(self.lcoe * (MUSD / GWh) / (USD / MWh), 1), "USD/MWh"]
d["Total cost"] = f(self.total_cost)
d[" Construction"] = f(self.total_investment)
Expand Down

0 comments on commit 98479b9

Please sign in to comment.