The Base.run function allows for an optional keyword argument dim_keys, which (as far as I can tell) allows the user to specify a subset of time periods which the model should be run for.
This keyword argument has the following type-declaration:
Union{Nothing, Dict{Symbol, Vector{T} where T <: DimensionKeyTypes}}
However, this type declaration doesn't recognize a supplied value of type Dict{Symbol, Vector{Int64}} as valid since
Dict{Symbol, Vector{Int64}} <: Dict{Symbol, Vector{T} where T <: DimensionKeyTypes} returns a value of false, although this is presumably the intended use of the argument.
This PR fixes this by changing the type-declaration to:
Union{Nothing, Dict{Symbol, Vector{T}} where T <: DimensionKeyTypes}, which ensures that arguments of the type Dict{Symbol, Vector{Int64}} are recognized as being valid.
This change is made in both the src/core/model.jl and src/core/model.jl files
The
Base.run
function allows for an optional keyword argumentdim_keys
, which (as far as I can tell) allows the user to specify a subset of time periods which the model should be run for.This keyword argument has the following type-declaration:
Union{Nothing, Dict{Symbol, Vector{T} where T <: DimensionKeyTypes}}
However, this type declaration doesn't recognize a supplied value of type
Dict{Symbol, Vector{Int64}}
as valid sinceDict{Symbol, Vector{Int64}} <: Dict{Symbol, Vector{T} where T <: DimensionKeyTypes}
returns a value offalse
, although this is presumably the intended use of the argument.This PR fixes this by changing the type-declaration to:
Union{Nothing, Dict{Symbol, Vector{T}} where T <: DimensionKeyTypes}
, which ensures that arguments of the typeDict{Symbol, Vector{Int64}}
are recognized as being valid.This change is made in both the
src/core/model.jl
andsrc/core/model.jl
files