Added GRSA implementation and tests #269
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📑 Description
This pull request adds the General Relativity Search Algorithm (GRSA) to the
physics_basedoptimizer family in Mealpy.GRSA is a physics-inspired metaheuristic that models particle movement using
time-like, space-like, and null-like geodesic components together with a
relativistic step-length factor and a small mutation operator for diversity.
Changes included
mealpy/physics_based/GRSA.py— implementation ofDevGRSAandOriginalGRSAtests/physics_based/test_grsa.py— unit tests for correctness and API compatibilitymealpy/physics_based/__init__.py— exportedOriginalGRSAREADME.md— added GRSA entry to the optimizer classification tableKey Hyperparameters
w_max,w_min— step-length schedulek_g— relativistic factor scalingmutation_rate— diversity / exploration control✅ Checks
self.generator,correct_solution, etc.)ℹ Additional Information
Reference:
Beiranvand, H., & Rokrok, E. (2015). General Relativity Search Algorithm: A Global Optimization Approach. International Journal of Computational Intelligence and Applications.
Happy to revise based on review feedback 👍