Batt functions for reopt sizing#1022
Conversation
…ions to vartab to make them accessible to both functions
…V now calls battery sizing
…ns_for_reopt_sizing
…ns_for_reopt_sizing
| return true; | ||
| } | ||
|
|
||
| bool Reopt_size_standalone_battery_params(ssc_data_t data) { |
There was a problem hiding this comment.
Can you make a test for this? Perhaps similar to TEST_F(CMPvsamv1PowerIntegration_cmod_pvsamv1, reopt_sizing)
|
|
||
| // financial inputs | ||
| map_optional_input(vt, "itc_fed_percent", &reopt_batt, "total_itc_pct", 0., true); | ||
| // TODO: what about reopt vars total_rebate_us_dollars_per_kw? |
There was a problem hiding this comment.
What about this TODO? Are there any incentives?
There was a problem hiding this comment.
That TODO has been in there for a while and got copy-pasted over. I'm thinking this TODO might be a better fit for a larger REopt API version upgrade closer to release time, the latest version doesn't include that variable: https://nrel.github.io/REopt.jl/dev/reopt/inputs/#Financial
| "Conditional: only required if the variable it's meant to replace is missing.\\n" | ||
| "REopt's 'microgrid_upgrade_cost_pct' set to 0 because SAM doesn't apply this cost multiplier.\\n" | ||
| "REopt inputs not used in this function will be REopt's defaults.\\n" | ||
| "Some additional REopt inputs are required, such as lon and lat. See https://nrel.github.io/REopt.jl/dev/reopt/inputs/ for a full set of inputs\\n\\n" |
There was a problem hiding this comment.
Is lat and lon still required?
There was a problem hiding this comment.
Yes. Though the intended use of this function will include prod_factor_kw for any PV, those are required inputs in the REopt API: https://nrel.github.io/REopt.jl/dev/reopt/inputs/#Site
There was a problem hiding this comment.
I don't see lat and lon in the new battery eqn being passed in?
There was a problem hiding this comment.
The battery compute module does not have lat and lon, they need to be added to the post after this function call.
There was a problem hiding this comment.
I see that it's added in the pv equation. So is this standalone battery post a viable submission to REopt in itself?
There was a problem hiding this comment.
It is not. This line is intended to be a hint that additional inputs are required, is there a better way to phrase it?
There was a problem hiding this comment.
"The post produced here is not a complete submission. Further additions are required, such as x and y, performed by function z"?
In that case, what is the intended use case in adding it to PySAM's standalone battery module? The user then adds the missing variables?
There was a problem hiding this comment.
Thanks, better explanation in latest push.
Yes, for the planned dGen use case Python code will add the additional required variables. dGen uses the Battery compute module, but not the PV compute module, so the existing function was not an option.
Add new function Reopt_size_standalone_battery_params to assist with dGen PV and battery sizing using the battery compute module. Also update URDB Python call to version 8.
Pairs with SAM PR NatLabRockies/SAM#1398 and PySAM PR NatLabRockies/pysam#149