thieu1995 / opfunu

A collection of Benchmark functions for numerical optimization problems
https://opfunu.readthedocs.io
GNU General Public License v3.0
127 stars 39 forks source link

fix: align modified_schwefel_func() in operation.py, close #21 #29

Closed SkyLull closed 8 months ago

SkyLull commented 8 months ago

Closes #21

📑 Description

I've compared the function operations with the function in CEC2021 C Code and updated the modified_schwefel_func() in operator.py to match with the function in cec21_test_func.cpp (line 1672 void schwefel_func ()). I have also used the same code mentioned in issue #21 to verify if the global minimum indeed equals the bias (1100.0). The result looks like this: Image which seems correct. I'm relatively new to this domain, so I welcome any feedback or suggestions to improve this fix. If there are any CI checks or additional testing required, please let me know, and I'll be happy to comply.

✅ Checks

ℹ Additional Information

I have tested the changes locally, but I'm not entirely sure if all the CI checks have passed. If there are any specific tests or checks that need to be conducted, please advise, and I'll make the necessary adjustments.

The English writing of this request is helped by GPT-4.