Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new GA solver.
        /// </summary>
        public GASolver(TObjective objective, ISolver <TWeight, TProblem, TObjective, TSolution, TFitness> generator,
                        ICrossOverOperator <TWeight, TProblem, TObjective, TSolution, TFitness> crossOver, ISelectionOperator <TProblem, TSolution, TObjective, TFitness> selection,
                        IOperator <TWeight, TProblem, TObjective, TSolution, TFitness> mutation, GASettings settings)
        {
            _generator = generator;
            _crossOver = crossOver;
            _mutation  = mutation;
            _selection = selection;
            _settings  = settings;

            _random = new System.Random();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new GA solver.
 /// </summary>
 public GASolver(TObjective objective, ISolver <TWeight, TProblem, TObjective, TSolution, TFitness> generator,
                 ICrossOverOperator <TWeight, TProblem, TObjective, TSolution, TFitness> crossOver, ISelectionOperator <TProblem, TSolution, TObjective, TFitness> selection,
                 IOperator <TWeight, TProblem, TObjective, TSolution, TFitness> mutation)
     : this(objective, generator, crossOver, selection, mutation, GASettings.Default)
 {
 }