private double ScoreSession()
        {
            double retVal = 0;

            compiler = new RlmFormulaCompiler(this);
            retVal   = Convert.ToDouble(compiler.Parse(SessionPhase));

            return(retVal);
        }
        public void Dispose()
        {
            ClearNetwork();

            if (compiler != null)
            {
                compiler.Dispose();
                compiler = null;
            }

            dataPersistEvent?.Close();
        }
        private double ScoreCycle()
        {
            double retVal = 0;

            compiler = new RlmFormulaCompiler(this);
            //foreach (var cons in CyclePhase.Constraints)
            //{
            //    if (Convert.ToBoolean(compiler.Parse(cons)))
            //    {
            //        TrainingVariables["CycleScore"].Value += cons.SuccessScore;
            //    }
            //    else
            //    {
            //        TrainingVariables["CycleScore"].Value += cons.FailScore;
            //    }
            //}

            //retVal = TrainingVariables["CycleScore"].Value = TrainingVariables["CycleScore"].Value + cycleScoreFormula;

            retVal = Convert.ToDouble(compiler.Parse(CyclePhase));

            return(retVal);
        }