private static void RunSubletyExperiment(Excel.Application app, Excel.Workbook wb, Random rng, UserSimulation.Classification c, string output_dir, double thresh, ProgBar pb)
{
// number of bootstraps
var NBOOTS = 2700;
// the full path of this workbook
var filename = app.ActiveWorkbook.Name;
// the default output filename
var r = new System.Text.RegularExpressions.Regex(@"(.+)\.xls|xlsx", System.Text.RegularExpressions.RegexOptions.Compiled);
var default_output_file = "simulation_results.csv";
var default_log_file = r.Match(filename).Groups[1].Value + ".iterlog.csv";
// save file location (will append for additional runs)
var savefile = System.IO.Path.Combine(output_dir, default_output_file);
// log file location (new file for each new workbook)
var logfile = System.IO.Path.Combine(output_dir, default_log_file);
// disable screen updating
app.ScreenUpdating = false;
// run simulations
if (!UserSimulation.Config.RunSubletyExperiment(app, wb, NBOOTS, 0.95, thresh, c, rng, savefile, MAX_DURATION_IN_MS, logfile, pb, IGNORE_PARSE_ERRORS))
{
System.Windows.Forms.MessageBox.Show("This spreadsheet contains no numeric inputs.");
}
// enable screen updating
app.ScreenUpdating = true;
}