Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to address SAM issue 1477 for host developer only #1141

Open
wants to merge 3 commits into
base: patch
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
68 changes: 37 additions & 31 deletions ssc/cmod_host_developer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,8 @@ class cm_host_developer : public compute_module
cf.at(CF_reserve_om, 0) +
cf.at(CF_reserve_receivables, 0);

cost_installed = cost_prefinancing + cost_financing
cost_installed = cost_prefinancing + cost_financing;// -max(depr_fed_reduction, depr_sta_reduction);
/* SAM issue 1477
- ibi_fed_amount
- ibi_sta_amount
- ibi_uti_amount
Expand All @@ -1923,19 +1924,20 @@ class cm_host_developer : public compute_module
- cbi_sta_amount
- cbi_uti_amount
- cbi_oth_amount;

*/
}
else
{ // debt fraction input
double debt_frac = as_double("debt_percent")*0.01;

cost_installed =
cost_prefinancing
+ constr_total_financing
+ cost_debt_closing
+ cost_other_financing
+ cf.at(CF_reserve_debtservice, 0) // initially zero - based on p&i
+ cf.at(CF_reserve_om, 0)
cost_installed =
cost_prefinancing
+ constr_total_financing
+ cost_debt_closing
+ cost_other_financing
+ cf.at(CF_reserve_debtservice, 0) // initially zero - based on p&i
+ cf.at(CF_reserve_om, 0);// -max(depr_fed_reduction, depr_sta_reduction);
/* SAM issue 1477
- ibi_fed_amount
- ibi_sta_amount
- ibi_uti_amount
Expand All @@ -1948,6 +1950,7 @@ class cm_host_developer : public compute_module
- cbi_sta_amount
- cbi_uti_amount
- cbi_oth_amount;
*/
cost_installed += debt_frac *cost_installed*cost_debt_fee_frac; // approximate up front fee
double loan_amount = debt_frac * cost_installed;

Expand Down Expand Up @@ -1988,14 +1991,15 @@ class cm_host_developer : public compute_module
new_ds_reserve = cf.at(CF_reserve_debtservice, 0);

// update installed cost with approximate debt reserve account for year 0
cost_installed =
cost_prefinancing
+ constr_total_financing
+ cost_debt_closing
+ cost_other_financing
+ cf.at(CF_reserve_debtservice, 0) // initially zero - based on p&i
+ cf.at(CF_reserve_om, 0)
- ibi_fed_amount
cost_installed =
cost_prefinancing
+ constr_total_financing
+ cost_debt_closing
+ cost_other_financing
+ cf.at(CF_reserve_debtservice, 0) // initially zero - based on p&i
+ cf.at(CF_reserve_om, 0);// -max(depr_fed_reduction, depr_sta_reduction);
/* SAM issue 1477
- ibi_fed_amount
- ibi_sta_amount
- ibi_uti_amount
- ibi_oth_amount
Expand All @@ -2007,6 +2011,7 @@ class cm_host_developer : public compute_module
- cbi_sta_amount
- cbi_uti_amount
- cbi_oth_amount;
*/
cost_debt_upfront = debt_frac * cost_installed * cost_debt_fee_frac; // for cash flow output
cost_installed += debt_frac *cost_installed*cost_debt_fee_frac;
loan_amount = debt_frac * cost_installed;
Expand Down Expand Up @@ -2267,20 +2272,21 @@ class cm_host_developer : public compute_module

cost_debt_upfront = cost_debt_fee_frac * size_of_debt; // cpg added this to make cash flow consistent with single_owner.xlsx

cost_installed = cost_prefinancing + cost_financing
- ibi_fed_amount
- ibi_sta_amount
- ibi_uti_amount
- ibi_oth_amount
- ibi_fed_per
- ibi_sta_per
- ibi_uti_per
- ibi_oth_per
- cbi_fed_amount
- cbi_sta_amount
- cbi_uti_amount
- cbi_oth_amount;

cost_installed = cost_prefinancing + cost_financing;// -max(depr_fed_reduction, depr_sta_reduction);
/* SAM issue 1477
- ibi_fed_amount
- ibi_sta_amount
- ibi_uti_amount
- ibi_oth_amount
- ibi_fed_per
- ibi_sta_per
- ibi_uti_per
- ibi_oth_per
- cbi_fed_amount
- cbi_sta_amount
- cbi_uti_amount
- cbi_oth_amount;
*/
// }
depr_alloc_total = depr_alloc_total_frac * cost_installed;
depr_alloc_macrs_5 = depr_alloc_macrs_5_frac * depr_alloc_total;
Expand Down