Using PIMixin disables ModelicaMixin's initial_state
- ModelicaMixin implements
initial_state()without callingsuper.initial_state() - CSVMixin implements
initial_state(), and callssuper().initial_state() - PIMixin implements
history(), without callingsuper().history().
Important:
OptimizationProblem has a history() implementation that defers to initial_state(), and an initial_state() implementation that defers to `history().
Using PIMixin will result in ModelicaMixin's initial_state() never being called. If we change PIMixin by doing super().history() there, we get stuck in an infinite recursion, because PIMixin also implements initial_state(). If we remove that one, it's fine. However, if we also let ModelicaMixin's initial_state() call super().initial_state(), it's back to infinite recursion.
Basically it would be prettier if all classes (other than OptimizationProblem) could just call their respective super() methods, whether they implement initial_state or history. Implementing both makes little sense in my opinion.