Ejemplo n.º 1
0
        /// <summary>
        /// Constructor. Just call auto implementation and everything should work
        /// </summary>
        /// <param name="runner"></param>
        /// <param name="design"></param>
        protected Experiment(ExperimentRunner runner, RunnableDesign design) : base(runner)
        {
            this.runner = runner;
            this.design = design ?? throw new NullReferenceException("Experiment created with null design");

            ExperimentEvents.OnTrialUpdated += TrialUpdated;
        }
Ejemplo n.º 2
0
        protected ExperimentPart(ExperimentRunner runner)
        {
            Runner    = runner;
            Interrupt = false;

            ExperimentEvents.OnStartPart += StartRunningPart;
            //TODO disable somehow. Disabling after trial completed does not allow it to restart. Perhaps do it using end of experiment event?
        }
Ejemplo n.º 3
0
 public RunnableDesign(ExperimentRunner runner, DataTable finalDataTable, IExperimentDesignFile designFile)
 {
     this.runner         = runner;
     this.designFile     = designFile;
     this.finalDataTable = finalDataTable;
     CreateAndAddBlocks();
     WriteParticipantValuesToTables();
 }
Ejemplo n.º 4
0
 protected Block(ExperimentRunner runner,
                 DataTable trialTable,
                 DataRow dataRow)
     : base(runner)
 {
     TrialTable = trialTable;
     Identity   = dataRow.AsStringWithColumnNames();
     MakeTrials();
     data       = dataRow;
     this.index = -99;
 }
Ejemplo n.º 5
0
        public static RunnableDesign CreateFromFile(ExperimentRunner runner, string fullPathToFile, IExperimentDesignFile configurationFile)
        {
            DataTable experimentTable = DataTableCsvUtility.DataTableFromCsv(configurationFile, fullPathToFile);

            return(new RunnableDesign(runner, experimentTable, configurationFile));
        }