From f158eca084d5454d30971dfa7dae44a62d38a9e2 Mon Sep 17 00:00:00 2001 From: Kaiyan Li <38189032+kaiyanl@users.noreply.github.com> Date: Thu, 14 Apr 2022 20:50:53 -0700 Subject: [PATCH 1/5] report Income--Heat --- src/components/Results/ResultsTables.tsx | 1 + .../Technoeconomic/TechnoeconomicTables.tsx | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/components/Results/ResultsTables.tsx b/src/components/Results/ResultsTables.tsx index 6dfd108..81f1c1c 100644 --- a/src/components/Results/ResultsTables.tsx +++ b/src/components/Results/ResultsTables.tsx @@ -124,6 +124,7 @@ export const ResultsTable = (props: Props) => { props.yearlyResults.length )} system={props.frcsInputs.system} + teaModel={props.teaModel} /> diff --git a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx index 8831176..35ed76c 100644 --- a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx +++ b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { formatCurrency, formatNumber } from '../../Shared/util'; -import { YearlyResult } from '../../../models/Types'; +import { TechnoeconomicModels, YearlyResult } from '../../../models/Types'; import { Table } from 'reactstrap'; import { CashFlow } from '@ucdavis/tea/output.model'; @@ -8,6 +8,7 @@ interface Props { yearlyResults: YearlyResult[]; cashFlows: CashFlow[]; system: String; + teaModel: string; } export const TechnoeconomicTables = (props: Props) => { @@ -334,6 +335,26 @@ export const TechnoeconomicTables = (props: Props) => { ))} + {(props.teaModel === TechnoeconomicModels.genericPowerOnly || + TechnoeconomicModels.gasificationPower) && ( + + Income--Heat + $ + + {formatCurrency( + props.cashFlows.reduce( + (sum: number, x: CashFlow) => sum + x.IncomeHeat, + 0 + ) + )} + + {props.cashFlows.map((result, i) => ( + + {formatCurrency(result.IncomeHeat)} + + ))} + + )} Interest On Debt Reserve $ From 36a1d9aa5f2683596832d33c607db38888b3bac4 Mon Sep 17 00:00:00 2001 From: Kaiyan Li <38189032+kaiyanl@users.noreply.github.com> Date: Thu, 14 Apr 2022 20:55:25 -0700 Subject: [PATCH 2/5] remove duplicate Income--Capacity --- .../Technoeconomic/TechnoeconomicTables.tsx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx index 35ed76c..ef8bb33 100644 --- a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx +++ b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx @@ -319,7 +319,7 @@ export const TechnoeconomicTables = (props: Props) => { ))} - Income Capacity + Income--Capacity $ {formatCurrency( @@ -372,23 +372,6 @@ export const TechnoeconomicTables = (props: Props) => { ))} - - Income -- Capacity - $ - - {formatCurrency( - props.cashFlows.reduce( - (sum: number, x: CashFlow) => sum + x.IncomeCapacity, - 0 - ) - )} - - {props.cashFlows.map((result, i) => ( - - {formatCurrency(result.IncomeCapacity)} - - ))} - Interest On Debt Reserve $ From c61a31f18b0de386d47b76ecac24fa5e2e068349 Mon Sep 17 00:00:00 2001 From: Kaiyan Li <38189032+kaiyanl@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:12:02 -0700 Subject: [PATCH 3/5] report heat income when the model is chp or gp --- .../Technoeconomic/TechnoeconomicTables.tsx | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx index ef8bb33..17a7ac2 100644 --- a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx +++ b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx @@ -335,8 +335,8 @@ export const TechnoeconomicTables = (props: Props) => { ))} - {(props.teaModel === TechnoeconomicModels.genericPowerOnly || - TechnoeconomicModels.gasificationPower) && ( + {(props.teaModel === TechnoeconomicModels.genericCombinedHeatAndPower || + props.teaModel === TechnoeconomicModels.gasificationPower) && ( Income--Heat $ @@ -372,23 +372,6 @@ export const TechnoeconomicTables = (props: Props) => { ))} - - Interest On Debt Reserve - $ - - {formatCurrency( - props.cashFlows.reduce( - (sum: number, x: CashFlow) => sum + x.InterestOnDebtReserve, - 0 - ) - )} - - {props.cashFlows.map((result, i) => ( - - {formatCurrency(result.InterestOnDebtReserve)} - - ))} - Taxes w/o Credit $ From cce00439c106e2391e590bdabe33fc2a9f9ad38c Mon Sep 17 00:00:00 2001 From: Kaiyan Li <38189032+kaiyanl@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:12:41 -0700 Subject: [PATCH 4/5] report income--char/ash when the model is gp --- .../Technoeconomic/TechnoeconomicTables.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx index 17a7ac2..536463a 100644 --- a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx +++ b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx @@ -355,6 +355,25 @@ export const TechnoeconomicTables = (props: Props) => { ))} )} + {props.teaModel === TechnoeconomicModels.gasificationPower && ( + + Income--Char/Ash + $ + + {formatCurrency( + props.cashFlows.reduce( + (sum: number, x: CashFlow) => sum + x.IncomeChar, + 0 + ) + )} + + {props.cashFlows.map((result, i) => ( + + {formatCurrency(result.IncomeChar)} + + ))} + + )} Interest On Debt Reserve $ From f36f7d70b721d51dd968a2efae0185b7670c7ae3 Mon Sep 17 00:00:00 2001 From: Kaiyan Li <38189032+kaiyanl@users.noreply.github.com> Date: Thu, 14 Apr 2022 21:18:18 -0700 Subject: [PATCH 5/5] report dual fuel cost when the model is gp --- .../Technoeconomic/TechnoeconomicTables.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx index 536463a..d8b3b0c 100644 --- a/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx +++ b/src/components/Results/Technoeconomic/TechnoeconomicTables.tsx @@ -267,6 +267,25 @@ export const TechnoeconomicTables = (props: Props) => { ))} + {props.teaModel === TechnoeconomicModels.gasificationPower && ( + + Dual Fuel Cost + $ + + {formatCurrency( + props.cashFlows.reduce( + (sum: number, x: CashFlow) => sum + x.DualFuelCost, + 0 + ) + )} + + {props.cashFlows.map((result, i) => ( + + {formatCurrency(result.DualFuelCost)} + + ))} + + )} Non-fuel Expenses $