• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

GenXProject / GenX / #380

09 Dec 2023 03:57AM UTC coverage: 0.102%. First build
#380

Pull #600

travis-ci

Pull Request #600: Gen x retrofit mit

0 of 793 new or added lines in 67 files covered. (0.0%)

4 of 3904 relevant lines covered (0.1%)

0.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/load_inputs/load_generators_variability.jl
1
@doc raw"""
2
        load_generators_variability!(setup::Dict, path::AbstractString, inputs::Dict)
3

4
Read input parameters related to hourly maximum capacity factors for generators, storage, and flexible demand resources
5
"""
6
function load_generators_variability!(setup::Dict, path::AbstractString, inputs::Dict)
7

8
    # Hourly capacity factors
9
    TDR_directory = joinpath(path, setup["TimeDomainReductionFolder"])
10
    # if TDR is used, my_dir = TDR_directory, else my_dir = "system"
11
    my_dir = get_systemfiles_path(setup, TDR_directory, path)
12

13
    filename = "Generators_variability.csv"
14
    gen_var = load_dataframe(joinpath(my_dir, filename))
15

16
    all_resources = inputs["RESOURCE_NAMES"]
17

18
    existing_variability = names(gen_var)
19
    for r in all_resources
20
        if r ∉ existing_variability
21
            @info "assuming availability of 1.0 for resource $r."
22
            ensure_column!(gen_var, r, 1.0)
×
23
        end
24
    end
25

×
26
    # Reorder DataFrame to R_ID order
×
27
    select!(gen_var, [:Time_Index; Symbol.(all_resources)])
×
28

29
    # Maximum power output and variability of each energy resource
×
30
    inputs["pP_Max"] = transpose(Matrix{Float64}(gen_var[1:inputs["T"],
31
        2:(inputs["G"] + 1)]))
×
NEW
32

×
NEW
33
    println(filename * " Successfully Read!")
×
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc