-
Notifications
You must be signed in to change notification settings - Fork 114
Lcos cost inputs #530
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
Lcos cost inputs #530
Conversation
linked with sam (need to verify calcs)
allow PVWatts to run
multiplier to salvage value
|
|
||
| // Change the timestep of the battery and its component models | ||
| void ChangeTimestep(double dt_hr); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this might be a merge conflict, as this shouldn't be getting deleted. I'm noticing some other changes spread throughout such as dt_hr being changed back to dt_hour in battery state structs. And in cmod_stateful as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how I managed to do that but thanks for the catch. Fixed those potential merge conflicts and pushed again.
|
@mjprilliman Exciting! Do you mind adding some references for LCOS and its calculation here? Also, if there's a place to make sense to add that reference as a comment in the code, that would be really helpful for future maintenance as well. |
assignment checks
https://www.cell.com/joule/pdfExtended/S2542-4351(18)30583-X That is the main reference we have been going off of. I will be sure to include references in the code as we go. |
cpaulgilman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the variable nameplate1 be named something like nameplate_battery or battery_nameplate for clarity?
cost schedule to function in each of the financial models
| int grid_charging_cost_version = 0; | ||
| lcos_calc(this, cf_lcos, nyears, nom_discount_rate, inflation_rate, lcoe_real, cost_prefinancing, disc_real, grid_charging_cost_version, 0); | ||
| /* | ||
| double lcos_investment_cost = as_double("battery_total_cost_lcos"); //does not include replacement costs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this commented out code be removed now that lcos calc is in a function?
ssc/cmod_utilityrate5.cpp
Outdated
|
|
||
| ssc_number_t tier_credit = 0.0, sr = 0.0, tier_energy = 0.0; | ||
| // time step sell rates | ||
| if (as_boolean("ur_en_ts_sell_rate")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should always be false. ur_calc only runs for metering options 0 and 1, and the GUI disables time series rates for those options.
ssc/cmod_utilityrate5.cpp
Outdated
| } | ||
|
|
||
| // Fall back to TOU rates if m_ec_ts_sell_rate.size() is too small | ||
| if (tier_credit == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the above is expected to always be false - this will always be true.
ssc/cmod_utilityrate5.cpp
Outdated
|
|
||
| } | ||
| } | ||
| if (as_boolean("ur_en_ts_buy_rate")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as sell rates: I'd expect this is always false.
ssc/cmod_utilityrate5.cpp
Outdated
|
|
||
| ssc_number_t tier_charge = 0.0, br = 0.0, tier_energy = 0.0; | ||
| // time step sell rates | ||
| if (as_boolean("ur_en_ts_buy_rate")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as sell rates: I'd expect this is always false.
ssc/cmod_utilityrate5.cpp
Outdated
| monthly_elec_needed_from_grid_batt(12), | ||
| monthly_cumulative_excess_energy_batt(12), monthly_cumulative_excess_dollars_batt(12), monthly_bill_batt(12), monthly_peak_batt(12), monthly_test_batt(12), | ||
| monthly_two_meter_sales_batt(12), | ||
| monthly_true_up_credits_batt(12); // Realistically only one true-up month will be non-zero, but track them all for monthly outputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by these new inputs. It looks like they aren't actually used?
Additionally a lot of the computations inside ur_calc don't seem to make it outside of that function.
It looks like the only thing that is happening here is the computation of e_batt_cy and p_batt_cy, is the rest of the code needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I thought there would need to be changes to utility rate code to calculate the grid charging costs. After conversations I ended up not needing much or any of these code changes. I tried to remove changes but I see I missed a lot. I'm looking through it but I'm fairly confident this can be reverted to develop
-Added LCOS calculation to financial models
-To be used for models with battery, potentially CSP technologies
-Current changes causing random crashes in UI, haven't yet traced it to particular change