-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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
endwhich 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}
endbut different to an OperationalScenarios type:
struct OperationalScenarios{T,OP<:TimeStructure{T}} <: TimeStructure{T}
len::Int
scenarios::Vector{OP}
probability::Vector{Float64}
endThe 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.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request