All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.cilib.functions.continuous.unconstrained.Bird Maven / Gradle / Ivy

Go to download

A library of composable components enabling simpler Computational Intelligence

The newest version!
/**           __  __
 *    _____ _/ /_/ /_    Computational Intelligence Library (CIlib)
 *   / ___/ / / / __ \   (c) CIRG @ UP
 *  / /__/ / / / /_/ /   http://cilib.net
 *  \___/_/_/_/_.___/
 */
package net.sourceforge.cilib.functions.continuous.unconstrained;

import net.sourceforge.cilib.functions.ContinuousFunction;
import net.sourceforge.cilib.type.types.container.Vector;

import com.google.common.base.Preconditions;

/**
 * 

Bird Function

* *

Reference: S.K. Mishra, Some New Test Functions * for Global Optimization and Performance of Repulsive Particle Swarm Methods * North-Eastern Hill University, India, 2002

* *

Minimum: *

    *
  • ƒ(x*) = -106.764537 (approx)
  • *
  • x* = (??,??)
  • *
  • for x1, x2 in [-2*π, 2*π]
  • *
*

* *

Characteristics: *

    *
  • Only defined for 2 dimensions
  • *
  • Unimodal
  • *
  • Seperable
  • *
  • Regular
  • *
*

* * R(-6.285714286,6.285714286)^2 * */ public class Bird extends ContinuousFunction { private static final long serialVersionUID = -7803711986955989075L; /** * {@inheritDoc} */ @Override public Double f(Vector input) { Preconditions.checkArgument(input.size() == 2, "Bird function is only defined for 2 dimensions"); double x1 = input.doubleValueOf(0); double x2 = input.doubleValueOf(1); return Math.sin(x1) * Math.exp((1 - Math.cos(x2)) * (1 - Math.cos(x2))) + Math.cos(x2) * Math.exp((1 - Math.sin(x1)) * (1 - Math.sin(x1))) + (x1 - x2) * (x1 - x2); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy