-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add initial_input
to MarketBidCost
#1151
Conversation
WIP -- not fully tested and probably bad in a number of ways
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1151 +/- ##
==========================================
- Coverage 84.61% 84.59% -0.02%
==========================================
Files 181 181
Lines 8285 8379 +94
==========================================
+ Hits 7010 7088 +78
- Misses 1275 1291 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I think @rodrigomha is working on this. |
We should close #1187 with this PR |
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 an issue related with promotion of Int to Float in no_load_cost that should promote:
Got exception outside of a @test
MethodError: Cannot `convert` an object of type
Int64 to an object of type
Union{Float64, TimeSeriesKey}
Closest candidates are:
convert(::Type{T}, !Matched::T) where T
@ Base Base.jl:84
Stacktrace:
[1] convert(::Type{Union{Nothing, Float64, TimeSeriesKey}}, x::Int64)
@ Base ./some.jl:37
[2] MarketBidCost(no_load_cost::Int64, start_up::@NamedTuple{hot::Float64, warm::Float64, cold::Float64}, shut_down::Float64, incremental_offer_curves::CostCurve{PiecewiseIncrementalCurve}, decremental_offer_curves::Nothing, incremental_initial_input::Nothing, ancillary_service_offers::Vector{Service})
initial_input
to MarketBidCost
initial_input
to MarketBidCost
Proposed interface ready for review. Requires NREL-Sienna/PowerSystemCaseBuilder.jl#109 and NREL-Sienna/PowerSystemsTestData#63 |
@rodrigomha the change in ee43211 fixes the backwards compatibility broken by this PR |
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.
If the tests pass we should merge
@rodrigomha can you check whether #1187 should be closed? |
Quick and dirty implementation, very much a draft at the moment — I'm not super happy with the now greater asymmetry of this interface (see #1150). Also I haven't done decremental yet — I'll do that once we finalize an interface — and the docs and tests are incomplete. But it is something functional to test with.
Minor potential violation of SemVer: the old
MarketBidCost
flavor, which lacks aninitial_input
, still exists, but itsinitial_input
is now set tonothing
rather thanNaN
. This change probably should have been made as soon as we madeinitial_input
nullable.