Skip to content

Commit

Permalink
add simulation_parameter to utility rate common
Browse files Browse the repository at this point in the history
copy inflation rate to utility rate common

add utility rate common cmod to trough iph and load rate structures

add example file to run trough iph commercial through sdktool
  • Loading branch information
Neises committed Apr 4, 2024
1 parent 638521e commit 1aaf633
Show file tree
Hide file tree
Showing 8 changed files with 36,207 additions and 35 deletions.
8,760 changes: 8,760 additions & 0 deletions samples/trough-iph-utility-rates/load.csv

Large diffs are not rendered by default.

475 changes: 475 additions & 0 deletions samples/trough-iph-utility-rates/sscapi.h

Large diffs are not rendered by default.

8,760 changes: 8,760 additions & 0 deletions samples/trough-iph-utility-rates/timestep_load_fractions.csv

Large diffs are not rendered by default.

635 changes: 635 additions & 0 deletions samples/trough-iph-utility-rates/trough-commercial-default.lk

Large diffs are not rendered by default.

8,760 changes: 8,760 additions & 0 deletions samples/trough-iph-utility-rates/ur_ts_buy_rate.csv

Large diffs are not rendered by default.

8,760 changes: 8,760 additions & 0 deletions samples/trough-iph-utility-rates/ur_ts_sell_rate.csv

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions ssc/cmod_trough_physical_iph.cpp
Expand Up @@ -52,6 +52,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <algorithm>
#include <iterator>

// for utility rates
#include "cmod_utilityrate5.h"

// signed/unsigned mismatch
#pragma warning (disable : 4388)

Expand Down Expand Up @@ -664,6 +667,9 @@ class cm_trough_physical_iph : public compute_module
add_var_info( _cm_vtab_trough_physical_iph );
add_var_info( vtab_adjustment_factors );
add_var_info(vtab_technology_outputs);

add_var_info(vtab_utility_rate_common); // Required for dispatch w/ utility rates

}

void exec( )
Expand Down Expand Up @@ -1273,6 +1279,12 @@ class cm_trough_physical_iph : public compute_module
}
else if (csp_financial_model == 5) { // Commercial

bool is_ur_assigned = is_assigned("ur_en_ts_sell_rate");

// rate data setup from ~ line 1336 in cmod_battery.cpp
rate_data* util_rate_data = new rate_data();
rate_setup::setup(m_vartab, 8760, 1, *util_rate_data, "cmod_trough_physical_iph");

// Need to figure out dispatch, but for now, just use something so that annual simulation solves
tou_params->mc_pricing.mc_weekdays.resize_fill(12, 24, 1.);
tou_params->mc_pricing.mc_weekends.resize_fill(12, 24, 1.);
Expand Down
80 changes: 45 additions & 35 deletions ssc/common.cpp

Large diffs are not rendered by default.

0 comments on commit 1aaf633

Please sign in to comment.