Skip to content

Commit b8997b2

Browse files
committed
API updates for latest geothermal costs. Update CPA Macro
CPA macro updates - total to all benefits, lease payment mapped to fixed o and m
1 parent 7e7c060 commit b8997b2

5 files changed

Lines changed: 13 additions & 113 deletions

File tree

api/include/SAM_Geothermal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,6 @@ extern "C"
979979

980980
SAM_EXPORT double SAM_Geothermal_Outputs_bottom_hole_pressure_nget(SAM_table ptr, SAM_error *err);
981981

982-
SAM_EXPORT double SAM_Geothermal_Outputs_brine_effectiveness_nget(SAM_table ptr, SAM_error *err);
983-
984982
SAM_EXPORT double SAM_Geothermal_Outputs_capacity_factor_nget(SAM_table ptr, SAM_error *err);
985983

986984
SAM_EXPORT double SAM_Geothermal_Outputs_condensate_pump_power_nget(SAM_table ptr, SAM_error *err);
@@ -991,8 +989,6 @@ extern "C"
991989

992990
SAM_EXPORT double SAM_Geothermal_Outputs_cwflow_nget(SAM_table ptr, SAM_error *err);
993991

994-
SAM_EXPORT double SAM_Geothermal_Outputs_dt_rock_well_head_nget(SAM_table ptr, SAM_error *err);
995-
996992
SAM_EXPORT double SAM_Geothermal_Outputs_eff_secondlaw_nget(SAM_table ptr, SAM_error *err);
997993

998994
SAM_EXPORT double SAM_Geothermal_Outputs_first_year_output_nget(SAM_table ptr, SAM_error *err);
@@ -1015,8 +1011,6 @@ extern "C"
10151011

10161012
SAM_EXPORT double SAM_Geothermal_Outputs_lp_flash_pressure_nget(SAM_table ptr, SAM_error *err);
10171013

1018-
SAM_EXPORT double SAM_Geothermal_Outputs_max_brine_effectiveness_nget(SAM_table ptr, SAM_error *err);
1019-
10201014
SAM_EXPORT double* SAM_Geothermal_Outputs_monthly_energy_aget(SAM_table ptr, int* length, SAM_error *err);
10211015

10221016
SAM_EXPORT double* SAM_Geothermal_Outputs_monthly_energy_lifetime_aget(SAM_table ptr, int* length, SAM_error *err);

api/include/SAM_GeothermalCosts.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -611,20 +611,12 @@ extern "C"
611611
* Outputs Getters
612612
*/
613613

614-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_drilling_cost_nget(SAM_table ptr, SAM_error *err);
615-
616-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_exploration_cost_nget(SAM_table ptr, SAM_error *err);
617-
618-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_plant_cost_nget(SAM_table ptr, SAM_error *err);
619-
620614
SAM_EXPORT double SAM_GeothermalCosts_Outputs_baseline_cost_nget(SAM_table ptr, SAM_error *err);
621615

622616
SAM_EXPORT double SAM_GeothermalCosts_Outputs_conf_drilling_cost_nget(SAM_table ptr, SAM_error *err);
623617

624618
SAM_EXPORT double SAM_GeothermalCosts_Outputs_conf_total_cost_nget(SAM_table ptr, SAM_error *err);
625619

626-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_engineering_cost_nget(SAM_table ptr, SAM_error *err);
627-
628620
SAM_EXPORT double SAM_GeothermalCosts_Outputs_expl_drilling_cost_nget(SAM_table ptr, SAM_error *err);
629621

630622
SAM_EXPORT double SAM_GeothermalCosts_Outputs_expl_total_cost_nget(SAM_table ptr, SAM_error *err);
@@ -663,14 +655,8 @@ extern "C"
663655

664656
SAM_EXPORT double SAM_GeothermalCosts_Outputs_stim_cost_per_well_nget(SAM_table ptr, SAM_error *err);
665657

666-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_stim_total_cost_nget(SAM_table ptr, SAM_error *err);
667-
668658
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_drilling_cost_nget(SAM_table ptr, SAM_error *err);
669659

670-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_drilling_permitting_nget(SAM_table ptr, SAM_error *err);
671-
672-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_expl_permitting_nget(SAM_table ptr, SAM_error *err);
673-
674660
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_gathering_cost_nget(SAM_table ptr, SAM_error *err);
675661

676662
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_pump_cost_nget(SAM_table ptr, SAM_error *err);

api/modules/SAM_Geothermal.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,15 +1436,6 @@ SAM_EXPORT double SAM_Geothermal_Outputs_bottom_hole_pressure_nget(SAM_table ptr
14361436
return result;
14371437
}
14381438

