Problem statement
In the current version, we have a few inconsistencies with respect to the individual TimeStructure types. This is a bit related to potential constructors, but in my opinion it is also related to the individual structures.
A TwoLevel structure is given by:
struct TwoLevel{S<:Duration,T,OP<:TimeStructure{T}} <: TimeStructure{T}
len::Int
duration::Vector{S}
operational::Vector{OP}
op_per_strat::Float64
end
which is structurally similar to a RepresentativePeriods type:
struct RepresentativePeriods{S<:Duration,T,OP<:TimeStructure{T}} <: TimeStructure{T}
len::Int
duration::S
period_share::Vector{Float64}
rep_periods::Vector{OP}
end
but different to an OperationalScenarios type:
struct OperationalScenarios{T,OP<:TimeStructure{T}} <: TimeStructure{T}
len::Int
scenarios::Vector{OP}
probability::Vector{Float64}
end
The key difference is the location of the sub time structure field indicated through Vector{OP}.
Potential solution
I would unify the overall structure so that it is clear what is where. In my opinion, the Vector{OP} field should be last (except for TwoLevel as it makes sense to have op_per_strat as last). This would be similar to the adjustments for all internal types done in #23 and #29.
Problem statement
In the current version, we have a few inconsistencies with respect to the individual
TimeStructuretypes. This is a bit related to potential constructors, but in my opinion it is also related to the individual structures.A
TwoLevelstructure is given by:which is structurally similar to a
RepresentativePeriodstype:but different to an
OperationalScenariostype:The key difference is the location of the sub time structure field indicated through
Vector{OP}.Potential solution
I would unify the overall structure so that it is clear what is where. In my opinion, the
Vector{OP}field should be last (except forTwoLevelas it makes sense to haveop_per_stratas last). This would be similar to the adjustments for all internal types done in #23 and #29.