Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lbonaldo committed Nov 6, 2024
1 parent c9e786f commit 763b81f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/model/resources/resources.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ Allows to set the attribute `sym` of an `AbstractResource` object using dot synt
- `value`: The value to set for the attribute.
"""
Base.setproperty!(r::AbstractResource, sym::Symbol, value) = setindex!(parent(r),
value,
sym)
Base.setproperty!(r::AbstractResource, sym::Symbol, value) = setindex!(parent(r), value, sym)

"""
haskey(r::AbstractResource, sym::Symbol)
Expand Down Expand Up @@ -254,8 +252,7 @@ julia> findall(r -> max_cap_mwh(r) != 0, gen.Storage)
50
```
"""
Base.findall(f::Function, rs::Vector{<:AbstractResource}) = resource_id.(filter(r -> f(r),
rs))
Base.findall(f::Function, rs::Vector{<:AbstractResource}) = resource_id.(filter(r -> f(r), rs))

"""
interface(name, default=default_zero, type=AbstractResource)
Expand Down

0 comments on commit 763b81f

Please sign in to comment.