Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Change] Possible changes in Polynomial Mutation #470

Open
jonpsy opened this issue Mar 24, 2021 · 1 comment
Open

[Feature Change] Possible changes in Polynomial Mutation #470

jonpsy opened this issue Mar 24, 2021 · 1 comment
Labels

Comments

@jonpsy
Copy link

jonpsy commented Mar 24, 2021

In the polynomial mutation code, we have (Notice the comment in the code)

void polynomial_mutation_impl(vector& child .....)
{

for(....){
            y = child[j];
            yl = lb[j];
            yu = ub[j];
            delta1 = (y - yl) / (yu - yl); //Normalised distance from lower bound.
            delta2 = (yu - y) / (yu - yl); //Normalised distance from upper bound.
         if( rnd < 0.5)
                xy = 1. - delta1;   //Possibly naive
               ....................
}
}

The problem I find is when we do xy = 1. - delta1, is unnecesary because 1. - delta1 is equivalent to delta2.
Simple proof:

delta1 + delta2 = ( (y - yl) + (yu - y) ) / (yu - yl) 
=> (yu - yl)/(yu - yl)
=>delta1 + delta 2 = 1
=> delta2 = 1 - delta1

@darioizzo If I've missed something, let me know, cheers!

@jonpsy jonpsy added the bug label Mar 24, 2021
@MLopez-Ibanez
Copy link
Contributor

@jonpsy It seems to me that you are right. You can probably remove delta1 completely. Maybe send a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants