Developer’s call, 31.05.2021



  • Fixed styling of newsletter page
  • Added newsletter subscription note to main page
  • Cleaned up menus

Also, we got a short overview of ibt761 which hosts

Fix compile warnings by jayghoshter · Pull Request #76 · modsim/CADET · GitHub

  • Discussion on using C++17 standards for Cadet, spawned by the [[fallthrough]] fix for compile warnings in StringUtil.hpp:siphash().
  • Discussion on using REES: Essentially just have a file (apt.txt/requirements.txt/etc) that specifies the version of build tools and dependencies used.

Write out state for every unit operation separately. by schmoelder · Pull Request #73 · modsim/CADET

(@j.schmoelder, @j.hassan)

  • Cleaned up files which were accidentally committed (using git reset --hard vs git reset --soft)
  • Fixed input of INIT_STATE_Y for unit operations. Was using old and inconsistent interface which was extracting INIT_STATE_YDOT if length of INIT_STATE_Y was 2*NDOF but was still requiring the INIT_STATE_YDOT parameter to be present. Now, INIT_STATE_YDOT is correctly extracted from the parameter provider.
  • Added Exception if length of INIT_STATE_Y was not correct.
  • Started implementing getModelSlice() in IModelSystem.

Open question: Can we generally format Error Messages with more information s.t. for example instead of

"Length of INIT_STATE_YDOT should be equal to NDOF"

we get (assuming NDOF is 24)

"Length of INIT_STATE_YDOT should be equal to 24"

Also we should revisit a lot of the places where the input is checked and add or improve error checking. See also Implement linting tool · Issue #28 · modsim/CADET.

How about

Length of INIT_STATE_YDOT MUST be equal to NDOF (expected 24)

Should implies optional which I don’t think is the case. This also tells you that it must be equal to the degrees of freedom and what that should be.

1 Like

yes, agreed, that’s what I was aiming for. It’s just that I lack the knowledge how to format these Error messages in C++.

In Python, it would be something like

raise Exception('Length of INIT_STATE_YDOT MUST be equal to NDOF (expected {})'.format(NDOF))

f’Length of INIT_STATE_YDOT MUST be equal to NDOF (expected {NDOF})’ for Python

1 Like

Yes, this also works, but as far as I know, the new style of formatting strings (using the .format() method) is preffered (see Python String Formatting Best Practices – Real Python)

Edit: I take that back. They both work. Just the ‘old style’ using % signs is no longer recommended.