Example #1
0
 public SolutionLogComponent()
 {
     mifnexsoEntities          = new MIFNEXSOEntities();
     solutionLog               = new SolutionLog();
     solutionLog.SolutionLogId = Guid.Empty;
     solutionLog.SolutionId    = Guid.NewGuid();
     mifnexsoEntities.SolutionLogs.AddObject(solutionLog);
 }
Example #2
0
        internal PhraseAgentWebConsole(OutputRecognitionAlgorithm algorithm, VoteContainer <object> knowledge, bool exportKnowledge, bool useKnowledge, SolutionLog log)
        {
            _algorithm = algorithm;
            _knowledge = knowledge;

            _useKnowledge    = useKnowledge;
            _exportKnowledge = exportKnowledge;
            _log             = log;
        }
Example #3
0
        internal SolutionLog GetSolution(string experimentId, int taskId)
        {
            var         key = Tuple.Create(experimentId, taskId);
            SolutionLog log;

            if (!_taskToSolution.TryGetValue(key, out log))
            {
                var experiment = Experiments.Get(experimentId);
                if (experiment == null)
                {
                    return(null);
                }

                _taskToSolution[key] = log = new SolutionLog(this, experiment, taskId);
            }


            return(log);
        }
Example #4
0
 public SolutionLogComponent(Guid solutionLogId)
 {
     if (solutionLogId != Guid.Empty)
     {
         mifnexsoEntities = new MIFNEXSOEntities();
         try
         {
             solutionLog = mifnexsoEntities.SolutionLogs.FirstOrDefault(a => a.SolutionLogId == solutionLogId);
             if (solutionLog == null)
             {
                 solutionLog = new SolutionLog();
                 solutionLog.SolutionLogId = Guid.Empty;
                 mifnexsoEntities.SolutionLogs.AddObject(solutionLog);
             }
         }
         catch (Exception)
         {
             throw;
         }
     }
 }