1439-
SAM_EXPORT double SAM_Geothermal_Outputs_brine_effectiveness_nget(SAM_table ptr, SAM_error *err){
1440-
double result;
1441-
translateExceptions(err, [&]{
1442-
if (!ssc_data_get_number(ptr, "brine_effectiveness", &result))
1443-
make_access_error("SAM_Geothermal", "brine_effectiveness");
1444-
});
1445-
return result;
1446-
}
1447-
14481439
SAM_EXPORT double SAM_Geothermal_Outputs_capacity_factor_nget(SAM_table ptr, SAM_error *err){
14491440
double result;
14501441
translateExceptions(err, [&]{
@@ -1490,15 +1481,6 @@ SAM_EXPORT double SAM_Geothermal_Outputs_cwflow_nget(SAM_table ptr, SAM_error *e
14901481
return result;
14911482
}
14921483

1493-
SAM_EXPORT double SAM_Geothermal_Outputs_dt_rock_well_head_nget(SAM_table ptr, SAM_error *err){
1494-
double result;
1495-
translateExceptions(err, [&]{
1496-
if (!ssc_data_get_number(ptr, "dt_rock_well_head", &result))
1497-
make_access_error("SAM_Geothermal", "dt_rock_well_head");
1498-
});
1499-
return result;
1500-
}
1501-
15021484
SAM_EXPORT double SAM_Geothermal_Outputs_eff_secondlaw_nget(SAM_table ptr, SAM_error *err){
15031485
double result;
15041486
translateExceptions(err, [&]{
@@ -1599,15 +1581,6 @@ SAM_EXPORT double SAM_Geothermal_Outputs_lp_flash_pressure_nget(SAM_table ptr, S
15991581
return result;
16001582
}
16011583

1602-
SAM_EXPORT double SAM_Geothermal_Outputs_max_brine_effectiveness_nget(SAM_table ptr, SAM_error *err){
1603-
double result;
1604-
translateExceptions(err, [&]{
1605-
if (!ssc_data_get_number(ptr, "max_brine_effectiveness", &result))
1606-
make_access_error("SAM_Geothermal", "max_brine_effectiveness");
1607-
});
1608-
return result;
1609-
}
1610-
16111584
SAM_EXPORT double* SAM_Geothermal_Outputs_monthly_energy_aget(SAM_table ptr, int* length, SAM_error *err){
16121585
double* result = nullptr;
16131586
translateExceptions(err, [&]{

api/modules/SAM_GeothermalCosts.cpp

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -869,33 +869,6 @@ SAM_EXPORT double SAM_GeothermalCosts_GeoHourly_x_lp_nget(SAM_table ptr, SAM_err
869869
return result;
870870
}
871871

872-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_drilling_cost_nget(SAM_table ptr, SAM_error *err){
873-
double result;
874-
translateExceptions(err, [&]{
875-
if (!ssc_data_get_number(ptr, "atb_drilling_cost", &result))
876-
make_access_error("SAM_GeothermalCosts", "atb_drilling_cost");
877-
});
878-
return result;
879-
}
880-
881-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_exploration_cost_nget(SAM_table ptr, SAM_error *err){
882-
double result;
883-
translateExceptions(err, [&]{
884-
if (!ssc_data_get_number(ptr, "atb_exploration_cost", &result))
885-
make_access_error("SAM_GeothermalCosts", "atb_exploration_cost");
886-
});
887-
return result;
888-
}
889-
890-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_atb_plant_cost_nget(SAM_table ptr, SAM_error *err){
891-
double result;
892-
translateExceptions(err, [&]{
893-
if (!ssc_data_get_number(ptr, "atb_plant_cost", &result))
894-
make_access_error("SAM_GeothermalCosts", "atb_plant_cost");
895-
});
896-
return result;
897-
}
898-
899872
SAM_EXPORT double SAM_GeothermalCosts_Outputs_baseline_cost_nget(SAM_table ptr, SAM_error *err){
900873
double result;
901874
translateExceptions(err, [&]{
@@ -923,15 +896,6 @@ SAM_EXPORT double SAM_GeothermalCosts_Outputs_conf_total_cost_nget(SAM_table ptr
923896
return result;
924897
}
925898

926-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_engineering_cost_nget(SAM_table ptr, SAM_error *err){
927-
double result;
928-
translateExceptions(err, [&]{
929-
if (!ssc_data_get_number(ptr, "engineering_cost", &result))
930-
make_access_error("SAM_GeothermalCosts", "engineering_cost");
931-
});
932-
return result;
933-
}
934-
935899
SAM_EXPORT double SAM_GeothermalCosts_Outputs_expl_drilling_cost_nget(SAM_table ptr, SAM_error *err){
936900
double result;
937901
translateExceptions(err, [&]{
@@ -1103,15 +1067,6 @@ SAM_EXPORT double SAM_GeothermalCosts_Outputs_stim_cost_per_well_nget(SAM_table
11031067
return result;
11041068
}
11051069

1106-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_stim_total_cost_nget(SAM_table ptr, SAM_error *err){
1107-
double result;
1108-
translateExceptions(err, [&]{
1109-
if (!ssc_data_get_number(ptr, "stim_total_cost", &result))
1110-
make_access_error("SAM_GeothermalCosts", "stim_total_cost");
1111-
});
1112-
return result;
1113-
}
1114-
11151070
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_drilling_cost_nget(SAM_table ptr, SAM_error *err){
11161071
double result;
11171072
translateExceptions(err, [&]{
@@ -1121,24 +1076,6 @@ SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_drilling_cost_nget(SAM_table
11211076
return result;
11221077
}
11231078

1124-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_drilling_permitting_nget(SAM_table ptr, SAM_error *err){
1125-
double result;
1126-
translateExceptions(err, [&]{
1127-
if (!ssc_data_get_number(ptr, "total_drilling_permitting", &result))
1128-
make_access_error("SAM_GeothermalCosts", "total_drilling_permitting");
1129-
});
1130-
return result;
1131-
}
1132-
1133-
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_expl_permitting_nget(SAM_table ptr, SAM_error *err){
1134-
double result;
1135-
translateExceptions(err, [&]{
1136-
if (!ssc_data_get_number(ptr, "total_expl_permitting", &result))
1137-
make_access_error("SAM_GeothermalCosts", "total_expl_permitting");
1138-
});
1139-
return result;
1140-
}
1141-
11421079
SAM_EXPORT double SAM_GeothermalCosts_Outputs_total_gathering_cost_nget(SAM_table ptr, SAM_error *err){
11431080
double result;
11441081
translateExceptions(err, [&]{

deploy/runtime/macros/Community Solar/Community Power Accelerator.lk

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ set('subscriber1_bill_credit_rate', x );
7474

7575
exitIf(leasepayment == '');
7676
x[0] = to_real(leasepayment);
77-
set('subscriber1_payment_annual', x );
77+
// 7/2/2025-lease payment is cost to project and changed to fixed_om
78+
//set('subscriber1_payment_annual', x );
79+
set('om_fixed', x );
7880

7981
exitIf(communitybenefitspayments == '');
8082
x[0] = to_real(communitybenefitspayments);
@@ -108,12 +110,17 @@ fixedcommunitybenefitspayments = to_real(communitybenefitspayments);
108110
fixedtotal = fixedjobtraining + fixedcommunitybenefitspayments;
109111

110112
varbenefits = ['Energy savings to subscriber','Lease payments to owner','Community benefits payments','Job training'];
111-
varcf = ["cf_subscriber1_bill_credit_amount","cf_community_solar_subscriber1_revenue","cf_community_solar_recurring_fixed","cf_community_solar_recurring_fixed"];
113+
// 7/2/2025 meeting Lease payment to owner is cf_om_fixed
114+
//varcf = ["cf_subscriber1_bill_credit_amount","cf_community_solar_subscriber1_revenue","cf_community_solar_recurring_fixed","cf_community_solar_recurring_fixed"];
115+
varcf = ["cf_subscriber1_bill_credit_amount","cf_om_fixed_expense","cf_community_solar_recurring_fixed","cf_community_solar_recurring_fixed"];
112116
varmultiplier = [1.0,1.0,fixedcommunitybenefitspayments/fixedtotal,fixedjobtraining/fixedtotal];
113117
str_html = '<table bgcolor=#dddddd width=100%>';
114118
ap = round(to_real(get('analysis_period')));
115119

116-
str_html += '<tr><th>year</th>';
120+
//str_html += '<tr><th>year</th>';
121+
str_html += '<tr><th>Benefit</th>';
122+
// Total added based on 7/2/2025 meeting
123+
str_html += '<th>Total</th>';
117124
for (i=0;i<=ap;i++)
118125
{
119126
str_html += '<th>' + sprintf("%d",i) + '</th>';
@@ -124,6 +131,9 @@ for (i=0;i<#varcf;i++)
124131
{
125132
str_html += '<tr bgcolor=#ffffff><td align="left">' + varbenefits[i] + '</td>';
126133
cfline = get(varcf[i]);
134+
// add sum per 7/2/2025 meeting
135+
str_html += '<td align="right">' + sprintf('$%,',round(varmultiplier[i] * sum(cfline))) + '</td>';
136+
127137
for (j=0; j<#cfline; j++)
128138
{
129139
str_html += '<td align="right">' + sprintf('$%,',round(varmultiplier[i] * cfline[j])) + '</td>';

0 commit comments

Comments
 (0)