bounds on c1 and c2 added

This commit is contained in:
IWNMWE
2024-06-16 16:22:38 +05:30
parent ce6a64c233
commit 8969f73474
@@ -365,7 +365,8 @@ inline void AGEMOEA::Crossover(MatType& childA,
//! Variables after the cross over for all of them.
MatType c1 = 0.5 * ((current_min + current_max) - betaq1 % current_diff);
MatType c2 = 0.5 * ((current_min + current_max) + betaq2 % current_diff);
c1 = arma::min(arma::max(c1, lowerBound), upperBound);
c2 = arma::min(arma::max(c2, lowerBound), upperBound);
//! Decision for the crossover between the two parents for each variable.
us.randu();