Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
firefly algorithm code in java
#1

/**
* Copyright © 2009 Richard Malek and SEAGE contributors

* This file is part of SEAGE.

* SEAGE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* SEAGE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with SEAGE. If not, see <http://gnulicenses/>.
*
*/

/**
* Contributors:
* Richard Malek
* - Initial implementation
*/

package org.seage.metaheuristic.fireflies;


/**
*
* @author Administrator
*/
public abstract class FireflyOperator {
abstract public double getDistance(Solution s1, Solution s2);

/**
* Attracts the solution s0 to solution s1 by formula:
* s0 = s0 + beta*s1 + r*(rand - 0.5)
* where beta can be
* beta = para.initialIntensity*exp(-absorption*distance^2)
* or
* beta = para.initialIntensity/(1+absorption*distance^2) for faster computation
* and r = para.initialRandomness if para.withDecreasingRandomness==false
* otherwise
* r = decreaseRandomness(para, iter)
* @param s0 - solution to be attracted closer to s1
* @param s1 - solution of attraction
* @param para - parameters of Firefly algorithm
* @param iter - search iteration
*/
abstract public void attract(Solution s0, Solution s1, int iter);


/**
* Returns decreased step of randomness. Function is used only in a case, if
* para.withDecreasingRandomness == true
* @param r - initial randomness
* @param time
* @return decreased randomness
*/

public abstract Solution randomSolution();
Reply

#2
Firefly Algorithm (FA) is a metaheuristic algorithm for global optimization, which is inspired by flashing behavior of firefly insects. This algorithm is proposed by Xin-She Yang in 2008. Fireflies use the flashing behavior to attract other fireflies, usually for sending signals to opposite sex. However, in the mathematical model, used inside Firefly Algorithm, simply the fireflies are unisex, and any firefly can attract other fireflies.
Attractiveness of a firefly is proportional to its brightness and for any couple of fireflies, the brighter one will attract the other; so the less bright one is moved towards the brighter one. This is performed for any binary combination of fireflies in the population, on every iteration of algorithm. For more information, you can refer to the related article on Wikipedia, here.
In this post, we are going to share with you, the open-source MATLAB implementation of Firefly Algorithm (FA), which is easy to use within your research and projects, if you are familiar with MATLAB programming language.
Reply

#3
n mathematical optimization, the firefly algorithm is a metaheuristic proposed by Xin-She Yang and inspired by the flashing behaviour of fireflies.[1]

Contents [hide]
1 Metaphor
2 Algorithm
3 Criticism
4 See also
5 References
Metaphor[edit]
The primary purpose for a firefly's flash is to act as a signal system to attract other fireflies. Xin-She Yang formulated this firefly algorithm by assuming:

All fireflies are unisexual, so that any individual firefly will be attracted to all other fireflies;
Attractiveness is proportional to their brightness, and for any two fireflies, the less bright one will be attracted by (and thus move towards) the brighter one; however, the intensity (apparent brightness) decrease as their mutual distance increases;
If there are no fireflies brighter than a given firefly, it will move randomly.
The brightness should be associated with the objective function.
Reply

#4
Hi am hafiz i would like to get details on firefly algorithm code in java ..My friend fahim said firefly algorithm code in java will be available here and now i am living at Kuala Lampure-KL and i last studied in the college science and now am doing minimization of the number of the number of test for in software engineering i need help on access to firefly optimization algorithm java code.
Reply

#5
i am Dahmu i would like to get details on firefly algorithm code in java ..My friend Justin said firefly algorithm code in java will be available here and now i am living at coimbtore and i last studied in the college karpagam from coimbatore and now am doing b.tech IT i need help on
Reply

#6
Hi am Tk i would like to get details on firefly algorithm code in java ..My friend said firefly algorithm code in java will be available here and now i am living at .. and i last studied in the college/school .. and now am doing ..i need help on ..etc
Reply



[-]
Quick Reply

Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.