Skip to content

Releases: the-lambda-way/CarbMetSim

killRate and killBin bug

11 Mar 11:34
9d75e07

Choose a tag to compare

In the Blood class, public members killRate and killBin have size of MAX_AGE - HUNDRED_DAYS. These two constants were private variables, so it was not possible to traverse the arrays outside the class.

rbcBirthRate bug

03 Mar 13:33

Choose a tag to compare

The rbcBirthRate parameter in the BloodParams class of Blood.h did not have a default value. This could result in a bug where the user did not supply a value to the parameter so it gets set to 0.0 through default initialization, overwriting the correct default from the class body.

Version 1.0

25 Feb 03:02
2a09306

Choose a tag to compare

With this release, the project is fully usable either as a command line application or as a library. In addition, the project architecture was improved for use as an open-source library.

Features:

  • Organized the code into folders that will be useful as an open-source library.
  • Moved from C++11 to C++17 since it is common and adds useful features.
  • Separated the command-line interface from the simulator. This includes moving all string input and output into the cli, replacing all input strings with input parameters, and replacing all output strings with diagnostic variables. Additionally, the main loop was removed from SimCtl. The containing program should run its own main loop and call SimCtl::runTick() on each iteration. It can then read which events occurred and whatever parameters it needs. SimCtl::runTick() returns false after the HALT event has fired.
  • SimCtl is now the main library (i.e. non-textual) interface. Previously global variables were moved into SimCtl. The body and organs are accessed through public member pointers of SimCtl.
  • Moved externally accessed variables from private to public (encapsulation will need to be improved in the future). Moved variables only internally used from public to private.
  • Changed programmer-related error checks into assertions. Changed user-related errors into exceptions.
  • Simplified many things, including moving subprocesses into their own functions.
  • There was inconsistent code formatting and style, so I picked my own and applied it everywhere.
  • Implemented a workaround for negative zero in the output. This is a bug in the simulator output that needs to be fixed.
  • Fixed a bug in the KIDNEY parameter of the example parameter files which affected the output of diabetic examples.
  • Added system tests corresponding to each one of the example simulations. Added catch2 as a third-party library for adding unit and integration tests.
  • Added (incomplete) documentation.
  • Created a discrete event queue abstraction, which simplified the implementation of the SimCtl class.