-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add file GJO.py #7
base: master
Are you sure you want to change the base?
Conversation
import numpy as np | ||
from scipy.special import gamma | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to run this file? Where is the example to run the file?
|
||
""" | ||
|
||
def __init__(self, f_obj, dim = 2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is the lower bound (LB) and upper bound (UB) parameters?
If you don't have LB and UB how can you modify the solution?
Remove the dim parameter, and then replace it with LB and UB.
self.dim_ = dim | ||
|
||
|
||
def LF(self, beta): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name the function with full name, don't use short name. For example: levy_flight()
return 0.01*(mu*sigm)/(v**(1/beta)) | ||
|
||
|
||
def model(self, max_iter, size, beta=1.5, lb = -100, ub = 100): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this parameters should place in object creation (init function). Don't use the name size, it can be pop_size, n_agents, n_solutions, n_individuals,...)
Y2_new = Y2 - E*abs(rl*Y2 - Prey[i]) | ||
y = (Y1_new+Y2_new)/2 | ||
Prey[i] = y | ||
t+=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to print out the global best fitness value after each iteration.
Where is your output?
@oskargirardin Have you fixed my comments yet? |
Hello!
We implemented the Golden Jackal Optimizer (GJO) discussed in the following paper: https://www.sciencedirect.com/science/article/abs/pii/S095741742200358X . This is ready to be tested.
Thanks!
Ian, Oskar and Corentin