-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat 13 welfare #147
Feat 13 welfare #147
Conversation
Benchmark resultJudge resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
==========================================
+ Coverage 89.04% 89.42% +0.37%
==========================================
Files 42 45 +3
Lines 3250 3366 +116
==========================================
+ Hits 2894 3010 +116
Misses 356 356
☔ View full report in Codecov by Sentry. |
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.
Looks pretty good overall, I have one question about the ability to use more complex formulas and functions like max() and min(), but otherwise I like this structure a lot.
df = TableSummary() | ||
push!(df, (:table_name, Symbol, NA, true, "The name of the table that the result is for.")) | ||
push!(df, (:result_name, Symbol, NA, true, "The name of the result that the formula is for.")) | ||
push!(df, (:formula, String, NA, true, "The string representing the formula for the table. See [`add_results_formula!`](@ref) for more info on this.")) |
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.
Do we need to make sure that we don't have the same variable names in different tables, right? like each of the variable names we use in the model should be unique. I think we already do that but just want to make sure that we have that explicitly somewhere if that's true. I'm also curious whether this works with functions like max() and min() in the formula, I know we will need at least those in some of the calculated results
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.
There is no restriction on having the same column names in different tables. I did enforce a restriction that result_name
cannot be a column name of the table it is a result for, just to avoid confusion.
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.
For max and min, do you have a use case in mind? Right now the dependent calculations only work with +,-,/,and *
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.
For the IRA nuclear PTC we need to use max and min when calculating the actual tax credit. I'm not sure if there are other ones but I can look more. Does having this add a lot more work?
|
||
results_formulas = get_results_formulas(data) | ||
|
||
if startswith(formula, r"[\w]+\(") |
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.
might be worth adding some comments here about what these regex things are, I know that I don't really know how to read them yet and might be helpful for any future debugging to know what they are checking, could just be little examples.
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.
Good call, happy to add that.
src/results/formulas.jl
Outdated
@doc raw""" | ||
AverageYearly(cols...) <: Function | ||
|
||
Function used in results formulas. Computes the sum of the products of the columns for each index in idxs. |
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.
Do you mean this to be 'average' or 'sum'?
@@ -157,6 +157,8 @@ function modify_results!(mod::GenerationStandard, config, data) | |||
|
|||
add_table_col!(data, :bus, :pl_gs, pl_gs_bus, MWServed, "Served Load Power that qualifies for generation standards") | |||
add_table_col!(data, :bus, :el_gs, el_gs_bus, MWhServed, "Served Load Energy that qualifies for generation standards") | |||
|
|||
add_results_formula!(data, :bus, :el_gs_total, "SumHourly(el_gs)", MWhServed, "Total served load energy that qualifies for generation standards") |
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.
Thanks for adding this, I'll go through and add more for the other Policy types when I have a sec
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.
Sure thing - I just added enough to support the tests that we currently have.
Benchmark resultJudge resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/E4ST.jl/E4ST.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
data[:results_formulas]
for storing how results are calculatedQuestions
aggregate_result
is now deprecated. Should we remove it? This would also allow for some of our units to become a bit less crazy (i.e. MWhGeneratedPerMWhCapacity would become Ratio or similar).AggregationTemplate
andYearlyTable
. Open to any suggestions for changing them...Sum, SumYearly, SumHourly, AverageYearly, MinHourly
? These could also inherit from an abstract type just to make them separate from other things.