Exemple #1
0
        public void AddParetoSolution(S pareto_solution)
        {
            ContinuousVector original_solution = (ContinuousVector)pareto_solution;
            ContinuousVector nash_solution     = (ContinuousVector)SolutionFactory.Clone();

            nash_solution.Population = mPopulation;
            nash_solution.Problem    = this;

            nash_solution.Initialize(mDesignVariableGlobal2LocalMapping.Count);
            foreach (int global_design_variable_index in mDesignVariableGlobal2LocalMapping.Keys)
            {
                nash_solution[mDesignVariableGlobal2LocalMapping[global_design_variable_index]] = original_solution[global_design_variable_index];
            }
        }
Exemple #2
0
        protected virtual S Convert2SolutionForOriginalProblem(S s)
        {
            S original_solution = SolutionFactory.Clone() as S;

            S   partial_solution = s;
            int dimension_count  = mOriginalProblem.GetDimensionCount();

            original_solution.Initialize(dimension_count);
            for (int i = 0; i < dimension_count; ++i)
            {
                if (mGlobalEliteDesignVariables.ContainsKey(i))
                {
                    original_solution[i] = mGlobalEliteDesignVariables[i];
                }
                else
                {
                    original_solution[i] = partial_solution[mDesignVariableGlobal2LocalMapping[i]];
                }
            }
            return(original_solution);
        }
Exemple #3
0
 public virtual ISolution CreateSolution()
 {
     return(SolutionFactory.Clone() as S);
 }