Composition: Member order matters
The order of members in the composition can have a crucial impact on the coupling. In our finam example finam-examples!1 (merged) we initially had this order:
[ETP_CAL, Tmin_reader, Tmax_reader, Tavg_reader, Rad_reader, ETP_writer]
But we needed to change it to:
[Tmin_reader, Tmax_reader, Tavg_reader, Rad_reader, ETP_CAL, ETP_writer]
Since all readers need to be updated first to have the correct time step when updating ETP_CAL
. And ETP_CAL
(the actual component) needs to be placed before the writer.
Should there be some logic behind that? Since there are no loops in this example it should actually be clear, that IO-related upstream modules should updated first, if there are modules with the same current time.