Can support for addition and subtraction for TimeProfile's be added?
One could implement this by
+(a::FixedProfile{T}, b::FixedProfile{T}) where {T} = FixedProfile(a.val + b.val)
function +(a::OperationalProfile{T}, b::OperationalProfile{T}) where {T}
return OperationalProfile(a.vals .+ b.vals)
end
function +(a::StrategicProfile{T}, b::StrategicProfile{T}) where {T}
return StrategicProfile(a.vals .+ b.vals)
end
function +(a::ScenarioProfile{T}, b::ScenarioProfile{T}) where {T}
return ScenarioProfile(a.vals .+ b.vals)
end
function +(a::RepresentativeProfile{T}, b::RepresentativeProfile{T}) where {T}
return RepresentativeProfile(a.vals .+ b.vals)
end
-(a::TimeProfile{T}, b::TimeProfile{T}) where {T} = a + (-b)
or one could implement length(::TimeProfile) and iterate(::TimeProfile) with the .+ and .- convention.
Can support for addition and subtraction for TimeProfile's be added?
One could implement this by
or one could implement
length(::TimeProfile)anditerate(::TimeProfile)with the.+and.-convention.