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..d8b3b0c 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) => { @@ -266,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 $ @@ -318,7 +338,7 @@ export const TechnoeconomicTables = (props: Props) => { ))} - Income Capacity + Income--Capacity $ {formatCurrency( @@ -334,40 +354,45 @@ 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)} + {(props.teaModel === TechnoeconomicModels.genericCombinedHeatAndPower || + props.teaModel === TechnoeconomicModels.gasificationPower) && ( + + Income--Heat + $ + + {formatCurrency( + props.cashFlows.reduce( + (sum: number, x: CashFlow) => sum + x.IncomeHeat, + 0 + ) + )} - ))} - - - Income -- Capacity - $ - - {formatCurrency( - props.cashFlows.reduce( - (sum: number, x: CashFlow) => sum + x.IncomeCapacity, - 0 - ) - )} - - {props.cashFlows.map((result, i) => ( - - {formatCurrency(result.IncomeCapacity)} + {props.cashFlows.map((result, i) => ( + + {formatCurrency(result.IncomeHeat)} + + ))} + + )} + {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 $ @@ -380,7 +405,7 @@ export const TechnoeconomicTables = (props: Props) => { )} {props.cashFlows.map((result, i) => ( - + {formatCurrency(result.InterestOnDebtReserve)} ))}