/// <summary>
        /// Main execution of the algorithm.
        /// </summary>
        public void Run()
        {
            //TODO: ensure we have a termination criteria and problem
            _instance.Value = this;
            if (!_initialized)
            {
                PerformInitialization();
            }

            //_instance.Value = this;
            while (!TerminationCriterion.Terminate(this))
            {
                //_instance.Value = this; //TODO: set instance for multipopulation?
                PerformIteration();
                IterationComplete?.Invoke(this, this);
                //_instance.Value = null;
            }

            AlgorithmComplete?.Invoke(this, this);
            _instance.Value = null;
        }
 public double CalculateCompletion()
 {
     return(TerminationCriterion.CalculateCompletion(this));
 }