Closed SGeeversAtVortech closed 1 month ago
In GitLab by @vreeken on Sep 17, 2019, 22:55
added 1 commit
In GitLab by @vreeken on Sep 18, 2019, 24:03
marked as a Work In Progress
In GitLab by @vreeken on Sep 26, 2019, 17:19
unmarked as a Work In Progress
In GitLab by @vreeken on Sep 26, 2019, 17:19
added 9 commits
master
In GitLab by @vreeken on Sep 26, 2019, 17:29
marked the checklist item On top of !323 as completed
In GitLab by @vreeken on Oct 9, 2019, 21:28
marked as a Work In Progress
In GitLab by @vreeken on Oct 17, 2019, 15:14
Closed in favor of !343
In GitLab by @vreeken on Oct 17, 2019, 15:14
closed
In GitLab by @vreeken on Sep 17, 2019, 22:35
[x] On top of !323
[ ] After some more discussion, it actually seems better to just remove initial_state. There are so many things that can be very confusing when keeping both around.
Before we had the supposed default implementation in OptimizationProblem that history() also returned values in initial_state(), and vice versa. This would never actually work properly, as one would end up in an endless loop.
The reason this bug was not encountered until this point, is that ModelicaMixin did not call super() for initial_state(). Furthermore, PIMixin/IOMixin did not call super() either. So in practice we never got the behavior that history() referred to values in intial_state() and vice versa.
The "mother" method of the two is history(), as this is the only method actually called in CollocatedIntegratedOptimizationProblem. This means that when a user uses any IOMixin class, but implements their own initial_state() method, this method would never actually be called.
To fix this bug, we remove the supposed referral of initial_state() to history() (which was not there in practice), but we keep the call to initial_state() in OptimizationProblem's implementation of history(). We also make sure that all classes properly call their respective super() methods.
Closes #1123