Skip to content
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

Add initial_input to MarketBidCost #1151

Merged
merged 18 commits into from
Oct 1, 2024
Merged

Conversation

GabrielKS
Copy link
Collaborator

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 an initial_input, still exists, but its initial_input is now set to nothing rather than NaN. This change probably should have been made as soon as we made initial_input nullable.

@GabrielKS GabrielKS requested review from pesap and jd-lara July 11, 2024 00:18
@GabrielKS GabrielKS self-assigned this Jul 11, 2024
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

Attention: Patch coverage is 83.48624% with 18 lines in your changes missing coverage. Please review.

Project coverage is 84.59%. Comparing base (ba1a44d) to head (ee43211).
Report is 20 commits behind head on main.

Files with missing lines Patch % Lines
src/models/cost_function_timeseries.jl 80.68% 17 Missing ⚠️
src/models/cost_functions/MarketBidCost.jl 95.23% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
unittests 84.59% <83.48%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/PowerSystems.jl 100.00% <ø> (ø)
src/models/cost_functions/MarketBidCost.jl 88.37% <95.23%> (+3.52%) ⬆️
src/models/cost_function_timeseries.jl 80.00% <80.68%> (+0.83%) ⬆️

@kdayday
Copy link
Contributor

kdayday commented Sep 10, 2024

@jd-lara @pesap is there any timeline on this pull request review? Currently we have a failing market bid example in the documentation, but I'm waiting to update if changes are going to happen soon. Thanks!

@pesap
Copy link
Member

pesap commented Sep 16, 2024

@jd-lara @pesap is there any timeline on this pull request review? Currently we have a failing market bid example in the documentation, but I'm waiting to update if changes are going to happen soon. Thanks!

I think @rodrigomha is working on this.

@rodrigomha rodrigomha self-requested a review September 16, 2024 19:14
@rodrigomha
Copy link
Contributor

We should close #1187 with this PR

Copy link
Contributor

@rodrigomha rodrigomha left a 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})

@rodrigomha rodrigomha changed the title WIP: Add initial_input to MarketBidCost Add initial_input to MarketBidCost Sep 30, 2024
@rodrigomha rodrigomha marked this pull request as ready for review September 30, 2024 03:06
@rodrigomha
Copy link
Contributor

Proposed interface ready for review. Requires NREL-Sienna/PowerSystemCaseBuilder.jl#109 and NREL-Sienna/PowerSystemsTestData#63

@jd-lara
Copy link
Member

jd-lara commented Sep 30, 2024

@rodrigomha the change in ee43211 fixes the backwards compatibility broken by this PR

Copy link
Member

@jd-lara jd-lara left a 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

@jd-lara jd-lara merged commit 627078a into main Oct 1, 2024
11 checks passed
@kdayday
Copy link
Contributor

kdayday commented Oct 7, 2024

We should close #1187 with this PR

@rodrigomha can you check whether #1187 should be closed?

@jd-lara jd-lara deleted the gks/market_bid_add_initial_input branch December 13, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants