Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ssc/cmod_equpartflip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,9 +893,10 @@ class cm_equpartflip : public compute_module
{
int i = 0;

if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("equpartflip", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");

if (is_assigned("en_electricity_rates")) {
if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");
}
// cash flow initialization
int nyears = as_integer("analysis_period");
cf.resize_fill( CF_max, nyears+1, 0.0 );
Expand Down
7 changes: 4 additions & 3 deletions ssc/cmod_levpartflip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,10 @@ class cm_levpartflip : public compute_module
{
int i = 0;

if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("levpartflip", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");

if (is_assigned("en_electricity_rates")) {
if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");
}
// cash flow initialization
int nyears = as_integer("analysis_period");
cf.resize_fill( CF_max, nyears+1, 0.0 );
Expand Down
7 changes: 4 additions & 3 deletions ssc/cmod_saleleaseback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,10 @@ class cm_saleleaseback : public compute_module
{
int i = 0;

if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("saleleaseback", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");

if (is_assigned("en_electricity_rates")) {
if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");
}
// cash flow initialization
int nyears = as_integer("analysis_period");
cf.resize_fill( CF_max, nyears+1, 0.0 );
Expand Down
5 changes: 3 additions & 2 deletions ssc/cmod_singleowner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,9 +895,10 @@ class cm_singleowner : public compute_module
{
int i = 0;

if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
if (is_assigned("en_electricity_rates")) {
if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");

}

// cash flow initialization
int nyears = as_integer("analysis_period");
Expand Down
7 changes: 4 additions & 3 deletions ssc/cmod_singleowner_heat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -910,9 +910,10 @@ class cm_singleowner_heat : public compute_module
{
int i = 0;

if (is_assigned("en_electricity_rates") && as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner_heat", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");

if (is_assigned("en_electricity_rates")) {
if (as_number("en_electricity_rates") == 0 && as_number("ppa_soln_mode") == 0)
throw exec_error("singleowner", "PPA price from which to calculate parasitic load costs is not specified. Check inputs for Revenue and Electricity Purchases.");
}

// cash flow initialization
int nyears = as_integer("analysis_period");
Expand Down
4 changes: 4 additions & 0 deletions ssc/cmod_wavefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@ class cm_wave_file_reader : public compute_module
p_minute[r] = (ssc_number_t)std::stod(values[minute_index]);
p_month[r] = (ssc_number_t)std::stod(values[month_index]);
wave_heights[r] = (ssc_number_t)std::stod(values[height_index]);
if (wave_heights[r] < 0 || wave_heights[r] > 999)
throw exec_error("wave_file_reader", "Wave height data is outside of numerical bounds at row " + std::to_string(r));
wave_periods[r] = (ssc_number_t)std::stod(values[period_index]);
if (wave_periods[r] < 0 || wave_periods[r] > 999)
throw exec_error("wave_file_reader", "Wave period data is outside of numerical bounds at row " + std::to_string(r));

//Make JPD from time series data

Expand Down
Loading