C# Class SwarmOps.Problem

Base-class for an optimization problem.
Afficher le fichier Open project: DanWBR/dwsim3 Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

BeginOptimizationRun() public méthode

Called at the beginning of an optimization run.
public BeginOptimizationRun ( ) : void
Résultat void

Continue() public méthode

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.
Résultat bool

EndOptimizationRun() public méthode

Called at the end of an optimization run.
public EndOptimizationRun ( ) : void
Résultat void

EnforceConstraints() public méthode

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.
Résultat bool

Feasible() public méthode

Evaluate feasibility (constraint satisfaction).
public Feasible ( double parameters ) : bool
parameters double Candidate solution.
Résultat bool

Fitness() public méthode

Compute and return fitness for the given parameters.
public Fitness ( double parameters ) : double
parameters double Candidate solution.
Résultat double

Fitness() public méthode

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.
Résultat double

Fitness() public méthode

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.
Résultat double

Fitness() public méthode

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.
Résultat double

Gradient() public méthode

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.
Résultat int

Problem() public méthode

Create the object.
public Problem ( ) : System
Résultat System

Problem() public méthode

Create the object.
public Problem ( int maxIterations ) : System
maxIterations int Max optimization iterations to perform.
Résultat System

Problem() public méthode

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.)
Résultat System