Skip to content

Commit

Permalink
Fix compile warnings on newer Julia versions
Browse files Browse the repository at this point in the history
  • Loading branch information
GordStephen committed Jul 4, 2024
1 parent 5396ca9 commit bc95ac2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/PRASBase/SystemModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ end

# No time zone constructor
function SystemModel(
regions, interfaces,
generators, region_gen_idxs,
storages, region_stor_idxs,
generatorstorages, region_genstor_idxs,
lines, interface_line_idxs,
regions::Regions{N,P}, interfaces::Interfaces{N,P},
generators::Generators{N,L,T,P}, region_gen_idxs::Vector{UnitRange{Int}},
storages::Storages{N,L,T,P,E}, region_stor_idxs::Vector{UnitRange{Int}},
generatorstorages::GeneratorStorages{N,L,T,P,E}, region_genstor_idxs::Vector{UnitRange{Int}},
lines, interface_line_idxs::Vector{UnitRange{Int}},
timestamps::StepRange{DateTime,T}
) where {N,L,T<:Period,P<:PowerUnit,E<:EnergyUnit}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function assess(
sampleseeds::Channel{Int},
results::Channel{<:Tuple{Vararg{ResultAccumulator{SequentialMonteCarlo}}}},
resultspecs::ResultSpec...
) where {R<:ResultSpec, N}
) where N

dispatchproblem = DispatchProblem(system)
systemstate = SystemState(system)
Expand Down
3 changes: 0 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ withinrange(x::ReliabilityMetric, y::Real, n::Real) =
withinrange(x::Tuple{<:Real, <:Real}, y::Real, nsamples::Int, n::Real) =
isapprox(first(x), y, atol=n*last(x)/sqrt(nsamples))

Base.isapprox(x::DiscreteNonParametric, y::DiscreteNonParametric) =
isapprox(support(x), support(y)) && isapprox(probs(x), probs(y))

Base.isapprox(x::T, y::T) where {T <: Tuple} = all(isapprox.(x, y))

Base.isapprox(x::T, y::T) where {T <: ReliabilityMetric} =
Expand Down

0 comments on commit bc95ac2

Please sign in to comment.