Skip to content

Commit

Permalink
updates to selfConsumptionOutputs, still not working but at least the…
Browse files Browse the repository at this point in the history
…re's a value there now
  • Loading branch information
janinefreeman committed Sep 26, 2023
1 parent 6d5b998 commit ebfe0a7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ssc/cmod_battery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ var_info vtab_battery_outputs[] = {
{ SSC_OUTPUT, SSC_NUMBER, "batt_pvs_energy_to_grid_percent_sam", "PV smoothing energy to grid percent actual (loss due to curtail and battery loss)", "%", "", "Battery", "", "", "" },

// Self-consumption
{ SSC_OUTPUT, SSC_NUMBER, "num_ts_load_met_by_system", "Number of timesteps the electric load met by system (year 1)", "", "", "Battery", "", "", "" },
{ SSC_OUTPUT, SSC_NUMBER, "percent_ts_load_met_by_system", "Percent of timesteps the electric load met by system (year 1)", "", "", "Battery", "", "", "" },
{ SSC_OUTPUT, SSC_NUMBER, "num_ts_load_met_by_system", "Number of timesteps electric load met by system (year 1)", "", "", "Battery", "", "", "" },
{ SSC_OUTPUT, SSC_NUMBER, "percent_ts_load_met_by_system", "Percent of timesteps electric load met by system (year 1)", "", "", "Battery", "", "", "" },

// validation outputs at ramp interval - use for debugging and remove for release
/*
Expand Down Expand Up @@ -1912,6 +1912,12 @@ void battstor::outputs_topology_dependent()
outBatteryToLoad[index] = (ssc_number_t)(dispatch_model->power_battery_to_load());
outGridToLoad[index] = (ssc_number_t)(dispatch_model->power_grid_to_load());

if (batt_vars->batt_dispatch == dispatch_t::SELF_CONSUMPTION)
{
if (outGridToLoad[index] > 0.0)
outTimestepsLoadMetBySystem++;
}

if (batt_vars->batt_dispatch != dispatch_t::MANUAL)
{
outGridPowerTarget[index] = (ssc_number_t)(dispatch_model->power_grid_target());
Expand Down

0 comments on commit ebfe0a7

Please sign in to comment.