C# Класс SwarmOps.Problem

Base-class for an optimization problem.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BeginOptimizationRun ( ) : void

Called at the beginning of an optimization run.

Continue ( int iterations, double fitness, bool feasible ) : bool

Return whether optimization is allowed to continue.

EndOptimizationRun ( ) : void

Called at the end of an optimization run.

EnforceConstraints ( double &parameters ) : bool

Enforce constraints and evaluate feasiblity.

If you do not wish to enforce constraints you should make this call Feasible().

Feasible ( double parameters ) : bool

Evaluate feasibility (constraint satisfaction).

Fitness ( double parameters ) : double

Compute and return fitness for the given parameters.

Fitness ( double parameters, bool feasible ) : double

Compute and return fitness for the given parameters.

Fitness ( double parameters, double fitnessLimit ) : double

Compute and return fitness for the given parameters. The fitness evaluation is aborted preemptively, if the fitness becomes higher (i.e. worse) than fitnessLimit, and if it is not possible for the fitness to improve.

Fitness ( double parameters, double fitnessLimit, bool oldFeasible, bool newFeasible ) : double

Compute and return fitness for the given parameters. The fitness evaluation is aborted preemptively if feasibility of the new candidate solution is same or better as that of the old candidate solution, and if the fitness becomes higher (i.e. worse) than fitnessLimit and if it is not possible for the fitness to improve.

Gradient ( double x, double &v ) : int

Compute the gradient of the fitness-function.

Problem ( ) : System

Create the object.

Problem ( int maxIterations ) : System

Create the object.

Problem ( int maxIterations, bool requireFeasible ) : System

Create the object.

Описание методов

BeginOptimizationRun() публичный Метод

Called at the beginning of an optimization run.
public BeginOptimizationRun ( ) : void
Результат void

Continue() публичный Метод

Return whether optimization is allowed to continue.
public Continue ( int iterations, double fitness, bool feasible ) : bool
iterations int Number of iterations performed in optimization run.
fitness double Best fitness found in optimization run.
feasible bool Feasibility of best found candidate solution.
Результат bool

EndOptimizationRun() публичный Метод

Called at the end of an optimization run.
public EndOptimizationRun ( ) : void
Результат void

EnforceConstraints() публичный Метод

Enforce constraints and evaluate feasiblity.
If you do not wish to enforce constraints you should make this call Feasible().
public EnforceConstraints ( double &parameters ) : bool
parameters double Candidate solution.
Результат bool

Feasible() публичный Метод

Evaluate feasibility (constraint satisfaction).
public Feasible ( double parameters ) : bool
parameters double Candidate solution.
Результат bool

Fitness() публичный Метод

Compute and return fitness for the given parameters.
public Fitness ( double parameters ) : double
parameters double Candidate solution.
Результат double

Fitness() публичный Метод

Compute and return fitness for the given parameters.
public Fitness ( double parameters, bool feasible ) : double
parameters double Candidate solution.
feasible bool Feasibility of candidate solution.
Результат double

Fitness() публичный Метод

Compute and return fitness for the given parameters. The fitness evaluation is aborted preemptively, if the fitness becomes higher (i.e. worse) than fitnessLimit, and if it is not possible for the fitness to improve.
public Fitness ( double parameters, double fitnessLimit ) : double
parameters double Candidate solution.
fitnessLimit double Preemptive Fitness Limit.
Результат double

Fitness() публичный Метод

Compute and return fitness for the given parameters. The fitness evaluation is aborted preemptively if feasibility of the new candidate solution is same or better as that of the old candidate solution, and if the fitness becomes higher (i.e. worse) than fitnessLimit and if it is not possible for the fitness to improve.
public Fitness ( double parameters, double fitnessLimit, bool oldFeasible, bool newFeasible ) : double
parameters double Candidate solution.
fitnessLimit double Preemptive Fitness Limit.
oldFeasible bool Feasibility of new candidate solution.
newFeasible bool Feasibility of old candidate solution.
Результат double

Gradient() публичный Метод

Compute the gradient of the fitness-function.
public Gradient ( double x, double &v ) : int
x double Candidate solution.
v double Array for holding the gradient.
Результат int

Problem() публичный Метод

Create the object.
public Problem ( ) : System
Результат System

Problem() публичный Метод

Create the object.
public Problem ( int maxIterations ) : System
maxIterations int Max optimization iterations to perform.
Результат System

Problem() публичный Метод

Create the object.
public Problem ( int maxIterations, bool requireFeasible ) : System
maxIterations int Max optimization iterations to perform.
requireFeasible bool Require solution to be feasible (satisfy constraints.)
Результат System