Skip to content

IO refactoring

Anne Hommelberg requested to merge io-refactoring into master

Refactoring of the IO mixins (PIMixin and CSVMixin) to (re)move duplicate code.

All IO mixins will now use the same internal data store to store the read timeseries and parameters. This allowed building 2 general IOMixin classes (one for optimization and one for simulation) which contain the methods that where duplicated in both PIMixin and CSVMixin before. Instead of implementing (overriding) these methods themselves, PIMixin and CSVMixin now extend IOMixin. This makes it easier to add new mixins for other file types such as a NetcdfMixin in the future.


  • Check diff for TODOs/todos
  • Make sure that correct times is called: self.io.times_sec vs self.times(). Especially simulation.
  • Remove check_duplicates, or make default False?
  • Initial state storage for ModelicaMixin (and possibly CSVMixin)?
  • What about history() and initial_state() implementations?
Edited by Tjerk Vreeken

Merge request reports