Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Extreme Conditions Test / Static Test Matrix #132

Open
JamesPHoughton opened this issue Aug 11, 2017 · 1 comment
Open

Add Extreme Conditions Test / Static Test Matrix #132

JamesPHoughton opened this issue Aug 11, 2017 · 1 comment

Comments

@JamesPHoughton
Copy link
Collaborator

Expanding on ideas in Lessons from software testing for developing
behavioral tests of dynamic models
, create a simple way to specify extreme conditions tests for a model.

The general idea is to have a table where each row specifies a particular parameter and a value for it to take on, and then each column corresponds to the other parameters in the model. When a test condition has implications for the immediate values of one of the other parameters, these are specified in a cell. In the example from the above paper, the test matrix could look like:

Value Infection Recovery
Susceptible 0 0 -
Total Population 0 0 0
Infected 0 0 0
Contact Rate 0 0 -
Recovery Time inf - 0
Infectivity 0 0 -

To make this type of testing easier, we should also have a function which creates a template for this type of matrix, and saves it to a file that the modeler can edit and add their constraints to. The most basic template would just take extreme conditions for each value and make them into rows.

A more advance templating function would also:

  • remove rows for extreme conditions that had no downstream impact (ie, were only called in a stock's ddt function and did not influence any other variable)
  • remove rows representing table functions (the table functions themselves, not the result of calls to them)
  • remove columns for variables that are exogenous, and for table functions
  • block off cells that are not influenced by test condition - ie, they are upstream in a feedback loop, etc.
@JamesPHoughton
Copy link
Collaborator Author

JamesPHoughton commented Aug 16, 2017

One of the problems with this method is that if you rename a variable, it won't be automatically renamed in the excel file. If you've done a lot of work filling in values for the tests, this could cause a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant