예제 #1
0
        private static CompositionPlan UpdatePBest(this CompositionPlan compositionPlan,
                                                   PsoConfig psoConfig)
        {
            compositionPlan.Cost = compositionPlan.CalculateCost(psoConfig.QualityAttributeWeights);

            if (compositionPlan.Cost < compositionPlan.PBest.Cost)
            {
                compositionPlan.PBest = compositionPlan;
            }

            return(compositionPlan);
        }
예제 #2
0
        public static CompositionPlan UpdatePBest(this CompositionPlan compositionPlan,
                                                  IcaConfig icaConfig)
        {
            compositionPlan.Cost = compositionPlan.CalculateCost(icaConfig.QualityAttributeWeights);

            if (compositionPlan.Cost < compositionPlan.PBest.Cost)
            {
                compositionPlan.PBest = compositionPlan;
            }

            return(compositionPlan);
        }