C# 클래스 SwarmOps.Problem

Base-class for an optimization problem.
파일 보기 프로젝트 열기: DanWBR/dwsim3 1 사용 예제들

공개 메소드들

메소드 설명
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