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

Add file GJO.py #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

oskargirardin
Copy link

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

import numpy as np
from scipy.special import gamma


Copy link
Owner

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):
Copy link
Owner

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):
Copy link
Owner

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):
Copy link
Owner

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
Copy link
Owner

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?

@thieu1995
Copy link
Owner

@oskargirardin Have you fixed my comments yet?

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

Successfully merging this pull request may close these issues.

3 participants