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); }
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); }