Repository navigation
Support for PartitionProfile in resets - #14
Conversation
- Tested on specific node - Not tested for existing nodes with it
- Required significant rework in structure - New arguments in the function calls
|
I realized that it is most likely necessary to also reset the |
lfbernardino
left a comment
There was a problem hiding this comment.
The functionality looks good in general, and I understand PeriodPartition will not be addressed in this PR. Some points of discussion:
-
To answer your last comment: I think including
EmptyResetin the package would be good for general functionality, in the sense that it is good to enable paths to not be reset, even if it goes against the philosophy of most cases. Having that said, I think that the general behavior should be that a partition duration referring to the receding horizon problem is a slice of the original problem, and hence it should be reset. -
Since partitions should not be split between RH optimization problems, I suggested a clearer comment on that on the docs.
-
In the POI implementation, the number of partitions has to be constant across optimization problems, which is not currently explicit in the docs.
I suggest that you include the comments on the POI extension, and that you make the necessary changes for updating PartitionProfiles related to the duration of the partitions.
Co-authored-by: Lucas F. Bernardino <lucas.bernardino@sintef.no>
Co-authored-by: Lucas F. Bernardino <lucas.bernardino@sintef.no>
This PR adds support for updating nodes that incorporate
PartitionProfile(introduced inTimeStructv0.9.12) for some fields. Here, major problems are thatPartitionProfiles must be consistent with the chosen horizon type and thatPeriodPartitions are not inherent to a given time structure, and hence, require some further adjustments to the core structure compared to a simple additional reset.Aside for these updates, it was possible to follow the standard approach oulined in the documentation.
It would also be possible to replace the
EmptyResetwith a different approach, i.e., remove theelsestatement in the inner constructor toand modify the
add_elements!function toIt would reduce the number of resets, and hence, make the updating faster. However, it comes at the cost of the check within the
add_elements!function and the convert. I am hence not certain that it is beneficial.Note
I decided that it makes sense to rework the
UpdateCasetype to include both the main time structure and the receding horizon time structure. This update is however better located in a separate PR.I also though of restructuring the test set a bit as we have, at least in my opinion some redundant code. This will also be a separate PR. This restructuring will not change any tests, only the structure of introduced types.