This bug was reported by Douglas Kojetin <douglas dot kojetin at gmail dot com>.
This change adds another test for the 'num_ri' structure to the model-free code, just in case. The
additional test is in the writing of simulation model-free results file.