dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
DoubleSphere Class Reference

Double Sphere Optimization function. More...

#include <DoubleSphere.h>

Inheritance diagram for DoubleSphere:
Problem< FloatSolution >

Public Member Functions

 DoubleSphere ()=default
 Creates a default DoubleSphere object.
 
 DoubleSphere (const int &numberOfVars)
 Creates a DoubleSphere with numberOfVars dimension. More...
 
 DoubleSphere (const DoubleSphere *s)
 Creates a DoubleSphere object copying the information from other instance. More...
 
int getOptimizationDirection (int i) const override
 Get the optimization direction for each dimension of the problem. More...
 
float getUpperLimit (int i) const override
 Get the upper limit of the ith dimension. More...
 
float getLowerLimit (int i) const override
 Get the lower limit of the ith dimension. More...
 
string getName () const override
 Get the name of the Problem. More...
 
void evaluate (FloatSolution &solution) const override
 Evaluates a solution with the DoubleSphere equation. More...
 
bool evaluateConstraints (FloatSolution &solution) const override
 Not implemented here.
 
FloatSolution createSolution () const override
 Creates a random solution for the DoubleSphere problem. More...
 
FloatSolution createSolution (ParallelPRNG &engine) const override
 Creates a random solution for the DoubleSphere problem. More...
 
void readData (const string &path) override
 Not implemented here. More...
 
- Public Member Functions inherited from Problem< FloatSolution >
 Problem ()
 Creates a new Problem with all parameters to zero. More...
 
 Problem (const int &numberOfVars, const int &numberOfObjectives, const int &nCons)
 Construct a new Problem with all the given parameters. More...
 
 Problem (const Problem *copy)
 
virtual void readData (const std::string &path)=0
 Method to read problem information from the given path. This method must be implemented in the subclasses. More...
 
virtual json to_json () const
 Creates a JSON object with the information of the Problem. More...
 
int getNumberOfVars () const
 Get the number of variables (dimension) of the problem. More...
 
void setNumberOfVars (int nVars)
 Sets the number of variables (dimension) of the problem. More...
 
int getNumberOfObjs () const
 Get the number of objectives of the problem. More...
 
void setNumberOfObjs (int nObjs)
 Sets the number of objectives to the problem. More...
 
int getNumberOfCons () const
 Get the number the constraint of the problem. More...
 
void setNumberOfCons (int nCons)
 Sets the number of constraint of the problem. More...
 

Additional Inherited Members

- Protected Attributes inherited from Problem< FloatSolution >
int numberOfVars
 
int numberOfObjs
 
int numberOfCons
 

Detailed Description

Double Sphere Optimization function.

Constructor & Destructor Documentation

◆ DoubleSphere() [1/2]

DoubleSphere::DoubleSphere ( const int &  numberOfVars)
explicit

Creates a DoubleSphere with numberOfVars dimension.

Parameters
numberOfVars

◆ DoubleSphere() [2/2]

DoubleSphere::DoubleSphere ( const DoubleSphere s)
explicit

Creates a DoubleSphere object copying the information from other instance.

Parameters
s

Member Function Documentation

◆ createSolution() [1/2]

FloatSolution DoubleSphere::createSolution ( ) const
overridevirtual

Creates a random solution for the DoubleSphere problem.

Returns

Crea una solucion factible al problema DoubleSphere

Returns

Implements Problem< FloatSolution >.

◆ createSolution() [2/2]

FloatSolution DoubleSphere::createSolution ( ParallelPRNG &  engine) const
overridevirtual

Creates a random solution for the DoubleSphere problem.

Deprecated:
Returns

Implements Problem< FloatSolution >.

◆ evaluate()

void DoubleSphere::evaluate ( FloatSolution solution) const
overridevirtual

Evaluates a solution with the DoubleSphere equation.

Parameters
solution

Implements Problem< FloatSolution >.

◆ getLowerLimit()

float DoubleSphere::getLowerLimit ( int  i) const
overridevirtual

Get the lower limit of the ith dimension.

Parameters
i
Returns
-5.12

Implements Problem< FloatSolution >.

◆ getName()

string DoubleSphere::getName ( ) const
inlineoverridevirtual

Get the name of the Problem.

Returns
a string with the content DoubleSphere

Implements Problem< FloatSolution >.

◆ getOptimizationDirection()

int DoubleSphere::getOptimizationDirection ( int  i) const
overridevirtual

Get the optimization direction for each dimension of the problem.

Parameters
i
Returns
Minimize

Implements Problem< FloatSolution >.

◆ getUpperLimit()

float DoubleSphere::getUpperLimit ( int  i) const
overridevirtual

Get the upper limit of the ith dimension.

Parameters
i
Returns
5.12

Implements Problem< FloatSolution >.

◆ readData()

void DoubleSphere::readData ( const string &  path)
override

Not implemented here.

Parameters
path

The documentation for this class was generated from the following files: