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); }
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; } }
void IDisposable.Dispose() { this.modelBuilder = null; }
protected void UpdateModelBuilder(ref IArithmeticModel model) { this.modelBuilder = this.context.CreateArithmeticModelBuilder(model); }