Currently, if a TimeProfile contains fewer values than what is required for all time periods of a TimeStructure, the last value will be repeated. E.g.
periods = SimpleTimes(5,1)
op = OperationalProfile([1, 2, 3])
res = collect(op[t] for t in periods)
will return the vector [1, 2, 3, 3, 3].
This is convenient in some cases, e.g. testing for time structures with more periods than original intended to test for larger problem sizes. On the other hand, this may cause unintended errors/behavior that are not easily caught, if the profile is too short due to some other mismatch.
With more use of the package, and not everyone having detailed knowledge of this behavior, it seems better to let the indexing error at run-time when there are too few values (or consider a more tailored error message). This will be a breaking change and should be finalized before a 1.0 version.
Currently, if a
TimeProfilecontains fewer values than what is required for all time periods of aTimeStructure, the last value will be repeated. E.g.will return the vector
[1, 2, 3, 3, 3].This is convenient in some cases, e.g. testing for time structures with more periods than original intended to test for larger problem sizes. On the other hand, this may cause unintended errors/behavior that are not easily caught, if the profile is too short due to some other mismatch.
With more use of the package, and not everyone having detailed knowledge of this behavior, it seems better to let the indexing error at run-time when there are too few values (or consider a more tailored error message). This will be a breaking change and should be finalized before a 1.0 version.