Beispiel #1
0
            public ESSolution MakeDeepCopy()
            {
                IArithmeticModelBuilder mb = solver.context.CreateArithmeticModelBuilder(this.currentModel);
                ESSolution clone           = new ESSolution(
                    this.solver,
                    mb.ToArithmeticModel(),
                    this.stdDeviations,
                    this.fitness);

                mb = null;
                return(clone);
            }
Beispiel #2
0
        public void InitializeCustomSolver(IArithmeticSolvingContext context)
        {
            this.context            = context;
            this.modelBuilder       = context.CreateArithmeticModelBuilder(context.InitialModel);
            this.startTime          = DateTime.Now;
            this.fitnessEvaluations = 0;
            this.termManager        = context.Host.ExplorationServices.TermManager;
            this.random             = context.Random;

            if (!this.initialized && this.isLoggingEnabled)
            {
                this.logManager  = new LogManager(this.name + "_" + this.explorationName, context);
                this.initialized = true;
            }
        }
Beispiel #3
0
 void IDisposable.Dispose()
 {
     this.modelBuilder = null;
 }
Beispiel #4
0
 protected void UpdateModelBuilder(ref IArithmeticModel model)
 {
     this.modelBuilder = this.context.CreateArithmeticModelBuilder(model);
 }