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

net.sourceforge.cilib.problem.Problem Maven / Gradle / Ivy

Go to download

A library of composable components enabling simpler Computational Intelligence

There is a newer version: 0.8
Show newest version
/**           __  __
 *    _____ _/ /_/ /_    Computational Intelligence Library (CIlib)
 *   / ___/ / / / __ \   (c) CIRG @ UP
 *  / /__/ / / / /_/ /   http://cilib.net
 *  \___/_/_/_/_.___/
 */
package net.sourceforge.cilib.problem;

import net.sourceforge.cilib.problem.solution.Fitness;
import net.sourceforge.cilib.type.DomainRegistry;
import net.sourceforge.cilib.type.types.Type;
import net.sourceforge.cilib.util.Cloneable;

/**
 * 

* Optimisation problems are characterized by a domain that specifies the search space and * a fitness given a potential solution. This interface ensures that an * {@linkplain net.sourceforge.cilib.algorithm.OptimisationAlgorithm optimisation algorithm} has * all the information it needs to find a solution to a given optimisation problem. In addition, it is the * responsibility of an optimisation problem to keep track of the number of times the fitness has * been evaluated. *

*

All optimisation problems must implement this interface.

* */ public interface Problem extends Cloneable { /** * {@inheritDoc} */ @Override Problem getClone(); /** * Returns the fitness of a potential solution to this problem. The solution object is described * by the domain of this problem, see {@link #getDomain()}. An instance of * {@link net.sourceforge.cilib.problem.InferiorFitness} should be returned if the solution * falls outside the search space of this problem. * * @param solution The potential solution found by the optimisation algorithm. * @return The fitness of the solution. */ Fitness getFitness(Type solution); /** * Returns the number of times the underlying fitness function has been evaluated. * * @return The number fitness evaluations. */ int getFitnessEvaluations(); /** * Returns the domain component that describes the search space for this problem. * * @return A {@link net.sourceforge.cilib.type.DomainRegistry} object representing the search space. */ DomainRegistry getDomain(); void setDomain(String domain); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy